Skip to content
XSS Disclosed report Beginner

HttpOnly Flag not set

A cookie was set without the HttpOnly flag, so JavaScript on the page could read it. If an attacker could run a script on the site, they could steal the cookie and send it elsewhere.

secachhunew Follow

Originally disclosed on HackerOne

Informational View original
  • Fixed in 4 hours
  • Disclosed after 22 days

A cookie has been set without the HttpOnly flag, which means that the cookie can be accessed by JavaScript. If a malicious script can be run on this application then the cookie will be accessible and can be transmitted to another site.

HTTP/1.1 200 OK Server: nginx Date: Wed, 26 Apr 2017 08:27:17 GMT Content-Type: text/html; charset=utf-8 Connection: close Vary: Accept-Encoding Vary: Accept-Encoding X-XSS-Protection: 1; mode=block Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' stats.cihar.com; script-src 'self' 'unsafe-inline' cdnjs.cloudflare.com stats.cihar.com; connect-src 'self' api.rollbar.com; object-src 'none'; child-src 'none'; frame-ancestors 'none'; Content-Language: en Vary: Cookie, Accept-Language ETag: W/"ff14ef4db73c24a6ed8819291ad57358" X-Frame-Options: SAMEORIGIN Set-Cookie: csrftoken=6Z5qdWjjwMwKO8RDp687iboelfA31rlu37AeDGGn6zQX2FmjEaBdV6Uae3PzrTYR; expires=Wed, 25-Apr-2018 08:27:17 GMT; Max-Age=31449600; Path=/; secure Set-Cookie: django_language=en; Path=/ Strict-Transport-Security: max-age=31536000; includeSubdomains; X-Content-Type-Options: nosniff Content-Length: 30247

The original report as published on HackerOne, by secachhunew. 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 application set a cookie without the HttpOnly attribute.

Impact

If an attacker can run a script on the application, they could read the cookie and transmit it to another site; the report does not show that such script execution is possible.

What the attacker needed

Attacker can run a script on the site

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 a website stores in your browser. The HttpOnly flag tells the browser to hide a cookie from JavaScript, so a malicious script cannot read it. Here the flag was missing, so a script injected into the page could read the cookie and send it to an attacker.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Weblate

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.