Portswigger Information disclosure on debug page
A developer left an HTML comment in a page response pointing to a PHP debug page that was still reachable. Visiting that page exposed sensitive server configuration information, including a secret key value.
medium.com
Published on medium.com
at the first i clicked on the view details button and get the request in burpsuite and send a base request i noted that the down page of response part contain a comment with the debug page the developer use and forget to delete the comment so will visit this page to see if any thing important
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 a leftover HTML comment disclosed the path of a debug page that was never removed from the production server.
What the attacker needed
None
The fix
The debug page should be removed from production and the leftover comment deleted.
How it was found
- Click the view details button and capture the request in an intercepting proxy.
- Inspect the response body and notice an HTML comment naming a debug page.
- Request that debug page path directly.
- Search the debug page for the secret key value.
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.
When a web page is sent to your browser, it can contain hidden notes called comments that visitors do not see on screen. Here a developer left a comment naming an internal debug page, and that page was still online. Debug pages often list server settings and secrets, so anyone who found the link could read them.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.