Authentication Bypass in jwt (CVE-2026-45363)
Summary
Authentication bypass in jwt (CVE-2026-45363). Confidential information can be exposed externally. Exploitable via enforce_hmac_key_length. Mitigation: upgrade to 2.10.3 or later.
Original description
The description as published by the source.
JWT.decode(token, '', true, algorithm: 'HS256') accepts an attacker-forged token.
OpenSSL::HMAC.digest('SHA256', '', payload) returns a valid digest under an empty key, and no raise InvalidKeyError if key.empty? precondition exists in the HMAC algorithm.
JWT.decode(token, "", true, algorithm: 'HS256')
-> JWA::Hmac.verify(verification_key: "", ...)
-> OpenSSL::HMAC.digest('SHA256', "", signing_input) == signature
The same path is reached when a keyfinder block or key_finder: argument returns "", nil, or an
array containing nil for an unknown key. JWT::Decode#find_key only rejects literal nil and empty
arrays, and JWT::JWA::Hmac silently coerces nil to "" (signing_key ||= '') before signing.
JWT.decode(token, nil, true, algorithms: ['HS256']) { |_h| "" }
-> find_key returns "" # "" && !Array("").empty? == true
-> JWA::Hmac.verify(verification_key: "", ...)
-> verifies
Common application patterns that produce the unsafe value: redis.get("kid:#{kid}").to_s, ORM string columns with default: '', ENV['SECRET'] || '', Hash.new('') lookups, [primary, fallback] where fallback may be nil. Applications passing a non-empty static key:, or whose keyfinder returns nil / raises on miss, are not affected.
The existing enforce_hmac_key_length option would block this but defaults to false. On OpenSSL ≥ 3.5 the empty-key HMAC.digest call no longer raises, so the OpenSSL-3.0 rescue in JWA::Hmac#sign does not fire.
Affects HS256/HS384/HS…
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-45363 has been found in jwt.
Attackers can target a specific entry point like enforce_hmac_key_length over the network to misuse the product.
Confidential information can be exposed externally. CVSS score: 9.1/10.
What to do: upgrade jwt to 2.10.3 or later.
If unsure, ask your IT team or search "jwt CVE-2026-45363" on the vendor's site.
CVE-2026-45363 (jwt) — CWE-287 / CVSS v3 9.1
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: enforce_hmac_key_length
Patched: 2.10.3 — 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.
Authentication bypass (CWE-287) exists in jwt. Attackers reach the vulnerable code path via enforce_hmac_key_length without authentication.
Check the vendor advisory for the affected versions of jwt. Attack surface: enforce_hmac_key_length.
Severity: Critical (CVSS 9.1/10). Confidential information can be exposed externally.
Update to 2.10.3.
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 '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 'jwt' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
jwtを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade jwt to 2.10.3ステージング環境で 2.10.3 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Ubuntu UBUNTU-CVE-2026-45363 ruby-jwt
References
- DSA DSA-6547-1
- package github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web github.com
- web github.com
- web security-advisories@github.com
- web github.com
- web cve.org
- web security-advisories@github.com
- web lists.debian.org