{"id":"CVE-2026-107722","published":"2026-10-08T21:49:55Z","modified":"2026-10-13T16:26:25Z","title":"fast-jwt: Incomplete patch of CVE-2026-34950: Non-whitespace key-prefix re-enables RSA→HS256 algorithm confusion","vendor":"nearform","product":"fast-jwt","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00505,"percentile":0.36312,"provenance":"source"},"cwes":[{"id":"CWE-347","name":"Improper Verification of Cryptographic Signature"}],"references":[{"url":"https://github.com/nearform/fast-jwt/security/advisories/GHSA-ww5h-9m49-7xx4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/nearform/fast-jwt/pull/632","tags":["x_refsource_MISC"]},{"url":"https://github.com/nearform/fast-jwt/commit/d96bbc6c5336055a6dbfa318fdbab01197264cfa","tags":["x_refsource_MISC"]},{"url":"https://github.com/nearform/fast-jwt/releases/tag/v6.3.0","tags":["x_refsource_MISC"]}],"priority":{"score":14.1,"factors":[{"name":"EPSS percentile","points":7.26},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"nearform","affectedVersions":[{"vendor":"nearform","product":"fast-jwt","versions":[">= 6.2.0, < 6.3.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-10-13T16:26:04.072306Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"fast-jwt","vulnerableRanges":[">=6.2.0, <6.3.0"],"patched":["6.3.0"],"from":["GHSA-ww5h-9m49-7xx4"],"provenance":"source"}],"summary":{"text":"fast-jwt (nearform) has a key-type confusion flaw in its public-key detection logic (src/crypto.js): RSA public-key text with non-whitespace content before its PEM header can be misclassified as an HMAC secret, because the PEM matcher is start-anchored. An attacker who knows the public key bytes can forge HS256-signed tokens with arbitrary claims, bypassing authentication or authorization, over the network without credentials or user interaction, provided HS256 is inferred or allowed by the verifier's configuration.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-23T07:21:11Z"},"euvd":{"id":"EUVD-2026-95347","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-nearform-fast-jwt-cve-2023-48223","parents":[{"from":"CVE-2023-48223","to":"CVE-2026-107722","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/crypto.js"],"commits":["https://github.com/nearform/fast-jwt/commit/15a6e92c9adb39acde41a9b11cec0cbde8ad763b","https://github.com/nearform/fast-jwt/commit/d96bbc6c5336055a6dbfa318fdbab01197264cfa"],"basis":"shared function","functions":["cacheSet","performDetectPrivateKeyAlgorithm"]}]}],"children":[{"from":"CVE-2026-107722","to":"CVE-2026-107724","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/crypto.js"],"commits":["https://github.com/nearform/fast-jwt/commit/d96bbc6c5336055a6dbfa318fdbab01197264cfa","https://github.com/nearform/fast-jwt/commit/10f9591349199ed2ab9fa1748ce92cdca697f6cf"],"basis":"shared function","functions":["cacheSet","performDetectPrivateKeyAlgorithm"]},{"kind":"similar","provenance":"machine","score":0.54,"basis":"same product + CWE + description similarity"}]}]}}