Skip to content
XSS Advisory Advanced CVE-2026-11038

Insufficient validation of untrusted input in Subresource Integrity (CVE-2026-11038)

Chrome's experimental Signature-based Subresource Integrity implementation fails to verify the resource body when the signed Unencoded-Digest header contains only unsupported hash algorithms. An on-path attacker or compromised CDN could replace the resource body with malicious code while leaving the signed headers intact, bypassing SRI.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: Chrome's experimental Signature-based Subresource Integrity (SRI) implementation skips resource body verification when the Unencoded-Digest header uses unsupported hash algorithms (e.g., sha-384). This allows an attacker to bypass SRI by modifying the resource body while leaving the legitimately signed headers intact.

Affected files:

  • services/network/public/cpp/unencoded_digests.cc
  • third_party/blink/renderer/platform/loader/subresource_integrity.cc
  • services/network/public/cpp/sri_message_signatures.cc

Estimated timestamp from git blame: 2025-07-31

Vulnerability Summary

A logic error in Chrome's experimental Signature-based Subresource Integrity (SRI) implementation leads to a "fail-open" scenario when a resource is served with a signed Unencoded-Digest header containing unrecognized hash algorithms.

Although the browser successfully validates the Ed25519 signature over the response headers, it fails to perform any integrity check on the resource body if it cannot extract a supported digest (currently only SHA-256 and SHA-512 are supported). This allows an on-path attacker or compromised CDN to replace the resource body with arbitrary malicious code, bypassing the security guarantees of SRI.

Technical Analysis

  1. Signature Base Construction (services/network/public/cpp/sri_message_signatures.cc): During signature verification, Chrome constructs a signature base that includes the Unencoded-Digest header. The code (lines 743-752) serializes the dictionary into the base without validating whether the hash algorithms specified within the header are actually supported. Thus, a signature over a header like Unencoded-Digest: sha-384=:<digest>: passes Ed25519 verification if legitimately signed by the origin.

  2. Digest Extraction (services/network/public/cpp/unencoded_digests.cc): The extraction logic (ParseUnencodedDigestsFromHeaders, lines 48-84) only recognizes sha-256 and sha-512. If the header contains other algorithms, such as sha-384 or misspelled keys, the parser skips them using continue (line 63). The resulting digests vector is empty.

  3. Fail-Open Body Verification (third_party/blink/renderer/platform/loader/subresource_integrity.cc): The Blink-side verification function SubresourceIntegrity::CheckUnencodedDigests (lines 174-201) iterates over the digests vector. Because the vector is empty, the loop does not execute, and the function returns true, indicating success. The body goes completely unverified.

  4. Signature Verification (third_party/blink/renderer/platform/loader/subresource_integrity.cc): Finally, Blink verifies the signatures in CheckSignaturesImpl (lines 332-391) by ensuring a parsed signature has a keyid matching the expected public key from the <script> tag. Because the attacker left the headers untouched, this check passes.

Suggested Exploitation Steps (Theoretical)

Note: These are potential steps as we have not verified them with a working exploit.

  1. A developer implements Signature-based SRI: <script integrity="ed25519-<pubkey>" src="https://cdn.example.com/script.js"></script>.
  2. The legitimate origin server serves the script with an Unencoded-Digest header using an unsupported algorithm, such as sha-384, and correctly signs it.
    • Unencoded-Digest: sha-384=:<valid_sha384_digest>:
    • Signature-Input: sig=("unencoded-digest";sf);keyid="<pubkey>";tag="ed25519-integrity"
    • Signature: sig=:<valid_signature>:
  3. An attacker in a MITM position intercepts the request and replaces the script body with malicious JavaScript (e.g., alert(1)), leaving the headers completely unmodified.
  4. The browser receives the response. Network-level signature verification succeeds because the headers are unchanged.
  5. Digest parsing extracts an empty list of digests because sha-384 is unsupported.
  6. Blink's CheckUnencodedDigests receives the empty list, returns true, and skips body validation.
  7. The malicious script is executed, resulting in Cross-Site Scripting (XSS).

Recommendation

If an Unencoded-Digest header is required for signature validation, the system should fail closed if no supported digests can be extracted from it.

Either MaybeBlockResponseForSRIMessageSignature or ParseUnencodedDigestsFromHeaders should be updated to ensure that if the unencoded-digest component is covered by the signature, the resulting list of extracted, supported digests is non-empty. Alternatively, SubresourceIntegrity::CheckUnencodedDigests could be modified to fail if the unencoded_digests vector is empty but a signature validation was performed.

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


Results from 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.

How it worked

Root cause

Likely a fail-open logic error: when the Unencoded-Digest header contains only unsupported hash algorithms, the digest extraction returns an empty list, and the body verification function treats an empty list as success instead of failure.

Impact

An on-path attacker or compromised CDN could replace the resource body with arbitrary malicious code, bypassing SRI and potentially leading to Cross-Site Scripting (XSS).

What the attacker needed

Chrome with experimental Signature-based SRI; Developer uses Signature-based SRI; Origin serves unsupported digest algorithm; Attacker can intercept network traffic

The fix

The system should fail closed if no supported digests can be extracted from a signed Unencoded-Digest header, for example by ensuring the extracted digest list is non-empty or by making CheckUnencodedDigests fail when the digest vector is empty but a signature was validated.

How it was found

  1. A developer uses Signature-based SRI on a script tag with an Ed25519 public key.
  2. The origin server serves the script with an Unencoded-Digest header using an unsupported algorithm such as sha-384, correctly signed.
  3. An on-path attacker intercepts the response and replaces the script body with malicious JavaScript, leaving headers unchanged.
  4. The browser verifies the signature over the headers successfully because they are unchanged.
  5. Digest parsing extracts an empty list because sha-384 is unsupported.
  6. Blink's CheckUnencodedDigests receives the empty list, returns true, and skips body validation, so the malicious script executes.

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.

Subresource Integrity (SRI) is a browser feature that checks a downloaded script or stylesheet against a known hash to ensure it hasn't been tampered with. In this experimental version, the browser checks a digital signature on the response headers but then forgets to check the actual file content if the header uses an unsupported hash algorithm. An attacker who can intercept network traffic could swap the file for malicious code, and the browser would still run 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 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.