Tenda Malformed HTTP Request Header Processing Vulnerability
The Tenda N300 F3 router fails to properly process malformed HTTP request headers, allowing an attacker to bypass authorization and download the router's configuration file, which contains the administrative password. The attacker can then decode the base64-encoded password and gain full administrative access.
signalhilltech.medium.com
Published on signalhilltech.medium.com
Three months ago, I began my journey as a cybersecurity intern. For my first major project, my colleague and I set out to find a security flaw in a router.
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
Likely the embedded GoAhead web server does not validate the structure of HTTP request headers and treats a malformed request as authorised, skipping the authentication check.
Impact
An attacker on the same network could bypass authentication and obtain the router's administrative password, leading to full control of the device; the authors note the flaw also affects rebranded Tenda models.
What the attacker needed
Network access to the router's web interface; no authentication required
The fix
The text does not state a fix; the vendor was contacted but no response was received, so the router should validate request headers and enforce authentication before serving configuration files.
How it was found
- Scan the router with nmap to find open ports 80 and 1980.
- Confirm the web server on port 80 is GoAhead-Webs using Telnet.
- Inspect login requests with OWASP ZAP and note the base64-encoded password cookie.
- Send a malformed GET request for the configuration file to port 80.
- Receive the configuration file and decode the base64 password.
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's web interface checks whether you are logged in before letting you see sensitive files. Here, the router's web server mishandled a request that was not formatted correctly, so it skipped that check. As a result, anyone who could reach the router could download its settings file and read the admin password inside it.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.