Vulnerability · Published Jun 30, 2026 · Assigned by GitHub_M
CVE-2026-54696Ruby JSON: JSON generator heap buffer overflow when streaming to an IO
Low 3.7
In plain English
A low-severity heap buffer overflow in json from ruby. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 36% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | ruby-json | no fix listed | DEBIAN-CVE-2026-54696 |
| Debian:14 | ruby-json | 2.19.9+dfsg-1 | DEBIAN-CVE-2026-54696 |
| RubyGems | json | 2.19.9 | GHSA-x2f5-4prf-w687 |
| Ubuntu:24.04:LTS | jruby | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:25.10 | jruby | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:26.04:LTS | jruby | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:26.10 | jruby | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:22.04:LTS | ruby-json | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:24.04:LTS | ruby-json | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:25.10 | ruby-json | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:26.04:LTS | ruby-json | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:26.10 | ruby-json | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:22.04:LTS | ruby3.0 | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:24.04:LTS | ruby3.2 | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:25.10 | ruby3.3 | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:26.04:LTS | ruby3.3 | no fix listed | UBUNTU-CVE-2026-54696 |
| Ubuntu:26.10 | ruby3.3 | no fix listed | UBUNTU-CVE-2026-54696 |
Affected products (as reported)
Weakness: CWE-122, CWE-131, CWE-787 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
References
- https://github.com/ruby/json/security/advisories/GHSA-x2f5-4prf-w687 x_refsource_CONFIRM
- https://github.com/ruby/json/releases/tag/v2.19.9 x_refsource_MISC