Skip to content
RCE Write-up Advanced

Analysis & Exploitation of a Recent TP-Link Archer A7 Vulnerability

The tdpServer service on TP-Link Archer A7 routers fails to validate the slave_mac parameter before using it in a system call, allowing an unauthenticated network-adjacent attacker to execute arbitrary code as root.

starlabs.sg

Published on starlabs.sg

This post provides detailed analysis and an exploit achieving remote code execution for CVE-2020-10882, which was used at Pwn2Own 2019, on the TP-Link Archer C7:

The author, on starlabs.sg

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The tdpServer service passes the user-supplied slave_mac parameter to a system call without validating it, leading to command injection.

Impact

A network-adjacent attacker without authentication could execute arbitrary code as the root user on affected routers.

What the attacker needed

Network-adjacent access to UDP port 20002; no authentication required

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 write-up has not been written yet. The Original tab links to the source.

A router runs a small background service that listens for network messages. It takes a piece of text from those messages and passes it to the operating system to run as a command without checking it first. An attacker on the same network can therefore make the router run their own commands with the highest privileges.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.