CVE-2026-35040
MEDIUM 5.3CVSS 3.1fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS)
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.
- Published
- 9 Apr 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-440CWE-697
- Also known as
- GHSA-3j8v-cgw4-2g6q
- Sources
- NVDJSONOSV GHSA-3j8v-cgw4-2g6qJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | nearform | fast-jwtcpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:* |
< 6.2.1 | 6.2.1 |
| OSV | npm | fast-jwt | < 6.2.1 | 6.2.1 |
References
- https://github.com/nearform/fast-jwt/commit/18d25904e4617e8753526d1b3ab5a2cccdea726a · Patch, WEB
- https://github.com/nearform/fast-jwt/pull/593 · Issue Tracking, Patch, WEB
- https://github.com/nearform/fast-jwt/releases/tag/v6.2.1 · Product, Release Notes, WEB
- https://github.com/nearform/fast-jwt/security/advisories/GHSA-3j8v-cgw4-2g6q · Exploit, Mitigation, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-35040 · ADVISORY
- https://github.com/nearform/fast-jwt · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 9 Apr 2026)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 9 Apr 2026)