Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-35040: CWE-697: Incorrect Comparison in nearform fast-jwt

0
Medium
VulnerabilityCVE-2026-35040cvecve-2026-35040cwe-697cwe-440
Published: Thu Apr 09 2026 (04/09/2026, 14:52:56 UTC)
Source: CVE Database V5
Vendor/Project: nearform
Product: fast-jwt

Description

CVE-2026-35040 affects the fast-jwt library prior to version 6. 2. 1. The vulnerability arises from the use of stateful RegExp modifiers (/g and /y) in certain verification options, causing valid tokens to be rejected in an alternating pattern. This does not allow invalid tokens to be accepted but results in approximately 50% of valid authentication attempts failing intermittently. The issue is fixed in version 6. 2. 1.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/10/2026, 00:36:32 UTC

Technical Analysis

The fast-jwt library versions before 6.2.1 have an incorrect comparison issue due to the use of stateful regular expression modifiers (/g and /y) in the allowedAud, allowedIss, allowedSub, allowedJti, or allowedNonce options during token verification. These modifiers cause the RegExp to maintain state between calls, leading to failures on every second verification attempt regardless of token validity. This results in valid tokens being improperly rejected about half the time. The vulnerability does not allow acceptance of invalid tokens. The problem is resolved in fast-jwt version 6.2.1.

Potential Impact

The impact is limited to availability of authentication services, as about 50% of valid JWT authentication requests may fail intermittently when using affected versions with certain RegExp modifiers. There is no confidentiality or integrity impact since invalid tokens are not accepted. This can cause denial of service for legitimate users relying on fast-jwt for JWT verification under the affected configurations.

Mitigation Recommendations

Upgrade fast-jwt to version 6.2.1 or later where this issue is fixed. Avoid using stateful RegExp modifiers (/g and /y) in the allowedAud, allowedIss, allowedSub, allowedJti, or allowedNonce options in verify functions if upgrading is not immediately possible. Patch status is not explicitly stated but the fix is available in version 6.2.1.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-31T21:06:06.428Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 69d843791cc7ad14da3fb6ab

Added to database: 4/10/2026, 12:25:29 AM

Last enriched: 4/10/2026, 12:36:32 AM

Last updated: 4/10/2026, 2:37:11 AM

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses