CVE-2026-107724: fast-jwt JWK JSON HMAC secret misclassification in HS256 verification

CVE-2026-107724 · Severity: high · CVSS 7.4 · Published 2026-10-08

fast-jwt is a Node.js library for signing and verifying JSON Web Tokens (JWTs), which are used for authentication and authorization. The library incorrectly treats raw public JWK (JSON Web Key) text as an HMAC secret key, allowing an attacker who knows the public key JSON to forge valid authentication tokens and bypass authentication or authorization checks.

Technologies: Fast-Jwt, fast-jwt (npm). Vendors: Fast-Jwt, npm.

Quick answers

Is CVE-2026-107724 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-107724 being exploited in the wild.
How severe is CVE-2026-107724?
High severity, with a CVSS score of 7.4, published 8 October 2026.
Which products and versions are affected?
Fast-Jwt 6.2.4; fast-jwt (npm) = 6.2.4, SEMVER:introduced=6.2.4,fixed=6.3.0.
Is there a fix for CVE-2026-107724?
Yes. fast-jwt (npm): upgrade to 6.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-107724 attacked?
It is attacked over the network.
Am I affected by CVE-2026-107724?
Check whether you run Fast-Jwt or fast-jwt (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • fast-jwt (npm): upgrade to 6.3.0 or later
    npm install fast-jwt@6.3.0

Technical details

The vulnerability exists in the key algorithm detection logic in src/crypto.js, where any non-PEM string that doesn't match RSA public key patterns is classified as an HMAC secret and permitted for HS256 verification. An attacker supplying a serialized public JWK or JWKS JSON as the verifier key can calculate a valid HS256 HMAC signature using the known public JSON bytes as the key, resulting in forged JWT claims being accepted. Exploitation requires that the application uses raw JSON text as the verifier key, permits or infers HS256 algorithms, and the attacker knows the exact serialized bytes of the key material.

Affected products

  • fast-jwt fast-jwt 6.2.4

Identifiers

  • CVE-2026-107724
  • GHSA-g3jj-5cmm-3hxx

Timeline

  • 2026-10-08: disclosed

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.