Categories
CVE-2026-107720 high CVSS 7.4

Vulnerability in fast-jwt (CVE-2026-107720)

Summary

Vulnerability in fast-jwt (CVE-2026-107720). Confidential information can be exposed externally. Exploitable via createVerifier. Mitigation: upgrade to 6.3.1 or later.

Original description

The description as published by the source.

Summary

createVerifier in fast-jwt ≤ 6.3.0 skips signature verification entirely when the key option is a falsy synchronous value ('' or null) and the algorithms option is set to a non-empty allowlist. An attacker who can present a JWT to the application — regardless of algorithm — can forge arbitrary claims without possessing any signing key.

Details

Root cause — four cooperating code paths:

A. Falsy sync keys bypass prepareKeyOrSecret

createVerifier branches on typeof key:

const keyType = typeof key
if (keyType !== 'string' && keyType !== 'object' && keyType !== 'function') {
  throw new TokenError(/* ... */)
}
if (key && keyType !== 'function') {
  key = prepareKeyOrSecret(key, hsAlgorithms.includes(availableAlgorithms[0]))
}

When key is '' (string, falsy) or null (object, falsy) the outer type check passes but the if (key && ...) guard never calls prepareKeyOrSecret. The empty-secret rejection added in that function is therefore never reached for sync keys:

function prepareKeyOrSecret(key, isSecret) {
  if (isSecret && key.length === 0) {
    throw new TokenError(TokenError.codes.invalidKey, 'The key cannot be an empty string or buffer.')
  }
  return isSecret ? createSecretKey(key) : createPublicKey(key)
}

B. Explicit algorithms keeps an allowlist active with no key

When key is falsy, autodetection is skipped and the caller-supplied algorithms (e.g. ['HS256']) is retained in `allowedA…

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-107720 has been found in fast-jwt.
Attackers can target a specific entry point like createVerifier over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 7.4/10.
What to do: upgrade fast-jwt to 6.3.1 or later.
If unsure, ask your IT team or search "fast-jwt CVE-2026-107720" on the vendor's site.

CVE-2026-107720 (fast-jwt) — CWE-20 / CVSS v3 7.4
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: createVerifier / key / null / algorithms
Patched: 6.3.1 — 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.

❓ What is the problem

A vulnerability (CWE-20) exists in fast-jwt. Attackers reach the vulnerable code path via createVerifier without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of fast-jwt. Attack surface: createVerifier / key / null / algorithms.

🔥 Severity

Severity: High (CVSS 7.4/10). Confidential information can be exposed externally.

🔧 How to fix

Update to 6.3.1.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

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

  1. 1
    Identify exposure identify
    grep -r 'fast-jwt' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で fast-jwt を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade fast-jwt to 6.3.1

    ステージング環境で 6.3.1 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm fast-jwt
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.3.1"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details