CRITICAL🇵🇱 Wersja polska

CVE-2026-34950

CVSS 9.1v3.1pub. 2026-04-06upd. 2026-04-22

fast-jwt provides fast JSON Web Token (JWT) implementation. In 6.1.0 and earlier, the publicKeyPemMatcher regex in fast-jwt/src/crypto.js uses a ^ anchor that is defeated by any leading whitespace in the key string, re-enabling the exact same JWT algorithm confusion attack that CVE-2023-48223 patched.

🤖 AI Analysis
How it works

The regular expression `publicKeyPemMatcher` in the `fast-jwt/src/crypto.js` file uses the `^` anchor, which stops working properly when the public key string is preceded by whitespace characters (e.g., space or newline). An attacker can supply a public key with preceding whitespace, causing the regex to fail to recognize it as a PEM key. As a result, the library incorrectly interprets the JWT token signature algorithm, enabling an algorithm confusion attack — that is, substituting the public key as a symmetric HMAC secret to forge the token signature.

Impact

An attacker can forge a JWT token without knowledge of the server's private key, gaining unauthorized access to authentication-protected resources and potentially modifying token content (e.g., permissions or user identity).

Mitigation & patch

Apply patches available from the vendor according to the references (GHSA-mvf2-f6gm-w987 advisory on GitHub). It is recommended to update the fast-jwt library to a version higher than 6.1.0 as soon as it becomes available from the vendor.

Who is affected

Nearform fast-jwt version 6.1.0 and earlier

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Nearform Fast Jwt

    APP
    Nearform
    < 6.2.0
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
CWE
References

Related vulnerabilities

CVE-2026-35039CRITICAL9.1PL ✓same product

Kolizja cache w fast-jwt prowadząca do błędnej identyfikacji użytkowników

CVE-2026-35042HIGH7.5same product

fast-jwt provides fast JSON Web Token (JWT) implementation. In 6.1.0 and earlier, fast-jwt does not validate t...

CVE-2026-35040MEDIUM5.3same product

fast-jwt dostarcza szybką implementację JSON Web Token (JWT). Przed wersją 6.2.1 użycie określonych modyfikato...

CVE-2026-35041MEDIUM4.2same product

fast-jwt to biblioteka zapewniająca szybką implementację JSON Web Token (JWT). W wersjach od 5.0.0 do 6.2.0 is...

CVE-2023-48223MEDIUM5.9same product

fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to version 3.3.2, the fast-jwt library does ...