ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification (nearform fast-jwt)

CVE-2026-35041
MEDIUM 4.2

At a glance

Source
NVD
EPSS
EPSS 0.26 % Β· percentile 18 ()
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
NVD status
Analyzed

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.

Weaknesses (CWE)

  • CWE-1333 β€” Inefficient Regular Expression Complexity

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 4.2CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:HGitHub_M
CVSS 3.1MEDIUM 4.2CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:HNVD Β· security-advisories@github.com (Secondary)
CVSS 3.1MEDIUM 6.5CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD Β· nvd@nist.gov (Primary)

Advisories

European references

Affected configurations (NVD CPE)

Affected products

ProductVersions
nearform Β· fast-jwtaffected >= 5.0.0, < 6.2.1

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST β€” attribution requested
ENISA EUVDENISA β€” reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain β€” this product uses data from the NVD API but is not endorsed or certified by the NVD