| Название | Tenda CP3 Pro V27.5.52.101 OS Command Injection |
|---|
| Описание | The Tenda CP3 Pro IP camera (firmware V27.5.52.101, US_CP3ProV1.2ax_V27.5.52.101_en+cn_SPT01) exposes a JSON-RPC-style API endpoint at /RPC2 in its web administration panel. Calling method configManager.setConfig on configuration key Network allows an authenticated user to set the IPAddress and SubnetMask fields.
Internally, the backend binary bin/Kylin (ARM/C++) registers a config-change callback, CNetApp::OnConfigNetwork, for the Network configuration key. This callback reads the IPAddress field directly from the incoming JSON object with no validation of its format or content, and propagates it unescaped into a snprintf()-built shell command, for example: ip rule add from %s table %d. The resulting command string is executed via vfork() followed by execl(/bin/bash, -c, <command>, 0).
The only validation of IP format exists client-side, in the Vue.js web frontend (JavaScript rules object: ip, subnetMask types), and is trivially bypassed by sending the RPC request directly to /RPC2 instead of through the web form.
An authenticated attacker can therefore execute arbitrary OS commands as root by submitting a crafted IPAddress or SubnetMask value containing shell metacharacters (for example: x.x.x.x;touch /tmp/pwned;) to POST /RPC2 with method configManager.setConfig and params.Network.IPAddress set to the malicious string.
Technical evidence: static analysis (Ghidra decompilation) of bin/Kylin confirmed the full call chain from the config-change callback registration (CNetApp::SetConfigDefault) through CNetApp::OnConfigNetwork, an intermediate bridge function, and the command-construction function that builds and executes the ip rule / ip route shell commands. The extracted firmware web frontend (from web-x.squash.img) confirms the exact API call string /RPC2:configManager.setConfig:Network and that validation is client-side only. Session-timeout and login-redirect logic in the frontend confirms /RPC2 requires an authenticated admin session, so this is a post-authentication vulnerability.
No physical device was available to the researcher for live confirmation. Findings are based on complete static analysis of the binary and the extracted firmware web frontend; the PoC request shape below is reconstructed from this analysis and has not yet been confirmed against a live device.
PoC:
POST /RPC2 HTTP/1.1
Host: <device-ip>
Cookie: <authenticated-session-cookie>
Content-Type: application/json
{"method":"configManager.setConfig","params":{"Network":{"IPAddress":"x.x.x.x;touch /tmp/pwned;","SubnetMask":"x.x.x.x"}}}
Vendor was notified in parallel via [email protected]. |
|---|
| Пользователь | guti415 (UID 102804) |
|---|
| Представление | 06.11.2026 17:46 (23 дни назад) |
|---|
| Модерация | 29.11.2026 16:02 (23 days later) |
|---|
| Статус | принято |
|---|
| Запись VulDB | 445195 [Tenda CP3 Pro 27.5.52.101 /bin/Kylin CNetApp::OnConfigNetwork эскалация привилегий] |
|---|
| Баллы | 17 |
|---|