Totolink X2000R boa formParentControl deviceName stack-based buffer overflow vulnerability
A stack-based buffer overflow exists in the formParentControl function of the Totolink X2000R router's boa web server, where the deviceName POST parameter is copied without bounds checking into a fixed-size stack buffer. An authenticated attacker could send a crafted HTTP request to execute arbitrary code on the device.
Originally disclosed on Cisco Talos
A stack-based buffer overflow vulnerability exists in the boa formParentControl deviceName functionality of X2000R (version(s): TOTOLINK-X2000R-Gh-V1.0.0-B20250421.1327). A specially crafted HTTP request 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
Likely the use of strcpy to copy the user-supplied deviceName parameter into a fixed-size stack buffer without any length validation.
Impact
An authenticated attacker could achieve arbitrary code execution on the router, potentially leading to full compromise of the device.
What the attacker needed
Authenticated access to the web interface
How it was found
- Authenticate to the router's web interface via the login page.
- Send an HTTP POST request to /boafrm/formParentControl with a non-zero modPCRule or addPCUrl parameter.
- Include a deviceName parameter containing a long string.
- The deviceName value is copied into a stack buffer, overflowing it and crashing the process.
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.
This router's web interface has a function that copies text from a form field into a fixed-size memory area on the stack without checking length. If an attacker sends a very long value, it overflows that area and can overwrite the return address, letting them run their own code. The attacker must already be logged in to reach this page.
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.