Session Cookie Without Secure Flag,
The GitLab session cookie was issued without the Secure flag, so a browser could send it over plain HTTP. An attacker able to intercept that clear-text traffic could steal the cookie and take over the victim's session.
Originally disclosed on HackerOne
- Disclosed after 21 hours
Assigned to:-ED Assigned by:- Kirtikumar Anandrao Ramchandani Assigned on:- 25/04/2018 Bug overview:- Session Cookie without secure flag. Cookie Name:- _gitlab_session Description:-Risk description: Since the Secure flag is not set on the cookie, the browser will send it over an unencrypted channel (plain HTTP) if such a request is made. Thus, the risk exists that an attacker will intercept the clear-text communication between the browser and the server and he will steal the cookie of the user. If this is a session cookie, the attacker could gain unauthorized access to the victim's web session. Recommendation:I recommend reconfiguring the web server in order to set the flag(s) Secure to all sensitive cookies. Reference:-https://blog.dareboost.com/en/2016/12/secure-cookies-secure-httponly-flags/.
Impact
The secure flag is an option that can be set by the application server when sending a new cookie to the user within an HTTP Response. The purpose of the secure flag is to prevent cookies from being observed by unauthorized parties due to the transmission of a the cookie in clear text. To accomplish this goal, browsers which support the secure flag will only send cookies with the secure flag when the request is going to a HTTPS page. Said in another way, the browser will not send a cookie with the secure flag set over an unencrypted HTTP request. By setting the secure flag, the browser will prevent the transmission of a cookie over an unencrypted channel.
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
Impact
An attacker who can intercept clear-text traffic could steal the session cookie and gain unauthorised access to the victim's web session.
What the attacker needed
Victim's traffic sent over plain HTTP; attacker can intercept network traffic
The fix
The web server should be reconfigured so that the Secure flag is set on all sensitive cookies.
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 website stores in your browser to remember who you are. The Secure flag tells the browser to only send that cookie over an encrypted (HTTPS) connection. Without it, the cookie can travel in plain text, and anyone listening on the network could copy it and pretend to be you.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.