CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-107721

CVE-2026-107721: Time Validation Bypass in NearForm fast-jwt due to Loose Temporal Option Validation

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 9, 2026·6 min read·15 visits

Executive Summary (TL;DR)

A flaw in fast-jwt prior to v6.3.0 permits non-finite values (such as Infinity) to bypass validation during verifier initialization. This causes token expiration and activation checks to succeed unconditionally, resulting in complete bypass of JWT expiration controls.

NearForm fast-jwt prior to version 6.3.0 is vulnerable to an input validation flaw where configuring verifier properties (such as clockTolerance, clockTimestamp, and cacheTTL) with non-finite values like Infinity or NaN allows attackers to bypass temporal claim validations, including expiration (exp) and activation (nbf) boundaries. This validation bypass can result in unauthorized session persistence and cache poisoning.

Vulnerability Overview

The JSON Web Token (JWT) library fast-jwt is optimized for high-performance claim verification in Node.js applications. A critical aspect of JWT verification is checking temporal boundaries, specifically that the token has not expired (exp claim) and is currently active (nbf claim). The vulnerability surfaces when initializing the verifier using the createVerifier function with specific temporal configuration arguments.

Prior to version 6.3.0, fast-jwt failed to enforce strict finiteness constraints on parameters including clockTolerance, clockTimestamp, and cacheTTL. The library verified that these parameters were of type 'number' and not less than zero, but did not assert that they were finite values. Under JavaScript's type specification, Infinity is a primitive value of type 'number', meaning it bypassed the library's initial validation checks.

When a backend application exposes configuration options or parses environment variables that feed into createVerifier without strict sanitization, an attacker or misconfiguration can specify Infinity as the value for clockTolerance. This results in the complete negation of temporal validation rules, causing the verifier to accept expired or inactive tokens unconditionally.

Root Cause Analysis

The root cause of this vulnerability lies in the loose validation logic within src/verifier.js and JavaScript's handling of non-finite numbers. The original validation pattern checked whether options were defined, of the 'number' type, and positive. Because typeof Infinity evaluates to 'number' and the comparison Infinity < 0 yields false, the value Infinity successfully passes this validation block.

When verifying a token, fast-jwt calculates the adjusted expiration time by adding the clockTolerance to the token's exp claim, represented as: adjustedExpiration = payload.exp * 1000 + clockTolerance. If clockTolerance is Infinity, the math evaluates as: payload.exp * 1000 + Infinity = Infinity. The temporal verification check subsequently compares the current system epoch time (now) to the adjusted expiration: now <= Infinity. Since any finite current time is less than or equal to Infinity, this validation always evaluates to true, causing expired tokens to be accepted.

This flaw also affects the Not-Before (nbf) activation claim. The adjusted activation boundary is calculated as: adjustedNotBefore = payload.nbf * 1000 - clockTolerance. With clockTolerance set to Infinity, this calculation yields -Infinity. The verifier checks if now >= -Infinity, which always evaluates to true. This enables the successful use of tokens intended for future execution. Additionally, because validation states are stored in an internal Least Recently Used (LRU) cache, these infinite bounds poison cache keys, keeping entries valid indefinitely.

Code Analysis

An examination of the vulnerable code in src/verifier.js reveals how loose validation permitted non-finite numbers to pass through checks:

// Vulnerable Code Path
if (clockTolerance && (typeof clockTolerance !== 'number' || clockTolerance < 0)) {
  throw new TokenError(TokenError.codes.invalidOption, 'The clockTolerance option must be a positive number.')
}

The validation block only executed if clockTolerance was truthy. A value of NaN is falsy, allowing it to bypass the validation block entirely and reach calculation phases, where it caused different analytical errors. For Infinity, the condition typeof clockTolerance !== 'number' evaluated to false, and clockTolerance < 0 also evaluated to false, allowing the configuration to be set.

To correct this, the patch introduced explicit checks for defined options (rather than truthiness checks) and added the Number.isFinite() validation check:

// Patched Code Path in src/verifier.js
if (
  clockTolerance !== undefined &&
  (typeof clockTolerance !== 'number' || !Number.isFinite(clockTolerance) || clockTolerance < 0)
) {
  throw new TokenError(
    TokenError.codes.invalidOption,
    'The clockTolerance option must be a finite, non-negative number.'
  )
}

