{"answers":{"affected":"2 open source packages ship an affected version, including fast-jwt.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-107722 exists.","fix":"Upgrade fast-jwt to 6.3.0 or later.","what":"CVE-2026-107722 is a critical authentication bypass vulnerability in nearform fast-jwt, published on 8 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-107722 and fix it if it is affected.\n\nWhat it is: CVE-2026-107722 is a critical authentication bypass vulnerability in nearform fast-jwt, published on 8 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-107722 exists.\n\nAffected packages and fixed versions:\n- fast-jwt (npm): affected from 6.2.0; fixed in 6.3.0\n- fast-jwt (npm): affected from 6.2.0; fixed in 6.3.0\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-107722/ (Markdown: https://insights.sbomify.com/CVE-2026-107722/index.md)","id":"CVE-2026-107722","markdown":"https://insights.sbomify.com/CVE-2026-107722/index.md","name":"CVE-2026-107722","record":{"aliases":["GHSA-ww5h-9m49-7xx4"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript JWT library","requires_auth":"none","summary":"Attackers can bypass authentication by exploiting algorithm confusion in fast-jwt when public keys have non-whitespace prefixes, allowing HS256 token forgery.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-347","name":"Improper Verification of Cryptographic Signature"}],"description":"fast-jwt provides fast JSON Web Token (JWT) implementation. From 6.2.0 until 6.3.0, fast-jwt can misclassify RSA public-key text as an HMAC secret when the key has non-whitespace content before its PEM header. In src/crypto.js, performDetectPublicKeyAlgorithms trims whitespace but publicKeyPemMatcher remains start-anchored, so comments, control characters, zero-width characters, or wrapper text can prevent PEM detection and reach the HMAC fallback. An attacker who knows the public key bytes can sign arbitrary HS256 claims with that public material when HS256 is inferred or allowed, resulting in authentication or authorization bypass. An asymmetric-only algorithm allowlist prevents the attack. This issue is fixed in version 6.3.0.","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":"fast-jwt: Incomplete patch of CVE-2026-34950: Non-whitespace key-prefix re-enables RSA→HS256 algorithm confusion","id":"CVE-2026-107722","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"auth_bypass","year":"2026"},"n_packages":2,"n_references":4,"next":{"headline":"fast-jwt : Silent claim-validator bypass when JWT payload is a JSON array","id":"CVE-2026-107723"},"packages":[{"ecosystem":"npm","fixed":["6.3.0"],"introduced":["6.2.0"],"last_affected":[],"package":"fast-jwt","purl":null,"source":"GHSA-ww5h-9m49-7xx4"},{"ecosystem":"npm","fixed":["6.3.0"],"introduced":["6.2.0"],"last_affected":[],"package":"fast-jwt","purl":"pkg:npm/fast-jwt","source":"GHSA-ww5h-9m49-7xx4"}],"prev":{"headline":"fast-jwt clockTolerance: Infinity silently bypasses both exp and nbf validation (and persists in the verifier cache)","id":"CVE-2026-107721"},"products":["fast-jwt"],"published":"2026-10-08","related":[],"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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-10-13","vendors":["nearform"]},"summary":"Attackers can bypass authentication by exploiting algorithm confusion in fast-jwt when public keys have non-whitespace prefixes, allowing HS256 token forgery.","url":"https://insights.sbomify.com/CVE-2026-107722/"}