CVE-2026-35040

fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS)

MEDIUM
5.3
CVSS Score
Published: April 9, 2026 at 02:52 PM UTC
Updated: June 17, 2026 at 10:40 AM UTC
1 product affected across 1 vendorFast Jwt

Using fast-jwt by nearform?

Get instant alerts when new vulnerabilities affect fast-jwt - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 0.4%
SSVC
PoC

Description

fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to 6.2.1, using certain modifiers on RegExp objects in the allowedAud, allowedIss, allowedSub, allowedJti, or allowedNonce options in verify functions can cause certain unintended behaviours. This is because some modifiers are stateful and will cause failures in every second verification attempt regardless of the validity of the token provided. Such modifiers are /g (global matching) and /y (sticky matching). This does NOT allow invalid tokens to be accepted, only for valid tokens to be improperly rejected in some configurations. Instead it causes 50% of valid authentication requests to fail in an alternating pattern. This vulnerability is fixed in 6.2.1.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 6.2.1
Affected range stops below 6.2.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

x_refsource_CONFIRMExploitMitigationVendor Advisory
Source: cverecord
https://github.com/nearform/fast-jwt/security/advisories/GHSA-3j8v-cgw4-2g6q
x_refsource_MISCIssue TrackingPatch
Source: cverecord
https://github.com/nearform/fast-jwt/pull/593
x_refsource_MISCProductRelease Notes
Source: cverecord
https://github.com/nearform/fast-jwt/releases/tag/v6.2.1

SSVC — Action Prioritization

SSVCPoCAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.3MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
LOW
Vector?

Quick Info

StatusANALYZED
CWE
CWE-697CWE-440

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card