Skip to main content

fast-jwt CVE-2026-107721

| EUVDEUVD-2026-95345 MEDIUM
Insufficient Session Expiration (CWE-613)
2026-10-08 GitHub_M GHSA-687g-22h4-j4w4
5.9
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Admin misconfigures clockTolerance: Infinity
  2. Delivery
    exp/nbf validators receive ±Infinity modifier
  3. Exploit
    Present expired or not-yet-active JWT
  4. Execution
    Verifier accepts token as valid
  5. Impact
    Authenticate as token subject with stale credentials

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V7 - Session Management Session expiration enforcement
Exploitation Conditions

Exploitation requires that the application be configured with createVerifier({ clockTolerance: Infinity }) - a non-default setting reachable only by someone with control over the verifier's configuration code or options (application administrator or equivalent). This is the explicit precondition and the primary limiting factor: default configurations are not affected. Because the option-validation only rejected negative/non-number values (not Infinity), the infinite value flows as ±Infinity modifiers into validateClaimDateValue, making exp and nbf comparisons always pass. A secondary persistence condition: the verifier's internal LRU cache derives infinite bounds, so cache entries created under this config remain valid even after a developer removes the Infinity setting, until LRU eviction. Once misconfigured, an attacker needs no authentication or user interaction to present an expired/not-yet-active token - the limiting factor is entirely the upstream misconfiguration, not the attacker's access.

Impact

This is a genuine-but-conditional weakness that scores moderate (CVSS 5.9) and should be treated as a configuration-hygiene / supply-chain hardening item rather than an urgent remotely-exploitable flaw. The CVSS vector (AV:N/AC:H/PR:H/UI:N) is internally consistent with the description: the high privileges (PR:H) and high complexity (AC:H) reflect that the vulnerability only manifests when an application administrator or equivalent configuration path sets clockTolerance to Infinity - a non-default, developer-chosen value. Exploitation status is 'publicly available exploit code exists' (the GHSA advisory includes a working empirical PoC verified against fast-jwt@HEAD on 2026-06-03); this is NOT the same as active exploitation. The CVE is NOT listed in CISA KEV and no EPSS score was provided in the input, so there is no signal of widespread or automated exploitation - consistent with a flaw that requires a prior misconfiguration to be present. The C:H/I:H impact is justified because accepting expired (exp) and not-yet-active (nbf) tokens defeats session-expiry controls (CWE-613), enabling continued authenticated access with stale tokens. Net: real bug with a confirmed PoC and a confirmed fix, but gated behind an operator mistake - prioritize dependency upgrade and config audit, not emergency patching.

Exploit ScenarioDerived

A developer or administrator sets createVerifier({ clockTolerance: Infinity }) (e.g. copied from a clock-skew troubleshooting snippet), which silently disables both exp and nbf checks. An attacker who possesses an expired or stolen-but-lapsed JWT - or a not-yet-valid token - then presents it to the service and is authenticated as the token subject. A public PoC demonstrating acceptance of both expired and future-dated tokens exists in the vendor GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 08, 2026

fast-jwt through 6.2.4 silently accepts expired and not-yet-active JSON Web Tokens when a verifier is constructed with clockTolerance set to Infinity, because the option validation only checks that the value is a number and non-negative rather than finite. The precondition is privileged and non-default: an application administrator or anyone controlling the verifier's configuration must explicitly set that value, which is why the assessed vector carries PR:H and the score remains moderate at 5.9; default configurations are unaffected. A secondary effect is that the verifier's internal LRU cache derives infinite validity bounds, so cached decisions made under the misconfiguration persist even after the Infinity setting is removed, until cache eviction. No active exploitation is recorded (not in CISA KEV), but publicly available exploit code exists in the upstream advisory, which demonstrates both the exp and nbf bypass empirically.

RemediationAI

Vendor-released patch: 6.3.0 - upgrade fast-jwt to 6.3.0 or later (npm install fast-jwt@6.3.0), which adds Number.isFinite validation for clockTolerance, clockTimestamp and cacheTTL and rejects Infinity and NaN at verifier construction; see the release at https://github.com/nearform/fast-jwt/releases/tag/v6.3.0 and the advisory at https://github.com/nearform/fast-jwt/security/advisories/GHSA-687g-22h4-j4w4. Upstream fix available (PR/commit); released patched version not independently confirmed. If upgrading is not immediately possible, never configure a verifier with clockTolerance: Infinity and audit all createVerifier call sites for non-finite values; keep clockTolerance to a small finite number (for example a few seconds) appropriate to your clock skew, and apply the same finiteness check to clockTimestamp and cacheTTL so the guards accept only finite, non-negative numbers. Because removing the setting is not sufficient on its own - verifier cache entries created under Infinity keep infinite bounds and stay valid until LRU eviction - fully restart the Node.js process (or recreate the verifier instance) after changing the configuration so stale cached decisions are discarded; the trade-off is a brief cold-cache period and, if you rely on cacheTTL for throughput, a temporary increase in signature-verification work. As a defence-in-depth control, issue short-lived tokens, validate issuer and audience, and monitor for acceptance of tokens whose exp or nbf lie far outside the expected window, since that pattern is the observable signature of this misconfiguration.

Affected VersionsENISA

fast-jwt < 6.3.0

Affected Packages

npm fast-jwt fix: 6.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

fast-jwt is a Node.js JSON Web Token signing/verification library published on npm under the nearform scope (CPE cpe:2.3:a:nearform:fast-jwt). The flaw class is CWE-613, insufficient session expiration: the library's claim-date validation, in validateClaimDateValue (src/verifier.js), computes an adjusted boundary as value * 1000 + modifier and then compares it against the current time. clockTolerance is folded into that modifier with a sign flip - -clockTolerance for the nbf validator and +clockTolerance for the exp validator - so passing Infinity produces -Infinity and +Infinity respectively. Any comparison against ±Infinity is unconditionally true, meaning the expiration ('exp') and not-before ('nbf') checks always pass and the token is treated as valid regardless of its actual timestamps. The root cause is the option guard at src/verifier.js:531-533, which rejected non-numbers and negative values but treated Infinity as a legitimate positive number. The vulnerable configuration also propagates into the verifier's internal LRU cache, whose entries are keyed on derived validity bounds; entries created while Infinity was in effect remain valid until LRU eviction, extending the exposure window beyond the point at which the setting is corrected. The upstream fix (commit c0fb5b88b4c88ff2bdd194ca2c713599ad9e38b6) adds Number.isFinite checks and tightens the guards for clockTolerance, clockTimestamp and cacheTTL together, extending the error message to 'must be a finite, non-negative number.'

Know when Fast Jwt gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 5.9 MEDIUM

Flaw only triggers under a non-default admin-set clockTolerance:Infinity config, so PR:H and AC:H; token-expiry bypass yields C:H/I:H, no availability impact (A:N).

3.1 AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

1
Patch available
Oct 08, 2026 - 23:02 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
Medium
popular Node.js/npm JWT library, common in Fastify stacks but not ubiquitous
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy