CVE-2026-34950 fast-jwt has an incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key

Critical 9.1 Published Updated

An attacker can bypass JWT signature verification by using whitespace-prefixed keys, allowing unauthorized access or token forgery.

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

What is CVE-2026-34950?

CVE-2026-34950 is a critical 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, the publicKeyPemMatcher regex in fast-jwt/src/crypto.js uses a ^ anchor that is defeated by any leading whitespace in the key string, re-enabling the exact same JWT algorithm confusion attack that CVE-2023-48223 patched.

Weakness: CWE-327

Which versions are affected by CVE-2026-34950?

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

PackageAffectedFixed in
fast-jwt npmAll versions6.2.0
fast-jwt npmAll versions6.2.0

Products include Nearform Fast-Jwt.

How do I fix CVE-2026-34950?

Upgrade fast-jwt to 6.2.0 or later.

Is CVE-2026-34950 being exploited?

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

Sources

Also known as GHSA-mvf2-f6gm-w987.

Is CVE-2026-34950 in your software?

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

Check your SBOMs for free