CVE-2026-107724
Deferred Deferred - Pending Action

HMAC Key Confusion in fast-jwt

Vulnerability report for CVE-2026-107724, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-08

Last updated on: 2026-10-08

Assigner: GitHub, Inc.

Description

fast-jwt provides fast JSON Web Token (JWT) implementation. In 6.2.4, fast-jwt can classify raw serialized public JWK or JWKS JSON as an HMAC secret because src/crypto.js performDetectPublicKeyAlgorithms treats non-PEM strings as symmetric key material. If HS256 is explicitly allowed or inferred, an attacker who knows the exact serialized public-key bytes can use those bytes as an HMAC key and create a token containing arbitrary claims that createVerifier accepts. Serialization ordering or whitespace differences can prevent exploitation, and applications using supported PEM keys with an asymmetric-only algorithm allowlist are not affected. This issue is fixed in version 6.3.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-08
Last Modified
2026-10-08
Generated
2026-10-09
AI Q&A
2026-10-09
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
nearform fast-jwt >= 6.2.4, < 6.3.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-347 The product does not verify, or incorrectly verifies, the cryptographic signature for data.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

fast-jwt versions up to 6.2.4 incorrectly treat raw serialized public JWK or JWKS JSON as HMAC secrets. The library's public key detection function assumes non-PEM strings are symmetric keys, allowing attackers to use public key bytes as HMAC keys if HS256 is allowed. This enables token forgery with arbitrary claims.

Impact Analysis

If you use fast-jwt 6.2.4 or earlier with HS256 or mixed algorithm allowlists, attackers could forge JWT tokens with elevated privileges or false claims. This may lead to unauthorized access, data tampering, or privilege escalation in affected applications.

Compliance Impact

This vulnerability could violate integrity requirements in GDPR and HIPAA by allowing unauthorized data modification. Forged tokens may grant improper access to sensitive data, leading to compliance breaches and potential legal consequences.

Mitigation Strategies

Upgrade fast-jwt to version 6.3.0 or later to address the issue where raw serialized public JWK or JWKS JSON is incorrectly treated as an HMAC secret.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-107724. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart