CVE-2026-107722Critical· 9.8▾ Midnightfast-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, performDe…
▾ Midnight zone — Critical, or high with PoC / in-the-wild
impact 53.9 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
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.
Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
Affected packages:
fast-jwt >= 6.2.0, <= 6.2.4Patched in:
fast-jwt 6.3.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-107724High· 7.4fast-jwt provides fast JSON Web Token (JWT) implementation
CVE-2026-107721Medium· 5.9fast-jwt provides fast JSON Web Token (JWT) implementation
CVE-2026-107723High· 8.1fast-jwt provides fast JSON Web Token (JWT) implementation
CVE-2026-107720High· 7.4fast-jwt provides fast JSON Web Token (JWT) implementation
CVE-2026-107719Medium· 4.2fast-jwt provides fast JSON Web Token (JWT) implementation
CVE-2025-12295Medium· 6.6A weakness has been identified in D-Link DAP-2695 2.00RC13