Skip to content
XSS Disclosed report Beginner

Content Sniffing not disabled

The web application did not send the X-Content-Type-Options header with the nosniff value. Some browsers may then guess the content type and treat a text/plain response containing HTML as HTML, which could enable cross-site scripting.

yourdarkshadow Follow

Originally disclosed on HackerOne

  • Fixed in 5 days
  • Disclosed after 50 days

URL :- https://www.secret.ly/

Issue description :- There was no "X-Content-Type-Options" HTTP header with the value nosniff set in the response. The lack of this header causes that certain browsers, try to determine the content type and encoding of the response even when these properties are defined correctly. This can make the web application vulnerable against Cross-Site Scripting (XSS) attacks. E.g. the Internet Explorer and Safari treat responses with the content type text/plain as HTML, if they contain HTML tags.

Issue remediation :- Set the following HTTP header at least in all responses which contain user input: X-Content-Type-Options: nosniff

The original report as published on HackerOne, by yourdarkshadow. 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

The server did not send the X-Content-Type-Options: nosniff header, so some browsers may sniff and reinterpret the declared content type.

Impact

The application could be vulnerable to cross-site scripting in browsers that treat text/plain responses containing HTML tags as HTML, such as Internet Explorer and Safari.

What the attacker needed

Browser that sniffs content types; attacker can place HTML in a response

The fix

The application should send the X-Content-Type-Options: nosniff header at least on all responses that contain user input.

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.

Browsers normally trust the content type a server declares, such as text/plain or text/html. Without a specific header telling them not to guess, some browsers may ignore that label and render a plain-text response as a web page. If an attacker can get HTML into such a response, the browser might run any scripts inside it.

What is XSS?

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

More by yourdarkshadow

View all

6 more disclosed reports, best first.

More from Secret

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.