🛡️ CVE-2026-45363 — jwt

🔴 CVSS 9.1 — Critical ✅ No Known Exploit CWE-1391 NVD
9.1
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

ruby-jwt: Empty-key HMAC bypass; cross-language sibling of CVE-2026-44351

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/HS512 via both JWT.decode (positional key and block keyfinder) and

JWT::EncodedToken#verify_signature!(key_finder:)

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability none.

Weakness class

CVE-2026-45363 is classified as CWE-1391: Use of Weak Credentials. The product uses weak credentials (such as a default key or hard-coded password) that can be calculated, derived, reused, or guessed by an attacker.

Affected software

CVE-2026-45363 is recorded against 2 packages.

  • jwt (fixed in 2.10.3)
  • unknown

Timeline and source

Published on 18 May 2026 and last revised on 16 June 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
github.com (Web)
github.com (Web)
www.cve.org (Web)

Details

Severity HIGH
CVSS Score 9.1
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CWE CWE-1391
Public Exploit ✅ No
Source NVD
Published 2026-05-18
Updated 2026-08-12
Modified 2026-06-16
Fix URL N/A

Affected Packages

Software From version Fixed in
jwt 2.10.3
unknown

Similar Threats

Exploit Protection

Are you running jwt?

CVE-2026-45363 carries CVSS 9.1 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-45363 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026