Tp-Link AX53 v1.0 tmpServer opcode 0x643 stack-based buffer overflow vulnerability
The tmpServer service on the TP-Link Archer AX53 copies attacker-supplied packet data into a fixed-size stack buffer without checking the length. An attacker who can reach the service could overflow the stack and potentially execute arbitrary code.
Originally disclosed on Cisco Talos
A stack-based buffer overflow vulnerability exists in the tmpServer opcode 0x643 functionality of Tp-Link AX53 v1.0 1.3.1 Build 20241120 rel.54901(5553). A specially crafted network packets can lead to arbitrary code execution.
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 opcode 0x643 handler copies the packet payload into a fixed 0x500-byte stack buffer using the attacker-controlled payload length, with no bounds check.
Impact
An attacker able to reach the service could crash it and potentially execute arbitrary code on the router; the service only listens on localhost and is reached through the vendor's cloud SSH port forward.
What the attacker needed
Access to tmpServer via cloud SSH forward; authenticated HomeShield app session
The fix
The vendor released a patch, so the copy should be bounded by the destination buffer size.
How it was found
- Send an association request packet to move the connection status to 2.
- Send a second association packet to move the status to 3.
- Send a data hello packet with opcode 5 to reach the data handling path.
- Send a data packet with service type and opcode 0x643 carrying an oversized payload.
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 program that listens for messages from a phone app. That program copies the message into a small fixed-size box in memory without checking how big the message is, so a long message spills over into neighbouring memory. Spilling over memory like this can let an attacker take control of the program.
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.