Server Side Misconfigurartion - A Funny Fix
A metrics endpoint that had been fixed to return 404 still disclosed internal garbage collection information when the page was reloaded in a browser. An attacker could view this internal data, though the severity depends on what is exposed.
Published on shahjerry33.medium.com
I would like to enlighten you guys about my recent finding. It was my luck that I by mistakenly clicked the Reload button on a 404 page and got an information disclosure.
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 previous fix only blocked the first request (for example by checking a header or method) but did not block subsequent requests such as a browser reload.
Impact
The exposed information was low severity in this case, but could be high to critical if it contained personal data.
What the attacker needed
Access to the metrics endpoint URL; use of a web browser to reload the page
The fix
The fix should be tested thoroughly with all reproduction methods to ensure the endpoint is properly blocked.
How it was found
- Visit the metrics URL and receive a 404 error.
- Reload the page in the browser.
- Observe the disclosure of garbage collection cycle information.
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 web server sometimes shows a 'not found' page but still has the real content behind it. Here, simply refreshing the page in a browser made the server return the hidden metrics page, which listed internal details about how the server manages memory. This is a problem because such details can help an attacker understand the system.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.