🚨 Critical Vulnerability CVE-2026-34950 Impacts fast-jwt Library
CVE-2026-34950 is a critical vulnerability affecting the fast-jwt library up to version 6.1.0. A regex flaw allows JWT algorithm confusion attacks. Update fast-jwt to mitigate.
Published April 6, 2026 · Updated April 6, 2026
CVE-2026-34950 is a critical vulnerability with a CVSS score of 9.1 in the fast-jwt library, affecting versions 6.1.0 and earlier. The issue arises from a regex flaw that allows leading whitespace in the public key string, potentially enabling a JWT algorithm confusion attack similar to CVE-2023-48223. Security teams should update to the latest version of fast-jwt to mitigate this vulnerability.
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.
CVE-2026-34950 is a critical vulnerability affecting the fast-jwt library up to version 6.1.0. A regex flaw allows JWT algorithm confusion attacks. Update fast-jwt to mitigate.