Input Validation Flaw in fast-jwt by NearForm
CVE-2026-34950
9.1CRITICAL
What is CVE-2026-34950?
The fast-jwt library, utilized for its efficient JSON Web Token (JWT) implementation, contains a vulnerability in versions up to 6.1.0. The issue resides within the publicKeyPemMatcher regex in the crypto.js file, which fails to properly validate the key string due to a ^ anchor being circumvented by any leading whitespace. This flaw reopens risks associated with JWT algorithm confusion attacks, similar to those previously addressed in another CVE. Developers using this library must update to a more secure version to mitigate potential exploitation.
Affected Version(s)
fast-jwt <= 6.1.0
