Skip to content
Crypto Advisory Advanced CVE-2026-13876

Inappropriate implementation in Network (CVE-2026-13876)

A logic error in the Network Service's SRI Message Signature validation causes signature base construction to fall back to an empty string when a required header is missing, instead of failing. An attacker who can obtain a valid Ed25519 signature for the empty string could serve a malicious script that bypasses subresource integrity checks.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 months

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: A logic error in the Network Service's SRI Message Signature validation allows an attacker to bypass subresource integrity checks. If a required HTTP header like Unencoded-Digest is missing, the signature base construction fails but erroneously falls back to an empty string instead of aborting. An attacker can exploit this by serving a malicious script without an Unencoded-Digest header and providing a valid Ed25519 signature for the empty string.

Affected files:

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

Estimated timestamp from git blame: 2025-07-31

Description

A potential logic error exists in services/network/public/cpp/sri_message_signatures.cc that allows an attacker to bypass Subresource Integrity (SRI) Message Signatures.

When ValidateSRIMessageSignaturesOverHeaders attempts to verify a signature, it calls ConstructSignatureBase to generate the message that was signed. According to RFC 9421, if a required component (such as the mandatory unencoded-digest or another requested HTTP header) is missing from the response, signature base construction must fail. Indeed, ConstructSignatureBase correctly returns std::nullopt in this scenario (line 731).

However, ValidateSRIMessageSignaturesOverHeaders incorrectly handles this return value at lines 806-808:

C++
    std::string signature_base =
        ConstructSignatureBase(message_signature, url_request, headers)
            .value_or("");

By using .value_or(""), a failure in signature base construction results in the verification proceeding with a 0-byte (empty) string. ED25519_verify is then called against this empty string.

Simultaneously, in Blink (third_party/blink/renderer/platform/loader/subresource_integrity.cc:174-200), if the Unencoded-Digest HTTP header is completely omitted from the response, CheckUnencodedDigests trivially returns true, skipping the validation of the response body. Blink's subsequent signature check (CheckSignaturesImpl) relies on the Network Service having already cryptographically validated the signature, only verifying that the keyid matches the expected public key.

This coupling allows an attacker to completely decouple the signature from the payload, bypassing SRI if they can obtain a signature for the empty string.

Potential Steps to Reproduce

Note: These are suggested/potential steps derived from code analysis; our tooling agent does not have the ability to run code to produce a live proof-of-concept.

  1. A victim visits a page with a script protected by signature-based SRI: <script src="..." integrity="ed25519-<PUBKEY>">.
  2. An attacker intercepts the request and serves a malicious script payload (e.g., alert(1)).
  3. The attacker obtains a valid Ed25519 signature for the empty string "" under <PUBKEY> (e.g., via cross-protocol key reuse, an endpoint that signs arbitrary input, or a signing oracle).
  4. The attacker crafts the HTTP response with the following headers:
    • Signature-Input: sig1=("unencoded-digest");keyid="<PUBKEY>";tag="ed25519-integrity"
    • Signature: sig1=:<SIG_OF_EMPTY_STRING>:
  5. Crucially, the attacker omits the Unencoded-Digest HTTP header entirely.
  6. The Network Service attempts to construct the signature base, fails because Unencoded-Digest is missing, defaults to "", and successfully verifies the attacker's empty-string signature. The response is permitted.
  7. Blink receives the response. Because Unencoded-Digest is missing, CheckUnencodedDigests succeeds. CheckSignaturesImpl finds the keyid matches and allows the malicious script to execute.

Suggested Fix

In services/network/public/cpp/sri_message_signatures.cc, do not use .value_or("") when constructing the signature base. Instead, fail the validation if ConstructSignatureBase returns std::nullopt:

C++
    std::optional<std::string> signature_base_opt =
        ConstructSignatureBase(message_signature, url_request, headers);
    if (!signature_base_opt.has_value()) {
      AddIssueFromErrorEnum(
          mojom::SRIMessageSignatureError::kValidationFailedSignatureMismatch, // Or a new, more specific error enum
          message_signatures->issues);
      return false;
    }
    std::string signature_base = signature_base_opt.value();

Additionally, consider hardening Blink's Resource::CheckResourceIntegrity to explicitly fail if signature-based SRI is required but the Unencoded-Digest header is missing.

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


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.

How it worked

Impact

An attacker who can obtain a valid Ed25519 signature for the empty string could bypass signature-based subresource integrity and execute a malicious script in a victim's browser.

What the attacker needed

Victim loads a page with signature-based SRI; attacker can intercept the response; attacker can obtain an Ed25519 signature for the empty…

The fix

The code should fail validation when signature base construction returns no value, rather than substituting an empty string, and Blink should explicitly fail if signature-based SRI is required but the Unencoded-Digest header is missing.

How it was found

  1. A victim visits a page with a script protected by signature-based SRI.
  2. An attacker intercepts the request and serves a malicious script payload.
  3. The attacker obtains a valid Ed25519 signature for the empty string under the expected public key.
  4. The attacker crafts the response with Signature-Input and Signature headers but omits the Unencoded-Digest header.
  5. The Network Service fails to construct the signature base, defaults to an empty string, and verifies the attacker's empty-string signature.
  6. Blink sees the missing Unencoded-Digest header, skips digest validation, and allows the malicious script to execute.

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 or signature, so a tampered file is rejected. Here, the code that builds the message to verify made a mistake: when a required header was missing, it used an empty message instead of stopping. That means someone who can get a signature for an empty message could slip a malicious script past the check.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.