Cookie HttpOnly Flag Not Set
A cookie was set without the HttpOnly flag, so client-side script could read it. An attacker who achieves cross-site scripting could access the cookie, though the report does not show that this cookie is a session cookie or that exploitation occurred.
- Disclosed after 19 days
Hello, I detected that this cookie was set without the HttpOnly flag. When this flag is not present, it is possible to access the cookie via client-side script code. The HttpOnly flag is a security measure that can help mitigate the risk of cross-site scripting attacks that target session cookies of the victim. If the HttpOnly flag is set and the browser supports this feature, attacker-supplied script code will not be able to access the cookie.
Response: HTTP/1.1 200 OK Connection: keep-alive Server: gunicorn Date: Sat, 10 Dec 2016 20:32:04 GMT Transfer-Encoding: chunked Set-Cookie: csrf_token=UFvQJjblqfHesnXpRwPXM2uIAC1B9hZ4; expires=Sat, 17 Dec 2016 20:32:04 GMT; Path=/; secure X-Gratipay-Version: 2017 X-Frame-Options: SAMEORIGIN Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache X-Content-Type-Options: nosniff X-Xss-Protection: 1; mode=block Via: 1.1 vegur
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 application set the cookie without the HttpOnly attribute in its Set-Cookie header.
Impact
If an attacker could run script on the site, they could read this cookie, but the report does not show that the cookie is a session cookie or that any exploit was carried out.
What the attacker needed
Attacker can run script on the site
The fix
The cookie should be set with the HttpOnly attribute.
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. The HttpOnly flag tells the browser to hide that cookie from JavaScript, so if an attacker manages to run their own script on the page, they cannot read it. Here the flag was missing, which weakens that protection, but the report does not prove the cookie is sensitive or that an attack actually happened.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.