CVE-2026-35042 fast-jwt accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation)

High 7.5 Published Updated

Attackers can bypass JWT security checks by using unknown critical header extensions, potentially leading to unauthorized access.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-35042?

CVE-2026-35042 is a high-severity vulnerability in nearform fast-jwt, published on 6 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

fast-jwt provides fast JSON Web Token (JWT) implementation. In 6.1.0 and earlier, fast-jwt does not validate the crit (Critical) Header Parameter defined in RFC 7515 §4.1.11. When a JWS token contains a crit array listing extensions that fast-jwt does not understand, the library accepts the token instead of rejecting it. This violates the MUST requirement in the RFC.

Weakness: CWE-636, CWE-345

Which versions are affected by CVE-2026-35042?

2 open source packages ship an affected version, including fast-jwt. It affects 1 product.

PackageAffectedFixed in
fast-jwt npmAll versions to 6.1.0None
fast-jwt npmAll versions to 6.1.0None

Products include Nearform Fast-Jwt.

How do I fix CVE-2026-35042?

No fix has been published for CVE-2026-35042 yet. Limit exposure of the affected software until one is available.

Is CVE-2026-35042 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-35042 exists.

Sources

Also known as GHSA-hm7r-c7qw-ghp6.

Is CVE-2026-35042 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free