Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. fast-jwt
  4. ›
  5. CVE-2026-107724

CVE-2026-107724: fast-jwt treats raw public JWK JSON as an HMAC secret, enabling HS256 token forgery

October 8, 2026

fast-jwt 6.2.4 silently classifies raw serialized public JWK JSON as an HMAC secret.

If an application supplies public JWK JSON text as the verifier key and HS256 is explicitly allowed or automatically inferred, an attacker who knows the same public JSON text can use it as an HMAC key and create an arbitrary HS256 token that fast-jwt accepts as valid.

This can result in authentication or authorization bypass through forged JWT claims.

The PoC demonstrates the issue with a serialized RSA public JWK. The same non-PEM classification also applies to raw JWKS JSON text, although the attached standalone PoC focuses on the smallest JWK case.

References

  • github.com/advisories/GHSA-g3jj-5cmm-3hxx
  • github.com/nearform/fast-jwt/commit/10f9591349199ed2ab9fa1748ce92cdca697f6cf
  • github.com/nearform/fast-jwt/pull/636
  • github.com/nearform/fast-jwt/releases/tag/v6.3.0
  • github.com/nearform/fast-jwt/security/advisories/GHSA-g3jj-5cmm-3hxx
  • nvd.nist.gov/vuln/detail/CVE-2026-107724

Code Behaviors & Features

Detect and mitigate CVE-2026-107724 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 6.2.4 before 6.3.0

Fixed versions

  • 6.3.0

Solution

Upgrade to version 6.3.0 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-347: Improper Verification of Cryptographic Signature

Source file

npm/fast-jwt/CVE-2026-107724.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:47 +0000.