# CVE-2026-54696: Ruby JSON: JSON generator heap buffer overflow when streaming to an IO

> An attacker can cause a denial of service via heap buffer overflow in the Ruby JSON library when streaming oversized objects to an IO.

- **Severity:** Low 3.7 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Jun 2026
- **Updated:** 1 Jul 2026
- **Also known as:** CLEANSTART-2026-DL54302, CLEANSTART-2026-EH26005, CLEANSTART-2026-KE67009, DEBIAN-CVE-2026-54696, GHSA-x2f5-4prf-w687, MINI-2779-v898-xxgx, MINI-2pv6-pvhh-732x, MINI-3v6j-8q79-7c7h, MINI-3vf2-h575-2fcc, MINI-49gg-5x9c-5gj4, MINI-4v2j-7r2p-9v78, MINI-564p-27hg-68jm, MINI-566q-rprq-wjcr, MINI-6vxm-v255-w2g3, MINI-74wv-4mrr-vg3w, MINI-76c4-g56m-cpw9, MINI-79v7-xg93-8833, MINI-94h7-9wqf-gv82, MINI-974v-h9qc-mq7c, MINI-f8v4-r2xp-3q5p, MINI-fwc6-2785-6jp2, MINI-gfg2-cq5g-gxc6, MINI-hg8r-45jg-wc8q, MINI-hvq7-ppvc-5vw5, MINI-jp26-pf44-865r, MINI-p236-qjc5-rq8v, MINI-p8gr-g858-f73v, MINI-qgpf-mxcq-6mj3, MINI-qwcw-g887-mh4g, MINI-r2pg-wwf6-h2px, MINI-rxxq-4wf3-vjm7, MINI-xg75-jm3g-vr83, RHSA-2026:47932, RHSA-2026:48482, UBUNTU-CVE-2026-54696

## What is CVE-2026-54696?

CVE-2026-54696 is a low-severity memory corruption vulnerability in ruby json, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Ruby JSON is a JSON implementation for Ruby. Versions 2.9.0 through 2.19.8 are vulnerable to heap buffer overflow when the JSON generator is provided with an oversized streamed object. When streaming to an IO JSON.dump(obj, io) and JSON::State#generate(obj, io) can write past the internal JSON generator buffer when a streamed object contains an
attacker-controlled string near 16 KB. Exploitation would result in a reliable process crash/denial of service. This issue has been fixed in version 2.19.9.

Weakness: CWE-787 (Out-of-bounds Write), CWE-131 (Incorrect Calculation of Buffer Size), CWE-122 (Heap-based Buffer Overflow)

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

2 open source packages ship an affected version, including json.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `json` | RubyGems | From 2.9.0 | 2.19.9 |
| `json` | RubyGems | From 2.9.0 | 2.19.9 |
| `ruby3.4` | Red Hat:hummingbird:1 | All versions | 0:3.4.10-31.5.hum1 |
| `ruby3.4-bundled-gems` | Red Hat:hummingbird:1 | All versions | 0:3.4.10-31.5.hum1 |
| `ruby3.4-default-gems` | Red Hat:hummingbird:1 | All versions | 0:3.4.10-31.5.hum1 |
| `ruby3.4-devel` | Red Hat:hummingbird:1 | All versions | 0:3.4.10-31.5.hum1 |
| `ruby3.4-doc` | Red Hat:hummingbird:1 | All versions | 0:3.4.10-31.5.hum1 |
| `ruby3.4-libs` | Red Hat:hummingbird:1 | All versions | 0:3.4.10-31.5.hum1 |
| `ruby4.0` | Red Hat:hummingbird:1 | All versions | 0:4.0.6-37.1.hum1 |
| `ruby4.0-bundled-gems` | Red Hat:hummingbird:1 | All versions | 0:4.0.6-37.1.hum1 |
| `ruby4.0-default-gems` | Red Hat:hummingbird:1 | All versions | 0:4.0.6-37.1.hum1 |
| `ruby4.0-devel` | Red Hat:hummingbird:1 | All versions | 0:4.0.6-37.1.hum1 |
| `ruby4.0-doc` | Red Hat:hummingbird:1 | All versions | 0:4.0.6-37.1.hum1 |
| `ruby4.0-libs` | Red Hat:hummingbird:1 | All versions | 0:4.0.6-37.1.hum1 |
| `rubygem4.0-bigdecimal` | Red Hat:hummingbird:1 | All versions | 0:4.0.1-37.1.hum1 |
| `rubygem4.0-bundler` | Red Hat:hummingbird:1 | All versions | 0:4.0.16-37.1.hum1 |
| `rubygem4.0-devel` | Red Hat:hummingbird:1 | All versions | 0:4.0.16-37.1.hum1 |
| `rubygem4.0-io-console` | Red Hat:hummingbird:1 | All versions | 0:0.8.2-37.1.hum1 |
| `rubygem4.0-irb` | Red Hat:hummingbird:1 | All versions | 0:1.16.0-37.1.hum1 |
| `rubygem4.0-json` | Red Hat:hummingbird:1 | All versions | 0:2.18.0-37.1.hum1 |
| `rubygem4.0-minitest` | Red Hat:hummingbird:1 | All versions | 0:6.0.0-37.1.hum1 |
| `rubygem4.0-power_assert` | Red Hat:hummingbird:1 | All versions | 0:3.0.1-37.1.hum1 |
| `rubygem4.0-psych` | Red Hat:hummingbird:1 | All versions | 0:5.3.1-37.1.hum1 |
| `rubygem4.0-racc` | Red Hat:hummingbird:1 | All versions | 0:1.8.1-37.1.hum1 |
| `rubygem4.0-rake` | Red Hat:hummingbird:1 | All versions | 0:13.3.1-37.1.hum1 |
| `rubygem4.0-rbs` | Red Hat:hummingbird:1 | All versions | 0:3.10.0-37.1.hum1 |
| `rubygem4.0-rdoc` | Red Hat:hummingbird:1 | All versions | 0:7.0.4-37.1.hum1 |
| `rubygem4.0-rexml` | Red Hat:hummingbird:1 | All versions | 0:3.4.4-37.1.hum1 |
| `rubygem4.0-rss` | Red Hat:hummingbird:1 | All versions | 0:0.3.2-37.1.hum1 |
| `rubygem4.0-rubygems` | Red Hat:hummingbird:1 | All versions | 0:4.0.16-37.1.hum1 |
| `rubygem4.0-test-unit` | Red Hat:hummingbird:1 | All versions | 0:3.7.5-37.1.hum1 |
| `rubygem4.0-typeprof` | Red Hat:hummingbird:1 | All versions | 0:0.31.1-37.1.hum1 |

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

Upgrade json to 2.19.9 or later.

## Is CVE-2026-54696 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54696 exists.

## Fix prompt for AI coding agents

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

What it is: CVE-2026-54696 is a low-severity memory corruption vulnerability in ruby json, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54696 exists.

Affected packages and fixed versions:
- json (RubyGems): affected from 2.9.0; fixed in 2.19.9
- json (RubyGems): affected from 2.9.0; fixed in 2.19.9

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-54696/ (Markdown: https://insights.sbomify.com/CVE-2026-54696/index.md)
```

## Sources

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

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