Session Cookie Without Secure Flag
The researcher argues that a session cookie issued without the Secure flag can be stolen by a man-in-the-middle attacker, contrary to a triager's claim that an XSS flaw would be needed. The text does not demonstrate an actual theft, only the missing attribute and a disagreement about exploitability.
Originally disclosed on HackerOne
- Disclosed after 23 hours
Summary by the researcher
Hello Everyone, It's not a report. In a comment, Ed @edoverflow said that the cookie Missing 'Secure' Flag requires XSS. But I think that the cookie missing Secure Flag doesn't require XSS. It requires MITM(Man-In-The-Middle). Cookie missing 'HttpOnly'Flag requires XSS. If u think that I'm correct so plz vote up this report. Thanks.
The report
Hi Ed,
The bug mentioned in the report #343095 is not yet correctly patched I believe.
Previously, the Researcher reports that the cookie(_gitlab_session) is not Secure (Missing Secure Flag) and u closed that report as Informative and said that "Expoitability of this issue is so low that it does not warrant an immediate fix. In order to actually exploit this issue you would need to find an XSS vulnerability. Please feel free to prove me wrong by hacking me."
U said: In order to actually exploit this issue you would need to find an XSS vulnerability.
But Let me tell u that it doesn't require XSS to exploit. Insecure HTTPOnly cookies require XSS. It requires MITM(Man-In-The-Middle) Attack to steal that cookie.
I submit this report only for your comment "Please feel free to prove me wrong by hacking me."
Thanks Cheers Anas
Impact
Attacker may steal session cookie through MITM.
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 session cookie was set without the Secure attribute, so the browser could send it over plain HTTP.
Impact
An attacker positioned on the network could intercept the session cookie and use it to act as the victim, though the text shows no working theft.
What the attacker needed
Attacker on the same network path; victim's browser sends cookie over HTTP
The fix
The cookie should be set with the Secure attribute; the text says it is not yet correctly patched.
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 cookie is a small piece of data a site stores in your browser to remember who you are. The Secure flag tells the browser to send that cookie only over encrypted connections, so someone snooping on an unencrypted network cannot read it. Here the flag was missing, meaning the cookie could travel in the clear.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.