**How I Uncovered a High-Severity Vulnerability Using a Single HTTP Header 🚀**
The server protected the /sys/ directory with IP-based access control but trusted the X-Forwarded-For header, so an attacker could spoof it as localhost and reach internal HTML content. This exposed server technologies, ASP.NET viewstate fields and a session cookie, and the server also accepted POST and PUT requests.
Published on medium.com
In the world of cybersecurity, sometimes the simplest tweaks can unveil the most significant vulnerabilities. This is the story of how a single HTTP header manipulation led me to discover a high-severity flaw in a major platform's web application.
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 server used the client-supplied X-Forwarded-For header to decide whether a request came from a trusted address instead of checking the real connection source.
Impact
An attacker could bypass the IP restriction and view internal content, learn server technologies and session identifiers, and potentially use accepted PUT requests for unauthorised file uploads or modifications, though the text only says these risks 'might' exist.
What the attacker needed
No account needed; ability to send custom HTTP headers
How it was found
- Read the robots.txt file and note the disallowed directories, including /sys/.
- Request the /sys/ directory and observe that it returns 403 Forbidden.
- Send the same request with an X-Forwarded-For header set to the localhost address.
- Observe a 200 OK response containing internal HTML content.
- Send POST and PUT requests without a Content-Length header and see a 411 response.
- Add Content-Length: 0 and observe that the POST and PUT requests succeed.
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.
Some websites try to hide admin or internal folders by only letting requests from certain IP addresses through. Here the site believed a header called X-Forwarded-For, which a visitor can set to anything, so pretending to come from the server's own address opened the hidden folder. That revealed technical details about the server that could help an attacker plan further attacks.
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.