ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-35041
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 6 Nov 2026, 19:24 UTC · Revision 1
Source evidence
ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification
core-osv · Original sourcePublished 9 Apr 2026, 14:55 UTC
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.
osv:CVE-2026-35041
Complete source record
{
"id": "16492ec2d0f2923864c42534a0d24e212118b68163714b11037a78ac34236dbd",
"url": "https://osv.dev/vulnerability/CVE-2026-35041",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification",
"summary": "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.",
"evidence": "osv:CVE-2026-35041",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2026-35041",
"aliases": [
"CVE-2026-35041",
"GHSA-cjw9-ghj4-fwxf"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/nearform/fast-jwt",
"type": "GIT",
"events": [
{
"introduced": "72f91b547f5dca90715a70ff3cbaa042e40d8803"
},
{
"fixed": "6b13fe96614a38613d453f46ba0631c4cd09dcd8"
},
{
"fixed": "b0be0ca161593836a153d5180ca5358ad9b5de94"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "5.0.0"
},
{
"fixed": "6.2.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "b0be0ca161593836a153d5180ca5358ad9b5de94"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "6b13fe96614a38613d453f46ba0631c4cd09dcd8"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v6.2.1"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-35041.json"
}
}
],
"modified": "2026-10-28T02:30:48.032848807Z",
"provider": "osv",
"references": [
"https://github.com/nearform/fast-jwt/releases/tag/v6.2.1",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/35xxx/CVE-2026-35041.json",
"https://github.com/nearform/fast-jwt/security/advisories/GHSA-cjw9-ghj4-fwxf",
"https://nvd.nist.gov/vuln/detail/CVE-2026-35041",
"https://github.com/nearform/fast-jwt/commit/b0be0ca161593836a153d5180ca5358ad9b5de94",
"https://github.com/nearform/fast-jwt/pull/595"
],
"provider_metadata": {
"cwe_ids": [
"CWE-1333"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/35xxx/CVE-2026-35041.json"
}
},
"related_cves": [
{
"value": "CVE-2026-35041",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 515966,
"published_at": "2026-04-09T14:55:22.807+00:00"
}