Vulnerability · Published Apr 9, 2026 · Assigned by GitHub_M

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

Medium 4.2

In plain English

A medium-severity regular-expression denial of service in fast-jwt from nearform. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 20% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)4.2Medium
Exploit odds (30 days)0.3%top 80.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmfast-jwt6.2.1GHSA-cjw9-ghj4-fwxf

Affected products (as reported)

VendorProductVersions
nearform fast-jwt >= 5.0.0, < 6.2.1

Weakness: CWE-1333 · Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H

References