CVE-2026-107724: CWE-347: Improper Verification of Cryptographic Signature in nearform fast-jwt
Description
CVE-2026-107724 is a high-severity vulnerability in nearform's fast-jwt library versions 6.2.4 up to but not including 6.3.0. The issue arises because the library incorrectly treats raw serialized public JWK or JWKS JSON strings as symmetric HMAC keys when HS256 is allowed or inferred. This allows an attacker who knows the exact serialized public key bytes to create a malicious token with arbitrary claims that the verifier accepts. The vulnerability is fixed in version 6.3.0.
CVSS v3.1
Score 7.4high
Affected software
nearform
fast-jwt
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The fast-jwt library version 6.2.4 improperly verifies cryptographic signatures due to incorrect classification of raw serialized public JWK or JWKS JSON as HMAC secret keys. Specifically, the function src/crypto.js performDetectPublicKeyAlgorithms treats non-PEM strings as symmetric key material. If the HS256 algorithm is allowed or inferred, an attacker who knows the exact serialized public key bytes can use those bytes as an HMAC key to forge tokens with arbitrary claims that pass verification. Variations in serialization ordering or whitespace can prevent exploitation. Applications using PEM keys with an asymmetric-only algorithm allowlist are not affected. The vulnerability is resolved in version 6.3.0.
Potential Impact
An attacker with knowledge of the exact serialized public key bytes can forge JSON Web Tokens containing arbitrary claims that the token verifier accepts, potentially leading to unauthorized access or privilege escalation. The vulnerability affects confidentiality and integrity of JWT validation. There is no known exploitation in the wild as of the published date.
Mitigation Recommendations
Upgrade fast-jwt to version 6.3.0 or later, where this issue is fixed. Applications using supported PEM keys with an asymmetric-only algorithm allowlist are not affected. No other mitigations are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-08T17:21:52.976Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ac8135c2cdf04f6563b0c76
Added to database: 10/08/2026, 22:04:12 UTC
Last enriched: 10/08/2026, 22:18:32 UTC
Last updated: 10/08/2026, 22:19:11 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.