Read the docs
TI-2026-27243 Aliases CVE-2026-35040GHSA-3j8v-cgw4-2g6q

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

Priority MEDIUM 63CWE-440Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · None · Low
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00398 34th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed fast-jwt (nearform): 6.2.1fast-jwt (npm): 6.2.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
nearformfast-jwtbefore 6.2.16.2.1Patch availableCNA
—fast-jwt (npm)before 6.2.16.2.1Patch availableGHSA-3j8v-cgw4-2g6q
  • fast-jwt Vendornearform Affected before 6.2.1 Fixed in 6.2.1 Patch available CNA
  • fast-jwt (npm) Vendor— Affected before 6.2.1 Fixed in 6.2.1 Patch available GHSA-3j8v-cgw4-2g6q

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:*before 6.2.1Vulnerablenearform
  • cpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:* Versions before 6.2.1 Vulnerable ·nearform

Remediation

  • Fix · CNA fast-jwt (nearform) Fixed in 6.2.1
  • Fix · GHSA-3j8v-cgw4-2g6q fast-jwt (npm) Fixed in 6.2.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-35040
  2. 2026-10-03 Alias added: GHSA-3j8v-cgw4-2g6q

References

  • 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-2026-27245 fast-jwt accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation) CVSS 3.1HIGH 7.5
  • TI-2026-27244 ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification CVSS 3.1MEDIUM 6.5
  • TI-2026-27242 Insufficient verification of data authenticity in nearform fast-jwt CVSS 3.1CRITICAL 9.1
  • TI-2023-26087 fast-jwt JWT Algorithm Confusion CVSS 3.1MEDIUM 5.9

Sources