TP-Link Archer AX21 tmpServer Command 0x422 Stack-based Buffer Overflow Remote Code Execution Vulnerability
The tmpServer service on TP-Link Archer AX21 routers fails to validate the length of user-supplied data before copying it into a fixed-length stack buffer when handling command 0x422. An authenticated network-adjacent attacker could exploit this to execute arbitrary code as root.
This vulnerability allows network-adjacent attackers to execute arbitrary code on affected installations of TP-Link Archer AX21 routers. Authentication is required to exploit this vulnerability.
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 tmpServer service copies user-supplied data into a fixed-length stack buffer without validating its length.
Impact
An authenticated, network-adjacent attacker could execute arbitrary code with root privileges on affected routers.
What the attacker needed
Network-adjacent access; authentication required
The fix
The vulnerability was fixed in Archer AX21 firmware version V3230219.
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.
A router runs a small background service that listens for commands from nearby devices. When it handles one particular command, it copies incoming data into a fixed-size memory area without checking how much data is arriving, so extra data spills over into neighbouring memory. An attacker who is already logged in and on the same network could use this overflow to run their own code on the router with the highest privileges.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.