{"answers":{"affected":"2 open source packages ship an affected version, including fast-jwt. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-35041 exists.","fix":"Upgrade fast-jwt to 6.2.1 or later.","what":"CVE-2026-35041 is a medium-severity denial of service vulnerability in nearform fast-jwt, published on 9 Apr 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-35041 and fix it if it is affected.\n\nWhat it is: CVE-2026-35041 is a medium-severity denial of service vulnerability in nearform fast-jwt, published on 9 Apr 2026. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-35041 exists.\n\nAffected packages and fixed versions:\n- fast-jwt (npm): affected from 5.0.0; fixed in 6.2.1\n- fast-jwt (npm): affected from 5.0.0; fixed in 6.2.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-35041/ (Markdown: https://insights.sbomify.com/CVE-2026-35041/index.md)","id":"CVE-2026-35041","markdown":"https://insights.sbomify.com/CVE-2026-35041/index.md","name":"CVE-2026-35041","record":{"aliases":["GHSA-cjw9-ghj4-fwxf"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":true,"product_category":"JavaScript JWT library","requires_auth":"high_privilege","summary":"Attackers can cause CPU exhaustion in fast-jwt by sending crafted tokens when allowedAud is configured with a vulnerable regular expression.","user_interaction":"required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fast-jwt","vendor":"nearform"}],"cvss":{"score":4.2,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification","id":"CVE-2026-35041","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"denial_of_service","year":"2026"},"n_packages":2,"n_references":4,"next":{"headline":"fast-jwt accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation)","id":"CVE-2026-35042"},"packages":[{"ecosystem":"npm","fixed":["6.2.1"],"introduced":["5.0.0"],"last_affected":[],"package":"fast-jwt","purl":null,"source":"GHSA-cjw9-ghj4-fwxf"},{"ecosystem":"npm","fixed":["6.2.1"],"introduced":["5.0.0"],"last_affected":[],"package":"fast-jwt","purl":"pkg:npm/fast-jwt","source":"GHSA-cjw9-ghj4-fwxf"}],"prev":{"headline":"fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS)","id":"CVE-2026-35040"},"products":["fast-jwt"],"published":"2026-04-09","related":[{"cvss_score":9.1,"headline":"fast-jwt has an incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key","id":"CVE-2026-34950","kev_date_added":null,"published":"2026-04-06"},{"cvss_score":9.1,"headline":"fast-jwt: Cache Confusion via cacheKeyBuilder Collisions Can Return Claims From a Different Token (Identity/Authorization Mixup)","id":"CVE-2026-35039","kev_date_added":null,"published":"2026-04-06"},{"cvss_score":7.5,"headline":"fast-jwt accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation)","id":"CVE-2026-35042","kev_date_added":null,"published":"2026-04-06"},{"cvss_score":5.9,"headline":"fast-jwt JWT Algorithm Confusion","id":"CVE-2023-48223","kev_date_added":null,"published":"2023-11-20"},{"cvss_score":5.3,"headline":"fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS)","id":"CVE-2026-35040","kev_date_added":null,"published":"2026-04-09"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-09","vendors":["nearform"]},"summary":"Attackers can cause CPU exhaustion in fast-jwt by sending crafted tokens when allowedAud is configured with a vulnerable regular expression.","url":"https://insights.sbomify.com/CVE-2026-35041/"}