Intel

AIKIDO-2026-933024

fast-jwt is vulnerable to Authentication Bypass

CVE-2026-107722Published Jul 29, 2026
July 29, 2026

98

CVE Score

Critical

Authentication Bypass

Are you affected? Scan for Free

TL;DR

fast-jwt detects PEM-encoded asymmetric keys by trimming the key and matching a -----BEGIN PUBLIC KEY----- header anchored at the start of the string. Because trimming only removes whitespace, a key carrying any non-whitespace leading bytes (control characters, zero-width unicode, comment or wrapper text) fails the anchored match and falls through to the HMAC verification path, where the public RSA key is used as the HMAC shared secret. As the verification key is public, an attacker can forge an HS256 token keyed with it and have the signature accepted, bypassing verification. The fix locates the PEM header wherever it appears and refuses to use any key containing PEM markers as an HMAC secret.

How do I fix this?

Upgrade the fast-jwt library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application verifies tokens without an algorithms allowlist while loading its verification key from a source that may prepend non-whitespace bytes.

Package

Versions

6.2.0 - 6.2.4

Fixed in 6.3.0

Background info

fast-jwt is vulnerable to Authentication Bypass in versions 6.2.0 - 6.2.4.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea