CVE-2026-107721

fast-jwt clockTolerance: Infinity silently bypasses both exp and nbf validation (and persists in the verifier cache)

Published Oct 8, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to 6.3.0, fast-jwt createVerifier accepts Infinity for clockTolerance because its option validation checks type and negativity but not finiteness. In validateClaimDateValue, infinite positive and negative modifiers make exp and nbf comparisons always pass, allowing expired or not-yet-active tokens to be accepted. The verifier cache also derives infinite bounds, so entries created under this configuration can remain valid until eviction. Exploitation requires an application administrator or equivalent configuration path to set clockTolerance to Infinity. This issue is fixed in version 6.3.0.

Analysis

AI-generated

Technical impact

Earlier versions of the fast-jwt library allowed the clockTolerance option to be set to Infinity because its validation rules only checked type and negativity but not finiteness. When Infinity is used, the internal date validation logic interprets positive or negative infinite modifiers so that the exp (expiration) and nbf (not‑before) claims are always considered valid. As a result, a JWT that should be rejected as expired or not yet active can be accepted, allowing an attacker who can influence the configuration to obtain unauthorized access. This vulnerability is related to CWE‑613 and CWE‑682.

Affected Systems

Any application that includes the nearform:fast-jwt package with a version older than 6.3.0 and that allows the clockTolerance configuration to be set, typically by an administrator or through a deployment template. The issue affects all such installations regardless of the runtime environment.

Risk and Exploitability

The vulnerability receives a CVSS score of 5.9, indicating moderate severity. EPSS data is not available, and the flaw is not listed in the CISA KEV catalog. The exploitation vector requires that an attacker has sufficient privileges to set the clockTolerance option to Infinity, which usually implies access to configuration files, deployment scripts, or administrative controls. Once configured, the infinite tolerance can be cached, so the forged token may remain valid for an extended period until the cache is evicted.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the fast-jwt library to version 6.3.0 or newer, where infinite values are properly rejected.
  • Verify that the clockTolerance option is set to a finite numeric value and that the configuration cannot be overridden with a non‑finite value.
  • Clear or invalidate any existing verifier cache entries that may have been created with an infinite tolerance, and restart the application to ensure fresh validation logic.

Generated by OpenCVE AI on October 8, 2026 at 23:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-687g-22h4-j4w4 fast-jwt clockTolerance: Infinity silently bypasses both exp and nbf validation (and persists in the verifier cache)
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Nearform
Nearform fast-jwt
Vendors & Products Nearform
Nearform fast-jwt
Type Values Removed Values Added
Description fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to 6.3.0, fast-jwt createVerifier accepts Infinity for clockTolerance because its option validation checks type and negativity but not finiteness. In validateClaimDateValue, infinite positive and negative modifiers make exp and nbf comparisons always pass, allowing expired or not-yet-active tokens to be accepted. The verifier cache also derives infinite bounds, so entries created under this configuration can remain valid until eviction. Exploitation requires an application administrator or equivalent configuration path to set clockTolerance to Infinity. This issue is fixed in version 6.3.0.
Title fast-jwt clockTolerance: Infinity silently bypasses both exp and nbf validation (and persists in the verifier cache)
Weaknesses CWE-613
CWE-682
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-613

    Insufficient Session Expiration

  • CWE-682

    Incorrect Calculation

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 9, 2026, 3:13 PM
Reserved
Oct 8, 2026, 5:21 PM
Status
Deferred
Published
Oct 8, 2026, 10:17 PM
Modified
Oct 9, 2026, 4:17 PM