fast-jwt: Empty HMAC secret accepted via async key resolver - JWT auth bypass
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass, Information disclosure
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-287 and CWE-326.
Summary
fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to 6.2.4, a critical authentication-bypass vulnerability in fast-jwt's async key-resolver flow allows any unauthenticated attacker to forge arbitrary JWTs that are accepted as authentic. When the application's key resolver returns an empty string (''), for example via the common keys[decoded.header.kid] || '' JWKS-style fallback, fast-jwt converts it to a zero-length Buffer, hands it to crypto.createSecretKey, derives allowedAlgorithms = ['HS256','HS384','HS512'] from it, and then verifies the token's signature against an empty-key HMAC. The attacker simply computes HMAC-SHA256(key='', input='${header}.${payload}'), which Node accepts without complaint — and the verifier returns the attacker-chosen payload (sub, admin, scopes, etc.) as authentic. This vulnerability is fixed in 6.2.4.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nearform | fast-jwt | before 6.2.4 | 6.2.4 | Patch available | CNA |
| — | fast-jwt (npm) | before 6.2.4 | 6.2.4 | Patch available | GHSA-gmvf-9v4p-v8jc |
- fast-jwt Vendornearform Affected before 6.2.4 Fixed in 6.2.4 Patch available CNA
- fast-jwt (npm) Vendor— Affected before 6.2.4 Fixed in 6.2.4 Patch available GHSA-gmvf-9v4p-v8jc
Remediation
- Fix · CNA fast-jwt (nearform) Fixed in 6.2.4
- Fix · GHSA-gmvf-9v4p-v8jc fast-jwt (npm) Fixed in 6.2.4 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-44351
- 2026-10-03 Alias added: GHSA-gmvf-9v4p-v8jc
References
More nearform vulnerabilities
- TI-2026-69702 Incomplete fix in fast-jwt enables RSA to HS256 algorithm confusion CVSS 3.1CRITICAL 9.8
- TI-2026-27174 fast-jwt has an incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key CVSS 3.1CRITICAL 9.1
- TI-2025-37324 get-jwks poisoned JWKS cache allows post-fetch issuer validation bypass CVSS 3.0CRITICAL 9.4
- TI-2026-27245 fast-jwt accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation) CVSS 3.1HIGH 7.5
- TI-2026-69684 Claim validator bypass in fast-jwt when JWT payload is a JSON array CVSS 3.1HIGH 8.1
- TI-2026-69695 fast-jwt accepts public JWK JSON as HMAC key, enabling token forgery CVSS 3.1HIGH 7.4
Sources
- CVE-2026-44351 · CVE Program
- CVE-2026-44351 · NVD
- FIRST EPSS
- GHSA-gmvf-9v4p-v8jc · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences