Skip to content
Heist/ feed
High

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

Type: advisorySource: Official CVE List1 source record

fast-jwt provides fast JSON Web Token (JWT) implementation. In 6.2.4, fast-jwt can classify raw serialized public JWK or JWKS JSON as an HMAC secret because src/crypto.js performDetectPublicKeyAlgorithms treats non-PEM strings as symmetric key material. If HS256 is explicitly allowed or inferred, an attacker who knows the exact serialized public-key bytes can use those bytes as an HMAC key and create a token containing arbitrary claims that createVerifier accepts. Serialization ordering or whitespace differences can prevent exploitation, and applications using supported PEM keys with an asymmetric-only algorithm allowlist are not affected. This issue is fixed in version 6.3.0.

Announced Source revision 1
Original source ↗

CVE-2026-107724

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-107724

fast-jwt

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "nearform",
    "product": "fast-jwt",
    "versions": [
      {
        "status": "affected",
        "version": ">= 6.2.4, < 6.3.0"
      }
    ]
  }
]
Related CVEs
CVE-2026-107724

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#16337 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement