# CVE-2026-45363: `jwt` (Ruby gem) - empty-key HMAC bypass

> Attackers can forge valid JWT tokens by exploiting empty-key HMAC verification flaws in the ruby-jwt library, bypassing authentication checks.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Jul 2026
- **Updated:** 19 Sep 2026
- **Also known as:** DEBIAN-CVE-2026-45363, GHSA-c32j-vqhx-rx3x, MINI-4rmj-7r6x-82rp, MINI-9mmf-hm45-p85q, MINI-9w58-pgcp-fc4j, UBUNTU-CVE-2026-45363

## What is CVE-2026-45363?

CVE-2026-45363 is a critical authentication bypass vulnerability in ruby-jwt, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

ruby-jwt is a Ruby implementation of the RFC 7519 OAuth JSON Web Token standard. Prior to 2.10.3 and 3.2.0, JWT.decode(token, '', true, algorithm: 'HS256') accepts an attacker-forged token because OpenSSL::HMAC.digest('SHA256', '', payload) returns a valid digest under an empty key and no empty-key precondition exists in the HMAC algorithm. The same path is reached when a keyfinder block or key_finder: argument returns an empty string, nil, or an array containing nil for an unknown key, affecting HS256, HS384, and HS512 verification through JWT.decode and JWT::EncodedToken#verify_signature!. This issue is fixed in versions 2.10.3 and 3.2.0.

Weakness: CWE-326 (Inadequate Encryption Strength), CWE-287 (Improper Authentication), CWE-1391 (Use of Weak Credentials)

## Which versions are affected by CVE-2026-45363?

4 open source packages ship an affected version, including jwt.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jwt` | RubyGems | All versions | 2.10.3 |
| `jwt` | RubyGems | All versions | 2.10.3 |
| `jwt` | RubyGems | From 3.0.0 | 3.2.0 |
| `jwt` | RubyGems | From 3.0.0 | 3.2.0 |

## How do I fix CVE-2026-45363?

Upgrade jwt to a fixed version for your release line: 2.10.3 or 3.2.0.

## Is CVE-2026-45363 being exploited?

There is no known exploitation of CVE-2026-45363 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-45363 and fix it if it is affected.

What it is: CVE-2026-45363 is a critical authentication bypass vulnerability in ruby-jwt, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-45363 in the wild and no public exploit code.

Affected packages and fixed versions:
- jwt (RubyGems): affected all versions; fixed in 2.10.3
- jwt (RubyGems): affected all versions; fixed in 2.10.3
- jwt (RubyGems): affected from 3.0.0; fixed in 3.2.0
- jwt (RubyGems): affected from 3.0.0; fixed in 3.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-45363/ (Markdown: https://insights.sbomify.com/CVE-2026-45363/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-45363
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-45363
- OSV: https://osv.dev/vulnerability/CVE-2026-45363

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-45363/
Summaries are generated and may contain mistakes; the official description above is the record.
