Cookie missing the HttpOnly flag
The report claims that several cookies set by the site lack the HttpOnly flag, which would allow client-side scripts to access them. The author states this is not a vulnerability but a security improvement, and that an attacker could steal or modify the cookies via cross-site scripting (XSS).
Originally disclosed on HackerOne
- Disclosed after 31 days
Hello coinbase,
Iam saikiran.Iam a security researcher.while i was going through your site i found that your website does not have HTTPOnly flag for the cookies.it is not a vulnerability but it is a new improvement and improves the security of your site.
If your not aware of HTTPOnly flag here is a small description..
HTTPOnly flag means - no cookie for you..if the HttpOnly flag is included in the HTTP response header, the cookie cannot be accessed through client side script . As a result, even if a cross-site scripting (XSS) flaw exists, and a user accidentally accesses a link that exploits this flaw, the browser will not reveal the cookie to a third party.If HTTPOnly flaf is missing, As a result, the cookie (typically your session cookie) becomes vulnerable to theft of modification by malicious script.This may allow an attacker to get the cookie information using XSS attacks. The majority of XSS attacks target theft of session cookies. A server could help mitigate this issue by setting the HTTPOnly flag on a cookie it creates, indicating the cookie should not be accessible on the client.
Iam listing down the cookies which are missing the HTTPOnly flag... • __cfduid • request_method • return_to • _cb_cookie_test
want to know more about httponly flag... https://www.owasp.org/index.php/HttpOnly...
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
If an XSS vulnerability exists, an attacker could steal or modify the cookies, potentially leading to session hijacking.
What the attacker needed
An XSS vulnerability on the site; victim visits a malicious link
The fix
The cookies should be set with the HttpOnly flag to prevent client-side script access.
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.
Cookies are small pieces of data that websites store in your browser, often used to keep you logged in. The HttpOnly flag is a setting that tells the browser to hide the cookie from JavaScript, so if a malicious script runs on the page, it cannot read the cookie. Without this flag, a script could potentially steal the cookie and use it to impersonate the user.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.