Inappropriate implementation in Network (CVE-2026-14001)
Chrome's MIME sniffing logic fails to recognise the X-Content-Type-Options: nosniff directive when multiple such headers are present, because it performs a strict equality check against the concatenated header values. An attacker who can cause duplicate nosniff headers could bypass MIME sniffing protection and potentially achieve XSS if they can upload an HTML file to an endpoint that serves it with a missing or unknown Content-Type.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 43 days
Flapjack, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: Chrome's MIME sniffing logic fails to recognize the X-Content-Type-Options: nosniff directive if multiple such headers are present in the HTTP response. The code incorrectly uses a strict string equality check against the concatenated header values (e.g., "nosniff, nosniff"). This bypass can lead to Cross-Site Scripting (XSS) if an attacker can upload an HTML file to an endpoint that outputs duplicate nosniff headers.
Affected files:
services/network/public/cpp/header_util.ccthird_party/blink/common/loader/mime_sniffing_throttle.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
Description
There is a potential bypass of the X-Content-Type-Options: nosniff security mitigation when a server responds with multiple instances of the header.
In services/network/public/cpp/header_util.cc (ShouldSniffContent) and third_party/blink/common/loader/mime_sniffing_throttle.cc (MimeSniffingThrottle::WillProcessResponse), Chrome determines if MIME sniffing should be disabled. To do this, the code retrieves the header using net::HttpResponseHeaders::GetNormalizedHeader("x-content-type-options").
When multiple headers of the same name exist in an HTTP response, GetNormalizedHeader coalesces their values into a single comma-separated string (e.g., nosniff, nosniff). The code then performs a strict case-insensitive equality check on the entire concatenated string:
// From services/network/public/cpp/header_util.cc
bool sniffing_blocked =
base::EqualsCaseInsensitiveASCII(content_type_options, "nosniff");
Because "nosniff, nosniff" does not strictly equal "nosniff", sniffing_blocked evaluates to false. As a result, Chrome proceeds with MIME sniffing even when the server explicitly intended to block it.
Potential Impact
If an attacker can cause a response to include multiple nosniff headers (e.g., via HTTP header injection, or a server/CDN misconfiguration where multiple layers append the header), they can bypass the MIME sniffing protection. If the server serves user-uploaded content with a missing or unknown Content-Type, Chrome will fall back to sniffing the content. An attacker-uploaded payload containing HTML would be sniffed as text/html instead of safely defaulting to text/plain, potentially leading to Cross-Site Scripting (XSS).
Suggested Attacker Steps
Note: These are potential steps to trigger the vulnerability, as our tooling agent cannot execute live code to provide a working proof of concept.
- An attacker identifies a target application that allows file uploads but serves them with an empty
Content-Type. - The server attempts to mitigate XSS by applying
X-Content-Type-Options: nosniff, but a misconfiguration (or header injection vulnerability) allows the attacker to force a secondnosniffheader in the HTTP response. - The attacker uploads a malicious file containing HTML and JavaScript:
<html><script>alert(origin)</script></html>. - A victim is tricked into navigating to the uploaded file's URL.
- Chrome receives the response containing multiple
X-Content-Type-Options: nosniffheaders. GetNormalizedHeadercoalesces them into the single string"nosniff, nosniff".- The strict
EqualsCaseInsensitiveASCIIcheck inShouldSniffContentfails, returningfalseforsniffing_blocked. - Chrome's
URLLoadersees that sniffing is allowed. It inspects the initial bytes of the payload, matches the<html>tag, and updates the response MIME type totext/html. - The Blink renderer processes the response as an HTML document, executing the malicious JavaScript in the context of the target application.
Recommended Fix
According to the Fetch specification, the browser should split the X-Content-Type-Options header values by commas and check if the first value is a case-insensitive match for "nosniff".
The checks in services/network/public/cpp/header_util.cc and third_party/blink/common/loader/mime_sniffing_throttle.cc should be updated to use net::HttpUtil::ValuesIterator to safely parse the header string. This would match the more robust specification-compliant logic currently implemented for Opaque Response Blocking (ORB) in services/network/orb/orb_impl.cc (HasNoSniff).
Evaluated with Chrome root at commit: b7d0c4d810da1b31400f198c70d9720fc8f0e5a0
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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 code uses a strict string equality check on the entire concatenated value of the X-Content-Type-Options header instead of parsing it as a comma-separated list.
Impact
If an attacker can cause a response to include multiple nosniff headers, they can bypass the MIME sniffing protection and potentially achieve XSS if the server serves user-uploaded content with a missing or unknown Content-Type.
What the attacker needed
Target allows file uploads; serves uploads with empty Content-Type; attacker can force duplicate nosniff headers; victim navigates to uploaded file URL
The fix
The checks should be updated to use net::HttpUtil::ValuesIterator to safely parse the header string, matching the specification-compliant logic already implemented for Opaque Response Blocking.
How it was found
- An attacker identifies a target application that allows file uploads but serves them with an empty Content-Type.
- The server attempts to mitigate XSS by applying X-Content-Type-Options: nosniff, but a misconfiguration (or header injection vulnerability) allows the attacker to force a second nosniff header in the HTTP response.
- The attacker uploads a malicious file containing HTML and JavaScript.
- A victim is tricked into navigating to the uploaded file's URL.
- Chrome receives the response containing multiple X-Content-Type-Options: nosniff headers.
- GetNormalizedHeader coalesces them into the single string "nosniff, nosniff".
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.
When a website tells the browser 'do not guess the file type' using a special header called nosniff, the browser should obey. But if the server accidentally sends that header twice, Chrome gets confused and ignores the instruction, so it guesses the file type anyway. If an attacker uploaded an HTML file, Chrome might then run its JavaScript, which is a cross-site scripting (XSS) attack.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.