CVE-2026-44351: CWE-287: Improper Authentication in nearform fast-jwt
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.
AI Analysis
Technical Summary
fast-jwt is a JSON Web Token implementation. Before version 6.2.4, if the application's key resolver returns an empty string (e.g., via a fallback like keys[decoded.header.kid] || ''), fast-jwt converts this to a zero-length Buffer and uses it as the secret key for HMAC verification. This results in allowed algorithms ['HS256','HS384','HS512'] being derived from an empty key. An attacker can compute an HMAC-SHA256 with an empty key and any payload, which Node.js accepts, causing the verifier to accept attacker-forged tokens as authentic. This is an improper authentication vulnerability (CWE-287) that enables token forgery. The issue is resolved in fast-jwt version 6.2.4.
Potential Impact
An unauthenticated attacker can forge arbitrary JWTs that the application accepts as valid, potentially allowing unauthorized access or privilege escalation. The vulnerability affects confidentiality and integrity of authentication tokens but does not impact availability. The CVSS score is 9.1 (critical), reflecting the ease of exploitation and high impact on confidentiality and integrity.
Mitigation Recommendations
A fix is available in fast-jwt version 6.2.4. Users should upgrade to version 6.2.4 or later to remediate this vulnerability. Since this is a cloud service, the vendor manages remediation for the cloud-hosted service; users should verify with the vendor that their environment is updated. Patch status is confirmed as fixed in 6.2.4. No additional mitigations are specified.
CVE-2026-44351: CWE-287: Improper Authentication in nearform fast-jwt
Description
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.
CVSS v3.1
Score 9.1critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
fast-jwt is a JSON Web Token implementation. Before version 6.2.4, if the application's key resolver returns an empty string (e.g., via a fallback like keys[decoded.header.kid] || ''), fast-jwt converts this to a zero-length Buffer and uses it as the secret key for HMAC verification. This results in allowed algorithms ['HS256','HS384','HS512'] being derived from an empty key. An attacker can compute an HMAC-SHA256 with an empty key and any payload, which Node.js accepts, causing the verifier to accept attacker-forged tokens as authentic. This is an improper authentication vulnerability (CWE-287) that enables token forgery. The issue is resolved in fast-jwt version 6.2.4.
Potential Impact
An unauthenticated attacker can forge arbitrary JWTs that the application accepts as valid, potentially allowing unauthorized access or privilege escalation. The vulnerability affects confidentiality and integrity of authentication tokens but does not impact availability. The CVSS score is 9.1 (critical), reflecting the ease of exploitation and high impact on confidentiality and integrity.
Mitigation Recommendations
A fix is available in fast-jwt version 6.2.4. Users should upgrade to version 6.2.4 or later to remediate this vulnerability. Since this is a cloud service, the vendor manages remediation for the cloud-hosted service; users should verify with the vendor that their environment is updated. Patch status is confirmed as fixed in 6.2.4. No additional mitigations are specified.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-05T19:52:59.148Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
- Is Cloud Service
- true
Threat ID: 6a04d644cbff5d861003f201
Added to database: 05/13/2026, 19:51:32 UTC
Last enriched: 05/21/2026, 12:17:38 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 98
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.
External Links
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.