CVE-2026-44351 fast-jwt: Empty HMAC secret accepted via async key resolver - JWT auth bypass
Attackers can forge valid JWTs by exploiting empty HMAC secret handling in async key resolvers, bypassing authentication and gaining unauthorized access.
- 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-44351?
CVE-2026-44351 is a critical authentication bypass vulnerability in nearform fast-jwt, published on 13 May 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. Prior to 6.2.4, a critical authentication-bypass vulnerability in fast-jwt's async key-resolver flow allows any unauthenticated attacker to forge arbitrary JWTs that are accepted as authentic. When the application's key resolver returns an empty string (''), for example via the common keys[decoded.header.kid] || '' JWKS-style fallback, fast-jwt converts it to a zero-length Buffer, hands it to crypto.createSecretKey, derives allowedAlgorithms = ['HS256','HS384','HS512'] from it, and then verifies the token's signature against an empty-key HMAC. The attacker simply computes HMAC-SHA256(key='', input='${header}.${payload}'), which Node accepts without complaint — and the verifier returns the attacker-chosen payload (sub, admin, scopes, etc.) as authentic. This vulnerability is fixed in 6.2.4.
Which versions are affected by CVE-2026-44351?
2 open source packages ship an affected version, including fast-jwt.
| Package | Affected | Fixed in |
|---|---|---|
fast-jwt npm | All versions | 6.2.4 |
fast-jwt npm | All versions | 6.2.4 |
How do I fix CVE-2026-44351?
Upgrade fast-jwt to 6.2.4 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2026-44351 being exploited?
There is no known exploitation of CVE-2026-44351 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-gmvf-9v4p-v8jc.