tddpd enable_test_mode command execution vulnerability
The tddpd service on TP-Link access points exposes an unauthenticated test mode that fetches and executes a shell script from a hard-coded IP address. An attacker on the same network could trigger this to run arbitrary commands as root.
the Vulnerability Discovery Follow
Originally disclosed on Cisco Talos
A command execution vulnerability exists in the tddpd enabletestmode functionality of Tp-Link AC1350 Wireless MU-MIMO Gigabit Access Point (EAP225 V3) v5.1.0 Build 20220926 and Tp-Link N300 Wireless Access Point (EAP115 V4) v5.0.4 Build 20220216. A specially crafted series of network requests can lead to arbitrary…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The tddpd service allows unauthenticated requests to trigger a test mode that fetches and executes a script from a hard-coded IP address without any validation.
Impact
A network attacker could execute arbitrary commands with root privileges on the device.
What the attacker needed
Attacker on same network; tddpd service running (first 15 min after reboot); attacker controls [redacted]
The fix
The vendor released new firmware to address the vulnerability.
How it was found
- Send a TDDP request with subtype 0x4B or 0x4F to UDP port 1024.
- The device checks for a host at [redacted] using arping.
- The device fetches test_mode_tp.sh via TFTP from 192.168.0.100.
- The device marks the script executable and runs it as root.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The device runs a background service that listens for special network messages. One of these messages turns on a 'test mode' that downloads a script from a fixed address and runs it with full system privileges. Because no login is needed, anyone on the same network can send that message and take control of the device.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.