[HTAF4-213] [Pre-submission] HTTPOnly session cookie exposure on the /csstest endpoint
An endpoint reflected request headers, including the HTTPOnly session cookie, into the page. An attacker who also has an XSS could read that cookie and likely bypass authentication.
- Triaged in 13 days
- Fixed in 3.2 years
- Paid in 13 days
- Disclosed after 4.6 years
##Description We were able to identify endpoint which prints request headers into the page. This included sensitive HTTPOnly session cookies which shouldn't be accessible in the DOM.
##POC
https://█████████/csstest
███████
There will be JSESSIONID cookie reflected.
##Suggested fix Remove the page, it's content, or restrict access to it.
Impact
This in combination with any XSS attack will result in session cookie steal and likely authentication bypass (by default this isn't possible because XSS can't access HTTPOnly cookies), since attacker can request /csstest page with XSS and read the response.
We will try to find one and chain the vulns together.
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 debug endpoint echoed request headers, including the Cookie header, into the response body without filtering or access control.
Impact
Combined with an XSS, an attacker could read the session cookie and likely bypass authentication, though by default XSS cannot access HTTPOnly cookies.
What the attacker needed
Access to the /csstest endpoint; an XSS on the same origin to read the response
The fix
The page, its content, or access to it should be removed or restricted.
How it was found
- Visit the /csstest endpoint.
- Observe that the JSESSIONID cookie is reflected in the page.
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.
A session cookie is a token the server gives your browser so it knows you are logged in. HTTPOnly is a setting that stops JavaScript from reading that cookie, which limits damage from cross-site scripting (XSS, where an attacker runs their own script in your page). Here a page printed the cookie into the visible page, so any script on the site could read it.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.