{"cve":"CVE-2026-35040","nvd":{"published":"2026-04-09T16:16:27.213","modified":"2026-10-26T21:10:00.170","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3},"cwes":["CWE-440","CWE-697"],"references":["https://github.com/nearform/fast-jwt/commit/18d25904e4617e8753526d1b3ab5a2cccdea726a","https://github.com/nearform/fast-jwt/pull/593","https://github.com/nearform/fast-jwt/releases/tag/v6.2.1","https://github.com/nearform/fast-jwt/security/advisories/GHSA-3j8v-cgw4-2g6q"],"products":["nearform:fast-jwt"],"source":"nvd","synced_at":"2026-10-26T21:38:48.864438205+00:00"},"epss":{"cve":"CVE-2026-35040","score":0.00383,"percentile":0.32076,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-3j8v-cgw4-2g6q","url":"https://osv.dev/vulnerability/GHSA-3j8v-cgw4-2g6q","summary":"fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS)","modified":"2026-04-09T19:17:26.846555Z","packages":[{"ecosystem":"npm","name":"fast-jwt","purl":"pkg:npm/fast-jwt","ranges":["<6.2.1"],"fixed":["6.2.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}