fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS) (nearform fast-jwt)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.38 % Β· percentile 32 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Analyzed
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.
Weaknesses (CWE)
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| 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 | GitHub_M |
| 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 | NVD Β· security-advisories@github.com (Secondary) |
Advisories
- GHSA-3j8v-cgw4-2g6q β fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS)
European references
- ENISA EUVD Β· EUVD-2026-20898
- GCVE Β· GCVE-0-2026-35040
Affected configurations (NVD CPE)
cpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:*< 6.2.1
Affected products
| Product | Versions |
|---|---|
| nearform Β· fast-jwt | affected < 6.2.1 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST β attribution requested |
| ENISA EUVD | ENISA β reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain β this product uses data from the NVD API but is not endorsed or certified by the NVD |