# CVE-2026-35041: ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification

- Severity: Medium 4.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 21% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-09T14:55:22.807Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-cjw9-ghj4-fwxf
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- nearform fast-jwt: >= 5.0.0, < 6.2.1; from 5.0.0 before 6.2.1
- fast-jwt (npm): from 5.0.0 before 6.2.1

## Every score

- GitHub_M: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/nearform/fast-jwt/security/advisories/GHSA-cjw9-ghj4-fwxf> (exploit, mitigation, vendor-advisory, web)
- <https://github.com/nearform/fast-jwt/pull/595> (issue-tracking, patch, web)
- <https://github.com/nearform/fast-jwt/commit/b0be0ca161593836a153d5180ca5358ad9b5de94> (patch, web)
- <https://github.com/nearform/fast-jwt/releases/tag/v6.2.1> (product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-35041> (advisory)
- <https://github.com/nearform/fast-jwt> (package)

## Sources

- CVE List: [CVE-2026-35041](https://www.cve.org/CVERecord?id=CVE-2026-35041), CVE Terms of Use, modified 2026-04-09
- GitHub Advisory Database: [GHSA-cjw9-ghj4-fwxf](https://github.com/advisories/GHSA-cjw9-ghj4-fwxf), CC-BY-4.0, modified 2026-04-09
- NVD: [CVE-2026-35041](https://nvd.nist.gov/vuln/detail/CVE-2026-35041), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-35041 · Whole record: https://cve.day/CVE-2026-35041.json · Rebuilt by cve.day 2026-11-25T22:59:18.377Z
