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·2 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

•about 2 hours ago•CVE-2026-107722
9.8

CVE-2026-107722: Algorithm Confusion via Non-Whitespace Prefix Bypass in fast-jwt

A critical cryptographic vulnerability in fast-jwt versions 6.2.x prior to 6.3.0 allows unauthenticated remote attackers to execute an asymmetric-to-symmetric algorithm confusion attack due to incomplete validation of leading non-whitespace prefixes.

Amit Schendel
Amit Schendel
2 views•5 min read
•about 3 hours ago•CVE-2026-107720
7.4

CVE-2026-107720: Signature Verification Bypass in NearForm fast-jwt

CVE-2026-107720 is a critical signature verification bypass vulnerability in NearForm's fast-jwt Node.js library. Under specific configurations where the token verifier is initialized with a falsy cryptographic key (such as an empty string or null) and a non-empty algorithms allowlist, the library erroneously skips signature validation. This allows unauthenticated remote attackers to submit fabricated, unsigned JSON Web Tokens and bypass the authorization boundary of the application entirely.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 4 hours ago•CVE-2026-107715
6.8

CVE-2026-107715: Information Disclosure and Credential Leakage in Ruby Mechanize via Cross-Origin Redirections

Ruby Mechanize prior to version 2.14.1 contains an information disclosure vulnerability. When executing cross-origin HTTP redirects, global headers configured on the Mechanize agent (such as Authorization or Session Cookies) are dynamically re-applied to the subsequent request, bypassing the internal header-stripping logic. An attacker who controls a redirection endpoint can capture sensitive bearer tokens or cookies.

Alon Barad
Alon Barad
6 views•7 min read
•about 5 hours ago•CVE-2026-107399
6.8

CVE-2026-107399: Information Disclosure via HTML Meta-Refresh in Ruby Mechanize

An origin trust boundary failure in the Ruby mechanize library (prior to v2.14.1) allows unauthenticated remote web servers to harvest sensitive global request headers, such as Authorization Bearer tokens and cookies, by utilizing HTML-level meta-refresh redirection tags. Standard HTTP-level redirect boundaries were not applied to document-level redirects, creating a vector for cross-origin credential leakage during automated crawls.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 6 hours ago•CVE-2026-107718
6.1

CVE-2026-107718: Open Redirect Vulnerability in @adonisjs/http-server

CVE-2026-107718 is a medium-severity Open Redirect vulnerability in the core HTTP server package of the AdonisJS Node.js framework. Prior to versions 8.2.3 and 9.3.0, the framework built route paths by directly interpolating dynamic parameters and wildcard segments without URI encoding. If an application routes attacker-controlled input directly to a dynamic first path segment and uses the generated route URL as a redirect destination, a leading slash can produce a scheme-relative external URL. Modern web browsers process scheme-relative URLs by redirecting the client to the specified external domain, exposing users to credential harvesting, social engineering, and session hijacking. This vulnerability affects all applications running unpatched configurations where input validation is not explicitly implemented before generating paths.

Alon Barad
Alon Barad
6 views•6 min read
•about 7 hours ago•CVE-2026-107725
8.7

CVE-2026-107725: Remote Code Execution via Authorization Bypass in Hazelcast Predicates API

CVE-2026-107725 is a critical security bypass in Hazelcast where missing authorization checks in the MapPermission class permit unprivileged clients to issue queries containing aggregators or projections. This architectural oversight allows attackers to run arbitrary code on the cluster servers under the privileges of the active Hazelcast process.

Amit Schendel
Amit Schendel
6 views•7 min read