Vulnerability in fast-jwt (CVE-2026-107721)
Summary
Vulnerability in fast-jwt (CVE-2026-107721). Confidential information can be exposed externally. Exploitable via exp. Mitigation: upgrade to 6.3.0 or later.
Original description
The description as published by the source.
Summary
createVerifier({ clockTolerance: Infinity }) silently bypasses both exp (expiry) AND nbf (not-before) validation. Any expired or not-yet-active token is accepted as valid. The same primitive also corrupts the verifier's internal cache so cached entries inherit infinite validity — they remain valid past a later developer-removed Infinity config until LRU eviction.
Vulnerable code
src/verifier.js:531-533 — option validation only rejects negative values, not Infinity:
if (clockTolerance && (typeof clockTolerance !== 'number' || clockTolerance < 0)) {
throw new TokenError(TokenError.codes.invalidOption, 'The clockTolerance option must be a positive number.')
}
Infinity passes (it's a number, not less than 0, truthy).
src/verifier.js:583-602 — clockTolerance flows into the date-claim validators:
if (!ignoreNotBefore) {
validators.push({ ..., modifier: -clockTolerance }) // → -Infinity
}
if (!ignoreExpiration) {
validators.push({ ..., modifier: +clockTolerance }) // → Infinity
}
src/verifier.js:198-205 — applies modifier additively, producing always-pass comparisons:
function validateClaimDateValue(value, modifier, now, greater, errorCode, errorVerb) {
const adjusted = value * 1000 + (modifier || 0) // → ±Infinity
const valid = greater ? now >= adjusted : now <= adjusted // → always true
...
}
Empirical PoC
const { createSigner, createVerifier } = require('fast-jwt')
const secret = 'te…
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-107721 has been found in fast-jwt.
Attackers can target a specific entry point like exp over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 5.9/10.
What to do: upgrade fast-jwt to 6.3.0 or later.
If unsure, ask your IT team or search "fast-jwt CVE-2026-107721" on the vendor's site.
CVE-2026-107721 (fast-jwt) — CWE-613 / CVSS v3 5.9
Attack vector: remote (network-reachable) / no user interaction
Attack surface: exp / nbf / Infinity / clockTolerance
Patched: 6.3.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-613) exists in fast-jwt. Attackers reach the vulnerable code path via exp.
Check the vendor advisory for the affected versions of fast-jwt. Attack surface: exp / nbf / Infinity / clockTolerance.
Severity: Medium (CVSS 5.9/10). Confidential information can be exposed externally.
Update to 6.3.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'fast-jwt' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'fast-jwt' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
fast-jwtを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade fast-jwt to 6.3.0ステージング環境で 6.3.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。