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.ccthird_party/blink/renderer/platform/loader/subresource_integrity.ccservices/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
-
Signature Base Construction (
services/network/public/cpp/sri_message_signatures.cc): During signature verification, Chrome constructs a signature base that includes theUnencoded-Digestheader. 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 likeUnencoded-Digest: sha-384=:<digest>:passes Ed25519 verification if legitimately signed by the origin. -
Digest Extraction (
services/network/public/cpp/unencoded_digests.cc): The extraction logic (ParseUnencodedDigestsFromHeaders, lines 48-84) only recognizessha-256andsha-512. If the header contains other algorithms, such assha-384or misspelled keys, the parser skips them usingcontinue(line 63). The resultingdigestsvector is empty. -
Fail-Open Body Verification (
third_party/blink/renderer/platform/loader/subresource_integrity.cc): The Blink-side verification functionSubresourceIntegrity::CheckUnencodedDigests(lines 174-201) iterates over thedigestsvector. Because the vector is empty, the loop does not execute, and the function returnstrue, indicating success. The body goes completely unverified. -
Signature Verification (
third_party/blink/renderer/platform/loader/subresource_integrity.cc): Finally, Blink verifies the signatures inCheckSignaturesImpl(lines 332-391) by ensuring a parsed signature has akeyidmatching 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.
- A developer implements Signature-based SRI:
<script integrity="ed25519-<pubkey>" src="https://cdn.example.com/script.js"></script>. - The legitimate origin server serves the script with an
Unencoded-Digestheader using an unsupported algorithm, such assha-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>:
- 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. - The browser receives the response. Network-level signature verification succeeds because the headers are unchanged.
- Digest parsing extracts an empty list of digests because
sha-384is unsupported. - Blink's
CheckUnencodedDigestsreceives the empty list, returnstrue, and skips body validation. - 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.
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
- A developer uses Signature-based SRI on a script tag with an Ed25519 public key.
- The origin server serves the script with an Unencoded-Digest header using an unsupported algorithm such as sha-384, correctly signed.
- An on-path attacker intercepts the response and replaces the script body with malicious JavaScript, leaving headers unchanged.
- The browser verifies the signature over the headers successfully because they are unchanged.
- Digest parsing extracts an empty list because sha-384 is unsupported.
- 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.