fast-jwt vulnerability allows attackers to bypass JWT claim validation checks
A flaw in the fast-jwt library permits JSON array payloads to skip security validators, enabling bypass of expiry and issuer checks.

Key points
- CVE-2026-107723 is rated CVSS 8.1 High severity
- Versions prior to 6.3.0 fail to reject array payloads
- Patched version 6.3.0 is available for npm
The nearform fast-jwt library contains a high-severity vulnerability that allows attackers to bypass critical JSON Web Token (JWT) security checks. The flaw, tracked as CVE-2026-107723, affects versions prior to 6.3.0 and has been assigned a CVSS score of 8.1.
At a glance
- CVE
- CVE-2026-107723
- Product
- nearform fast-jwt
- CVSS
- 8.1 High
- Weakness
- CWE-1287
- Exploited
- No known exploitation
The vulnerability exists because the library’s decoder accepts JSON arrays as valid payloads, even though the JWT specification requires claims sets to be JSON objects. When an attacker presents a validly signed token with an array payload, the verifier silently skips all configured claim validators. This includes checks for expiration, issuer, audience, subject, and replay protection. The library returns the array as a successfully verified payload, effectively neutralizing these security controls.
Technical Context
According to the National Vulnerability Database, the issue stems from inadequate input validation in the `src/decoder.js` file. The code checks that the payload is an object but fails to explicitly reject arrays. In JavaScript, the `typeof` operator returns "object" for arrays, allowing them to pass the initial validation step.
The GitHub security advisory for GHSA-5hjw-83fp-phq9 explains that the verifier’s claim validation loop relies on the `in` operator to check for specific claim names like `exp`, `nbf`, `iss`, `aud`, `sub`, `jti`, and `nonce`. Because arrays only have numeric indices and a length property, these named properties are never found. Consequently, the loop continues without executing any validation logic for these claims.
This behavior violates RFC 7519 Section 7.2, which mandates that the JWT Claims Set must be a JSON object. While signature verification remains intact and is not bypassed, the loss of claim validation undermines the token’s integrity guarantees. The advisory notes that the optional `requiredClaims` configuration can block missing claims, but this does not mitigate the core issue of skipped validators for standard claims.
Who Is Affected
The vulnerability affects all applications using the `fast-jwt` npm package in versions 6.2.4 and earlier. Developers who rely on the library’s default behavior for enforcing token expiration, issuer trust, or audience restrictions are exposed to potential exploitation.
An attacker who can produce or influence a validly signed token can exploit this flaw. By crafting a token with an array payload, they can bypass expiry, issuer, audience, subject, revocation, and replay protections. This allows for the use of expired tokens or tokens issued by unauthorized parties, provided the cryptographic signature is valid.
What should you do?
The vendor has released version 6.3.0, which fixes the vulnerability by adding the necessary guard to reject array payloads. Users should update their dependencies to this patched version immediately.
What to do and how to stay safe: fast-jwt
- Audit your npm dependencies to check if you are using fast-jwt version 6.2.4 or earlier.
- Upgrade to fast-jwt version 6.3.0 or later to apply the vendor-provided fix.
- Review your JWT verification logic to ensure payloads are strictly validated as objects.
- Monitor logs for any tokens with unusual payload structures that might indicate exploitation attempts.
Step-by-step guide: Risk Based Vulnerability Management: Prioritize Fixes by Actual Threat
General security guidance from the Threat Times newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
What is the severity of CVE-2026-107723?
The vulnerability is rated High severity with a CVSS score of 8.1.
Which versions of fast-jwt are vulnerable?
All versions prior to 6.3.0 are affected, including version 6.2.4.
Does this vulnerability bypass signature verification?
No, signature verification itself is not bypassed, but claim validations like expiry and issuer checks are skipped.


