Security Digest · Vulnerability record

CVE-2026-44351: fast-jwt: JWT auth bypass due to empty HMAC secret accepted by async key resolver

fast-jwt provides fast JSON Web Token (JWT) implementation.

CVSS 9.1 Critical EPSS 0.3% · p25

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • EPSS 0.3%, percentile 25: FIRST’s model estimates a 0.3% chance of exploitation activity in the next 30 days, higher than 25% of all scored CVEs (low). EPSS is a probability, not a verdict.
  • Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
  • Only applies if your dependency tree includes fast-jwt (npm) <= 6.2.3, fixed in 6.2.4. Check your lockfile, including transitive dependencies.

What it is

fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to 6.2.4, a critical authentication-bypass vulnerability in fast-jwt's async key-resolver flow allows any unauthenticated attacker to forge arbitrary JWTs that are accepted as authentic. When the application's key resolver returns an empty string (''), for example via the common keys[decoded.header.kid] || '' JWKS-style fallback, fast-jwt converts it to a zero-length Buffer, hands it to crypto.createSecretKey, derives allowedAlgorithms = ['HS256','HS384','HS512'] from it, and then verifies the token's signature against an empty-key HMAC. The attacker simply computes HMAC-SHA256(key='', input='${header}.${payload}'), which Node accepts without complaint — and the verifier returns the attacker-chosen payload (sub, admin, scopes, etc.) as authentic. This vulnerability is fixed in 6.2.4.

From the GitHub advisory

Summary

A critical authentication-bypass vulnerability in fast-jwt's async key-resolver flow allows any unauthenticated attacker to forge arbitrary JWTs that are accepted as authentic. When the application's key resolver returns an empty string (''), for example via the common keys[decoded.header.kid] || '' JWKS-style fallback, fast-jwt converts it to a zero-length Buffer, hands it to crypto.createSecretKey, derives allowedAlgorithms = ['HS256','HS384','HS512'] from it, and then verifies the token's signature against an empty-key HMAC. The attacker simply computes HMAC-SHA256(key='', input='${header}.${payload}'), which Node accepts without complaint — and the verifier returns the attacker-chosen payload (sub, admin, scopes, etc.) as authentic. Reproducible 100% against the current latest release fast-jwt@6.2.3.

Preconditions

For this issue to occur the following MUST ALL be true:

1. The application developer (library consumer) uses an asynchronous callback function to set the key (e.g. createVerifier({key: async (decoded) => ... })) 2. The response from the async callback MUST return an empty string '' OR zero-length buffer (e.g. Buffer.alloc(0)). Any other empty/missing return values (e.g. null, undefined) do not trigger this issue 3. The library configuration must allow HMAC signatures. This is the default for the library. 4. The bad actor MUST have signed their token with an empty string. This is a trivial task and requires no special knowledge. 5. All other aspects of the token (e.g. EXP, IAT claims) MUST be valid. This issue ONLY affects signature checking and all other checks remain enforced.

Weakness type: CWE-287, CWE-326, CWE-1391.

Product: fast-jwt (npm) · Assigned by: GitHub_M · Published: 2026-05-13

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
npmfast-jwt<= 6.2.36.2.4
VendorProductAffected versions (per CVE record)
nearformfast-jwt< 6.2.4

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.1 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHub3.19.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: none
  • Scope: unchanged

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation none, automatable yes, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 0.33% probability of exploitation activity in the next 30 days; percentile 25.

Timeline

  • — GitHub-reviewed advisory GHSA-gmvf-9v4p-v8jc published (critical)
  • — CVE record published by GitHub_M
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-gmvf-9v4p-v8jc github.com
  2. CVE.org record CVE-2026-44351 cve.org
  3. NVD entry CVE-2026-44351 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com

Critical npm advisories · Today’s Security Digest