{"id":"CVE-2026-35041","published":"2026-04-09T14:55:22Z","modified":"2026-04-09T16:15:25Z","title":"ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification","vendor":"nearform","product":"fast-jwt","tier":"tail","description":{"text":"fast-jwt provides fast JSON Web Token (JWT) implementation. From 5.0.0 to 6.2.0, a denial-of-service condition exists in fast-jwt when the allowedAud verification option is configured using a regular expression. Because the aud claim is attacker-controlled and the library evaluates it against the supplied RegExp, a crafted JWT can trigger catastrophic backtracking in the JavaScript regex engine, resulting in significant CPU consumption during verification. This vulnerability is fixed in 6.2.1.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.2,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00445,"percentile":0.30532,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/nearform/fast-jwt/security/advisories/GHSA-cjw9-ghj4-fwxf","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/nearform/fast-jwt/pull/595","tags":["x_refsource_MISC"]},{"url":"https://github.com/nearform/fast-jwt/commit/b0be0ca161593836a153d5180ca5358ad9b5de94","tags":["x_refsource_MISC"]},{"url":"https://github.com/nearform/fast-jwt/releases/tag/v6.2.1","tags":["x_refsource_MISC"]}],"priority":{"score":9.0,"factors":[{"name":"EPSS percentile","points":6.11},{"name":"CVSS severity","points":2.94}]},"vendorSlug":"nearform","affectedVersions":[{"vendor":"nearform","product":"fast-jwt","versions":[">= 5.0.0, < 6.2.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-09T16:14:14.434470Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"fast-jwt","vulnerableRanges":[">=5.0.0, <6.2.1"],"patched":["6.2.1"],"from":["GHSA-cjw9-ghj4-fwxf"],"provenance":"source"}],"summary":{"text":"The fast-jwt JSON Web Token library, a product from nearform, contains a regular expression denial-of-service flaw that affects token verification when the allowedAud option is configured with a RegExp, in versions 5.0.0 through 6.2.0. An attacker who can submit a crafted JWT with a specially constructed aud claim can cause catastrophic regex backtracking, driving CPU consumption high during verification, but this requires the attacker to be able to supply a token (network access), a configuration that uses a RegExp for allowedAud, and user interaction, with the attack complexity being high.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:17:55Z"},"euvd":{"id":"EUVD-2026-20899","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-nearform-fast-jwt-cve-2026-35040","parents":[{"from":"CVE-2026-35040","to":"CVE-2026-35041","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/verifier.js"],"commits":["https://github.com/nearform/fast-jwt/commit/18d25904e4617e8753526d1b3ab5a2cccdea726a","https://github.com/nearform/fast-jwt/commit/b0be0ca161593836a153d5180ca5358ad9b5de94"],"basis":"shared function","functions":["createVerifier"]}]}],"children":[{"from":"CVE-2026-35041","to":"CVE-2026-107720","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/verifier.js"],"commits":["https://github.com/nearform/fast-jwt/commit/e22a151e83bf6d5e54e281216982d204d5665534","https://github.com/nearform/fast-jwt/commit/b0be0ca161593836a153d5180ca5358ad9b5de94"],"basis":"shared function","functions":["createVerifier"]}]},{"from":"CVE-2026-35041","to":"CVE-2026-107721","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/verifier.js"],"commits":["https://github.com/nearform/fast-jwt/commit/c0fb5b88b4c88ff2bdd194ca2c713599ad9e38b6","https://github.com/nearform/fast-jwt/commit/b0be0ca161593836a153d5180ca5358ad9b5de94"],"basis":"shared function","functions":["createVerifier"]}]}],"packageHistory":[{"cve":"CVE-2026-34950","published":"2026-04-06","fixed":"6.2.0","kev":false,"link":{"from":"CVE-2026-34950","to":"CVE-2026-35041","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fast-jwt","fromFixed":"6.2.0","toFixed":"6.2.1","daysApart":3}]}},{"cve":"CVE-2026-35039","published":"2026-04-06","fixed":"6.2.0","kev":false},{"cve":"CVE-2026-35040","published":"2026-04-09","fixed":"6.2.1","kev":false},{"cve":"CVE-2026-35041","published":"2026-04-09","fixed":"6.2.1","kev":false},{"cve":"CVE-2026-44351","published":"2026-05-13","fixed":"6.2.4","kev":false,"link":{"from":"CVE-2026-35041","to":"CVE-2026-44351","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fast-jwt","fromFixed":"6.2.1","toFixed":"6.2.4","daysApart":34}]}},{"cve":"CVE-2026-107721","published":"2026-10-08","fixed":"6.3.0","kev":false},{"cve":"CVE-2026-107722","published":"2026-10-08","fixed":"6.3.0","kev":false}],"package":"npm:fast-jwt"}}