Skip to content
XSS Advisory Advanced CVE-2026-120930

Incorrect authorization in Blink (CVE-2026-120930)

Chrome's Blink engine did not properly enforce a strict Content Security Policy for external module scripts when 'strict-dynamic' was present. An attacker able to inject HTML could use a modulepreload link to get an external module script executed without a valid nonce or hash, bypassing the CSP that should have blocked it.

lebr0nli Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 5 months

VULNERABILITY DETAILS

Summary

Content Security Policy (CSP) is not properly enforced for external module scripts. Specifically, when 'strict-dynamic' is present, modulepreload may allow an attacker to execute external module scripts without a valid nonce or hash.

Attack Preconditions

The attacker can directly inject a <script> tag and a <link rel="modulepreload"> tag into the HTML content, or inject an <iframe srcdoc=...> with the above tags if the injection happens through innerHTML or similar APIs.

Impact Analysis

If a website's CSP hash-sources and nonce-sources are generated correctly, even if an attacker can inject arbitrary HTML content, they should not be able to make the nonce or integrity metadata match. Therefore, a strict CSP with 'strict-dynamic' should mitigate most XSS attacks if there are no script gadgets in the allowed sources. However, due to this vulnerability, an attacker can bypass the CSP and execute an external module script without a valid nonce or hash.

VERSION

Chrome Version: 148.0.7778.179 Stable

Operating System: Linux, Mac, Windows

This vulnerability is also present in Chrome 150.0.7853.0 Canary.

REPRODUCTION CASE

  1. Create a directory structure like this with the attached files:

    .
    └── index.html
    
  2. Run python3 -m http.server 1337 to start the server.

  3. Visit http://localhost:1337/ with Chrome.

Expected Behavior

The CSP in index.html: script-src 'none'; script-src-attr 'none'; script-src-elem 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'strict-dynamic'; should block the execution of document.body.textContent=`pwned: ${document.domain}`;.

If I understand correctly, the modulepreload fetch is expected to pass the CSP check. As per the HTML spec, the parser metadata in the script fetch options for a modulepreload request is considered not-parser-inserted. As per the CSP spec, not-parser-inserted requests should be allowed if strict-dynamic is present. However, since the parser metadata in the fetch options for <script type=module src=...> is parser-inserted, it should not be allowed to execute without a valid nonce or integrity metadata, even though the module is already preloaded.

Actual Behavior

document.body.textContent=`pwned: ${document.domain}`; is executed, although no meaningful JavaScript should be allowed with this CSP (sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= is the hash of an empty string.)

CREDIT INFORMATION

Reporter credit: lebr0nli of National Yang Ming Chiao Tung University, Dept. of CS, Security and Systems Lab.

The original report as published on the Chromium issue tracker, by lebr0nli of National Yang Ming Chiao Tung University, Dept. of CS, Security and Systems Lab. 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.

How it worked

Impact

An attacker who can inject HTML into a page protected by a strict CSP with 'strict-dynamic' could execute an external module script and run arbitrary JavaScript, defeating the policy's XSS mitigation.

What the attacker needed

Attacker can inject HTML into the page; site uses strict CSP with 'strict-dynamic'; no script gadgets in allowed sources

How it was found

  1. Create a directory containing the provided index.html file.
  2. Start a local web server on port 1337 with Python's http.server module.
  3. Open the local page in Chrome and observe that the script runs despite the strict CSP.

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.

A Content Security Policy is a rule set a website sends to the browser saying which scripts may run. A strict policy normally stops injected scripts from running unless they carry a secret value (a nonce) or match a known fingerprint (a hash). Here the browser wrongly let a script through because of a preloading feature, so an attacker who could inject HTML could run their own code despite the policy.

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 lebr0nli

View all

4 more disclosed reports, best first.

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.