CVE-2026-34950Published Apr 6, 2026 · Apr 6Updated Oct 28
fast-jwt has an incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key
nearform fast-jwt
Critical9.1Fix available
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| fast-jwt npm |
|
|
Original 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.
From the CVE record · GitHub_M