Impact
The vulnerability occurs when fast‑jwt’s async key resolver returns an empty string. The library treats this as a zero‑length buffer, and Node’s crypto module accepts HMACs computed with an empty key. An attacker can therefore forge a JWT whose signature verifies against this empty key, setting arbitrary claims such as user id, role, or scopes. This flaw permits unauthorized elevation of privileges and maps to several weaknesses, including authentication failure (CWE‑287), cryptographic key weakness (CWE‑326), and failure to restrict input (CWE‑1391). The CVSS score of 9.1 reflects the high impact on confidentiality, integrity, and availability.
Affected Systems
The flaw affects the Nearform fast‑jwt JWT library. Any version prior to 6.2.4 is vulnerable. Applications that use the async key‑resolver path and allow an empty key—such as the common JWKS‑style pattern “keys[decoded.header.kid] || ''”—are at risk. If your project depends on fast‑jwt, verify that you are running 6.2.4 or later; otherwise the bug remains present.
Risk and Exploitability
With a CVSS score of 9.1 the risk is high. The EPSS score is not available, so the exact exploitation probability is unknown, but the flaw requires the key resolver to return an empty string—a configuration issue that many deployments may contain. An attacker can forge arbitrary JWTs to impersonate users, gain administrative access, or manipulate scopes. The vulnerability is not listed in the CISA KEV catalogue, but the seriousness of the flaw demands immediate action. The likely attack path is an application that resolves a missing key by defaulting to an empty string and a malicious actor leveraging a forged token in their requests.
OpenCVE Enrichment
Github GHSA