NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-109841: undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens

mediumCVSS 3.1 5.9GHSA-f72v-6w45-q472

undici's fetch() skips Subresource Integrity checks when the algorithm token is not lowercase, such as SHA256-... or Sha256-.... A server can then return a body that differs from the pinned digest and it is accepted. Affects undici 7.15.0 up to 7.30.0 and 8.0.0 up to 8.12.1. Fixed in 7.30.1 and 8.12.2.

Published Oct 23, 2026 · Analysis Nov 2, 2026

What an attacker can do

fetch() looks up the SRI algorithm token in a lowercase-only set. The SRI specification defines a valid token by its ASCII-lowercase form, so SHA256-... is valid. undici treated it as unknown and skipped it. When no recognized algorithm remained, it treated the integrity list as empty and accepted the response.

An application that pins a download with an uppercase or mixed-case token therefore gets no integrity protection. An attacker who controls the response body, for example through a compromised CDN, a hijacked mirror or a man-in-the-middle position, can serve different bytes and trigger no error. The attacker does not need to touch the application's integrity metadata. The impact is on integrity only. If the fetched bytes are a script, a config or a binary that the app then uses, the consequence can be larger.

The regression began in undici 7.15.0. Releases 7.14.0 and earlier lowercase the token and are not affected. The CVSS vector rates attack complexity as high because of the need to control the response.

Who is affected

undici >= 7.15.0 and < 7.30.1, and >= 8.0.0 and < 8.12.2. Versions 7.14.0 and earlier, and the 6.x line, are not listed. Only apps that pass integrity metadata with a non-lowercase token to fetch() are exposed. Node.js bundles its own undici, so check both the package and the runtime.

npm ls undici

undici

Ecosystem
npm
Affected
>= 7.15.0, < 7.30.1
Fixed in
7.30.1
Check
npm ls undici

undici

Ecosystem
npm
Affected
>= 8.0.0, < 8.12.2
Fixed in
8.12.2
Check
npm ls undici

How to fix it

Upgrade to undici 7.30.1 or 8.12.2:

npm install [email protected]

or

npm install [email protected]

The fix normalizes the algorithm token to ASCII lowercase before validating it and before choosing the strongest algorithm. The advisory's workaround is to write integrity metadata with lowercase tokens: sha256, sha384 and sha512.

How to tell if you were hit

Search your code for fetch calls that set an integrity option, and for stored integrity strings that start with SHA256-, SHA384-, SHA512- or any mixed-case form. Those are the cases that were skipped. Run npm ls undici in each project and image to find affected versions. The failure is silent, so logs show no error. Re-verify downloaded artifacts by hashing them out of band.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

undici's fetch() verifies Subresource Integrity (SRI) metadata by looking up the algorithm token in a lowercase-only set, but the SRI specification defines a valid token by its ASCII-lowercase form. A correct but non-lowercase token such as SHA256-... or Sha256-... is therefore treated as unknown and skipped. When no recognized algorithm remains, undici treats the integrity list as empty and accepts the response, so a server that returns a body different from the pinned digest passes the check.

An application that pins a response with a valid uppercase or mixed-case SRI token receives attacker-controlled bytes with no integrity error. The attacker needs only to control the response body, not the application's integrity metadata. The issue affects response integrity only. The regression was introduced in undici 7.15.0; releases 7.14.0 and earlier lowercase the token and are not affected.

Patches

Upgrade to 7.30.1 or 8.12.2. undici now normalizes the algorithm token to ASCII lowercase before validating it and before selecting the strongest algorithm, so case variants of SHA-256, SHA-384, and SHA-512 are verified correctly.

Workarounds

Use lowercase algorithm tokens (sha256, sha384, sha512) in integrity metadata.

Credited to Kushalkhemka, mayank-jangid-moon, skigeek16, opensec-intelligence, mcollina, UlisesGascon.

Questions

Does a lowercase sha256 token avoid the bug?

Yes. The advisory gives lowercase sha256, sha384 and sha512 tokens in integrity metadata as the workaround. The lookup only failed for non-lowercase forms.

Is undici 7.14.0 affected?

No. The regression was introduced in 7.15.0. Releases 7.14.0 and earlier lowercase the token.

Does this leak data or crash the app?

No. The impact is on response integrity only. A mismatched body is accepted without an integrity error.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More npm vulnerabilities

All npm entries