Improper Verification of Cryptographic Signature Affecting fast-jwt package, versions >=6.2.0 <6.3.0


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.27% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-FASTJWT-20825047
  • published11 Oct 2026
  • disclosed8 Oct 2026
  • creditDC INFOSEC, SONG JIHOON

Introduced: 8 Oct 2026

NewCVE-2026-107722  (opens in a new tab)
CWE-347  (opens in a new tab)

How to fix?

Upgrade fast-jwt to version 6.3.0 or higher.

Overview

fast-jwt is a Fast JSON Web Token implementation

Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature via the key-type detection logic in src/crypto.js, where a non-whitespace prefix (control characters, zero-width Unicode, comments, HTTP/PGP wrappers, or similar leading bytes) placed before a PEM header causes the ^-anchored PEM matchers to fail, misclassifying an RSA public key as a raw HMAC secret. An attacker can exploit this to forge an HS256 token whose signature is an HMAC computed with the server's RSA public key, bypassing signature verification entirely.

CVSS Base Scores

version 4.0
version 3.1