By checking clockTolerance !== undefined, the parser ensures that falsy but invalid values like NaN trigger an exception instead of bypassing validation. Applying !Number.isFinite() explicitly identifies and blocks Infinity, -Infinity, and NaN, restricting input values to valid finite float or integer ranges.

Exploitation Methodology

Exploitation of CVE-2026-107721 relies on a system design flaw where dynamic variables can dictate the configuration of the verifier. If an administrator console, an external database configuration, or a parsed query parameter allows setting the clockTolerance configuration to Infinity, the backend verifier becomes compromised.

Once configured, an attacker can construct an expired JWT or a token designated for future use and transmit it to the application API. The verifier processes the token, evaluates the temporal claims against Infinity boundaries, and yields a valid verification status. The application then processes the request, granting authorized access to protected assets.

The resulting validation outcome is indexed within the LRU cache using keys containing the infinite limits. This means subsequent validation requests can be satisfied directly from the poisoned cache state, maintaining authorization bypass conditions even if the underlying validation variables are temporarily updated.

Impact Assessment

The impact of this vulnerability is an authorization bypass that invalidates key security constraints of JSON Web Tokens. In environments utilizing short-lived session tokens to enforce security boundaries, the inability to expire credentials permits unauthorized, prolonged access to backend resources.

The CVSS v3.1 base score of 5.9 reflects a Medium severity classification, with the vector CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N. The High Attack Complexity metric denotes that the attack vector depends on the target application propagating unsafe or raw administrative inputs into the library's initialization options.

While this bug does not directly result in Remote Code Execution (RCE) or service disruption, the failure of temporal validation mechanisms undermines security controls, allowing unauthorized entities to perform actions with stale privileges or bypass time-based credential activation schedules.

Remediation & Detection Guidance

The recommended remediation is upgrading the fast-jwt package to version 6.3.0 or later, which contains the official fix. This can be accomplished by updating the dependency in the application's configuration files and executing the package manager update:

npm install fast-jwt@latest

If upgrading is not immediately possible, implement external validation to sanitize input parameters prior to initializing the verifier. Developers should ensure that any numeric parameter mapped to clockTolerance, clockTimestamp, or cacheTTL is verified with Number.isFinite() and validated to be non-negative:

function validateVerifierOptions(options) { 
  const keys = ['clockTolerance', 'clockTimestamp', 'cacheTTL'];
  for (const key of keys) {
    if (options[key] !== undefined) {
      if (typeof options[key] !== 'number' || !Number.isFinite(options[key]) || options[key] < 0) {
        throw new Error(`Invalid value for ${key}`);
      }
    }
  }
}

Static analysis can assist in identifying unsafe usage. Code review processes should scan for initialization configurations where createVerifier receives options derived from unsanitized administrative configurations or dynamic external input.

Official Patches

NearFormFix commit implementing strict finiteness checks on configurations
NearFormV6.3.0 stable release tag containing the fix

Fix Analysis (1)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N

Affected Systems

Node.js applications running fast-jwt packages prior to version 6.3.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
fast-jwt
NearForm
< 6.3.06.3.0
AttributeDetail
CWE IDCWE-613, CWE-682
Attack VectorNetwork
CVSS v3.15.9 (Medium)
Exploit StatusProof of Concept (Regression Tests)
CISA KEV StatusNot Listed
Remediation StatusPatched in version 6.3.0

MITRE ATT&CK Mapping

T1556Modify Authentication Process
Defense Evasion
T1539Steal Web Session Cookie
Credential Access
CWE-613
Insufficient Session Expiration

The product does not invalidate a session (or JSON Web Token) after an appropriate period of inactivity or absolute time has elapsed.

Vulnerability Timeline

Fix developed and committed to the main branch
2026-07-27
Fixed version 6.3.0 is released on npm
2026-07-28
GitHub Security Advisory GHSA-687g-22h4-j4w4 is published
2026-10-08
CVE-2026-107721 is assigned and listed in NVD
2026-10-08

References & Sources

  • [1]GitHub Security Advisory GHSA-687g-22h4-j4w4
  • [2]Fix Commit on GitHub
  • [3]fast-jwt Release Version 6.3.0
  • [4]CVE.org Authority Record
  • [5]NVD Authority Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
11 views•10 min read
•2 days ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
16 views•12 min read
•2 days ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•2 days ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
16 views•10 min read
•2 days ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
19 views•10 min read
•2 days ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
8 views•9 min read