Skip to content
Info disclosure Disclosed report Beginner

[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.

sp1d3rs Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • 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.

The original report as published on HackerOne, by sp1d3rs. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Visit the /csstest endpoint.
  2. 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.

More by sp1d3rs

View all

62 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.