External risk intelligence

fast-jwt Cache Key Collision Vulnerability

CVE advisorySeverity: CRITICAL (CVSS 9.1)

CVE-2026-35039

This is a library vulnerability in a Node.js JSON Web Token implementation. It is a build-time dependency integrated into application code rather than a standalone network-facing product, appliance, or service. Exposure depends on how a developer implements the library within their own application, making it inherently unlikely to be a directly reachable public-facing attack surface in standard deployments.

Nearform Fast Jwt

0.1.0 to before 6.1.0

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A vulnerability exists in the fast-jwt library that could allow tokens to be misidentified during verification. This may result in valid tokens incorrectly returning claims from other tokens, leading to users being misidentified. The issue impacts versions prior to 6.2.0 and is addressed in version 6.2.0.

  • Misidentified tokens can impersonate other users.
  • Affects secure authentication and user access.
  • Confirm relevance and exposure in your applications.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this by sending a specially crafted token to an application using a vulnerable version of the fast-jwt library. If the application has a custom cache key builder that doesn't create unique keys for different tokens, this could lead to a cache collision. This may cause the application to incorrectly verify a token, allowing an attacker to impersonate another user by presenting a valid token that returns claims from a different, valid token.

  • No authentication is required.
  • Triggered by sending a token to an application.
  • Risk of user impersonation and data exposure.

Live Threat

Current exploitation, exposure, and threat context

A flaw in how custom cache keys are built in fast-jwt could lead to cache collisions. When supported, this could cause the system to misidentify tokens, potentially serving incorrect user data or claims from one valid token to another.

  • User session data could be at risk.
  • Incorrect tokens may be validated.
  • Users could be misidentified.

Operational Fix

Recommended remediation, mitigation, and detection steps

Application owners and platform teams are likely responsible for addressing this vulnerability, as it affects a library integrated into custom code. The first practical step is to identify all instances of the affected library, confirm if they are used in business-critical or externally reachable components, and then determine the accountable development team. Once identified, a plan for remediation, potentially involving vendor coordination or temporary risk reduction, should be developed based on the assessed risk.

  • Application owners should own the issue.
  • Verify token verification logic and reachability.
  • Plan remediation based on identified risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is fast-jwt?

fast-jwt is a library used in Node.js applications to manage JSON Web Tokens (JWT). It helps developers create, sign, and verify tokens, which are frequently used to handle user sessions and secure API requests. Because it is a library integrated directly into application code, it acts as a building block for authentication systems rather than a standalone product.

How does CVE-2026-35039 cause cache collisions?

The vulnerability involves improper validation and improper handling of cache keys, categorized under CWE-345 and CWE-706. If a developer uses a custom cacheKeyBuilder that fails to generate unique identifiers for different tokens, the application may inadvertently map two distinct tokens to the same cache entry. This leads to a collision where the system returns claims from the wrong token, potentially confusing user identities.

Do I need a custom cacheKeyBuilder to be at risk?

Yes. The vulnerability is specifically triggered when a developer implements a custom cacheKeyBuilder that creates non-unique keys. If your application uses the default caching behavior provided by fast-jwt or does not utilize custom cache key generation, the specific conditions for this collision are not met.

Is my application vulnerable to this issue?

According to Halo Surface Signal, this is a library-level vulnerability, not a standalone service. Whether your application is vulnerable depends entirely on how your developers have implemented the library. Since it is a build-time dependency, the risk is not tied to a specific internet-facing appliance but rather to your custom code logic; it is considered very unlikely to be directly reachable as a generic public attack surface.

How should I respond to CVE-2026-35039?

First, conduct an inventory to locate instances of fast-jwt within your software projects. Determine if any of these implementations use a custom cacheKeyBuilder, as this is the primary requirement for the flaw. If identified, prioritize upgrading to version 6.2.0 or higher, where this caching logic has been patched by the vendor.

References