CVE-2026-107722 Details
Description
fast-jwt provides fast JSON Web Token (JWT) implementation. From 6.2.0 until 6.3.0, fast-jwt can misclassify RSA public-key text as an HMAC secret when the key has non-whitespace content before its PEM header. In src/crypto.js, performDetectPublicKeyAlgorithms trims whitespace but publicKeyPemMatcher remains start-anchored, so comments, control characters, zero-width characters, or wrapper text can prevent PEM detection and reach the HMAC fallback. An attacker who knows the public key bytes can sign arbitrary HS256 claims with that public material when HS256 is inferred or allowed, resulting in authentication or authorization bypass. An asymmetric-only algorithm allowlist prevents the attack. This issue is fixed in version 6.3.0.
A vulnerability in fast-jwt versions 6.2.0 through 6.2.4 allows RSA public keys to be incorrectly treated as HMAC secrets. This misclassification occurs when non-whitespace characters precede the PEM header of the key, such as comments or control characters. As a result, an attacker who knows the public key bytes can forge HS256 JWT claims by exploiting this algorithm confusion, leading to authentication or authorization bypass. The issue has been fixed in fast-jwt version 6.3.0.
Users can upgrade to fast-jwt version 6.3.0 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 8, 2026CISA-ADP
Assessed Oct 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/nearform/fast-jwt/security/advisories/GHSA-ww5h-9m49-7xx4 | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/nearform/fast-jwt/commit/d96bbc6c5336055a6dbfa318fdbab01197264cfa | [email protected] | Source CodeVendor |
| https://github.com/nearform/fast-jwt/pull/632 | [email protected] | Source CodeVendor |
| https://github.com/nearform/fast-jwt/releases/tag/v6.3.0 | [email protected] | Release NotesVendor |
| https://github.com/nearform/fast-jwt/security/advisories/GHSA-ww5h-9m49-7xx4 | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-347 | Improper Verification of Cryptographic Signature | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| fast-jwt | >= 6.2.0, <= 6.2.4 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 13, 2026 | CVE Modified | CISA-ADP |
| Oct 8, 2026 | New CVE Received | [email protected] |
Volerion