Quick answers
- Is CVE-2026-35041 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-35041 being exploited in the wild.
- How severe is CVE-2026-35041?
- Medium severity, with a CVSS score of 4.2, published 9 April 2026.
- Which products and versions are affected?
- fast-jwt (npm) SEMVER:introduced=5.0.0,fixed=6.2.1.
- Is there a fix for CVE-2026-35041?
- Yes. fast-jwt (npm): upgrade to 6.2.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-35041 attacked?
- It is attacked over the network.
- Am I affected by CVE-2026-35041?
- Check whether you run Nearform Fast-Jwt or fast-jwt (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- fast-jwt (npm): upgrade to 6.2.1 or later
npm install fast-jwt@6.2.1
Technical details
The vulnerability is a Regular Expression Denial of Service (ReDoS) affecting fast-jwt versions 5.0.0 through 6.2.0 when claim validation options (allowedAud, allowedIss, allowedSub, allowedJti, allowedNonce) are configured with RegExp objects containing nested quantifiers. An attacker-controlled JWT claim is matched against the supplied pattern without backtracking protection, triggering exponential time complexity. For example, a pattern like /^(a+)+X$/ matched against a string of repeated 'a' characters causes verification time to grow from ~123ms at 24 characters to ~7.85 seconds at 30 characters. Exploitability requires a validly signed JWT and application use of vulnerable regex patterns—not a pre-authentication DoS, but exploitable in authenticated or OAuth/OIDC token validation flows. The fix in version 6.2.1 adds regex safety validation and complexity limits; mitigation guidance recommends string-based patterns instead of RegExp objects.
Affected products
- NearForm fast-jwt 5.0.0 to 6.2.0
Identifiers
- CVE-2026-35041
- GHSA-cjw9-ghj4-fwxf
Timeline
- 2026-04-09: disclosed
- 2026-04-09: patched: Version 6.2.1 released