Description
@fastify/jwt is a JSON Web Token plugin for Fastify. In versions before 10.2.2, a per-request verification key passed to request.jwtVerify({ key }) is silently overridden by the plugin's globally configured secret, because the option merge applies the global key last. Applications that use different keys for different authorization domains, for example separate user and admin keys, therefore accept a token signed with the global key on a route that explicitly requires another key. This lets an ordinary authenticated user cross a key-based trust boundary without knowing either secret. The issue is fixed in @fastify/jwt 10.2.2, where an explicit per-call key takes precedence over the global secret. Users should upgrade to 10.2.2.
Published: 2026-08-15
Score: 8.1 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in @fastify/jwt versions prior to 10.2.2. When an application calls request.jwtVerify({ key }) with a per‑request key, the library mistakenly overrides that key with the globally configured secret during option merging. This flaw allows a token signed with the global secret to be accepted on any route that explicitly requires a different key, enabling an authenticated user to cross a key‑based trust boundary without knowledge of any secret. The flaw constitutes an authorization bypass.

Affected Systems

The affected product is the @fastify/jwt JSON Web Token plugin for the Fastify web framework. Versions before 10.2.2 are vulnerable. Applications that configure multiple key domains—such as separate user and admin tokens—are at risk. The issue is fixed in version 10.2.2 and later.

Risk and Exploitability

The CVSS base score of 8.1 indicates a high severity. EPSS is not available, so the current exploitation probability is unknown, but the lack of an entry in the CISA KEV catalog suggests no widespread active exploitation has been reported. The likely attack vector is remote, via the supply of a crafted JWT to a protected route. An attacker who is already authenticated and can produce a valid token using the global secret can impersonate users in tighter privilege domains. Successful exploitation would provide elevated privileges and unauthorized access to protected resources.

Generated by OpenCVE AI on August 15, 2026 at 15:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade @fastify/jwt to version 10.2.2 or later
  • Verify that per-request token verification keys are explicitly supplied on routes requiring distinct domains, rather than relying on the global secret
  • Invalidate existing tokens that may have been issued with the global secret and require users to reauthenticate to ensure no improper cross-domain tokens are in use

Generated by OpenCVE AI on August 15, 2026 at 15:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 15 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Description @fastify/jwt is a JSON Web Token plugin for Fastify. In versions before 10.2.2, a per-request verification key passed to request.jwtVerify({ key }) is silently overridden by the plugin's globally configured secret, because the option merge applies the global key last. Applications that use different keys for different authorization domains, for example separate user and admin keys, therefore accept a token signed with the global key on a route that explicitly requires another key. This lets an ordinary authenticated user cross a key-based trust boundary without knowing either secret. The issue is fixed in @fastify/jwt 10.2.2, where an explicit per-call key takes precedence over the global secret. Users should upgrade to 10.2.2.
Title @fastify/jwt vulnerable to authorization bypass via global secret overriding the per-request key
Weaknesses CWE-347
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-08-15T13:16:12.473Z

Reserved: 2026-07-31T16:13:54.374Z

Link: CVE-2026-18500

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T14:17:07.473

Modified: 2026-08-15T14:17:07.473

Link: CVE-2026-18500

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-15T15:45:06Z

Weaknesses
  • CWE-347

    Improper Verification of Cryptographic Signature