Ruby JSON: JSON generator heap buffer overflow when streaming to an IO
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Partial Red Hat: 1 fixed, 6 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ruby | json | 2.9.0 to before 2.19.9 | 2.19.9 | Patch available | CNA |
| — | json (RubyGems) | 2.9.0 to before 2.19.9 | 2.19.9 | Patch available | GHSA-x2f5-4prf-w687 |
- json Vendorruby Affected 2.9.0 to before 2.19.9 Fixed in 2.19.9 Patch available CNA
- json (RubyGems) Vendor— Affected 2.9.0 to before 2.19.9 Fixed in 2.19.9 Patch available GHSA-x2f5-4prf-w687
Remediation
- Fix · CNA json (ruby) Fixed in 2.19.9
- Fix · GHSA-x2f5-4prf-w687 json (RubyGems) Fixed in 2.19.9 Advisory →
Red Hat 2 advisories
- RHSA-2026:48482 Released 2026-07-30 · Red Hat rating LowRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images ruby3.4-3.4.10-31.5.hum1@aarch64, ruby3.4-3.4.10-31.5.hum1@src, ruby3.4-3.4.10-31.5.hum1@x86_64 +10
- RHSA-2026:47932 Released 2026-07-29 · Red Hat rating LowRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images ruby4.0-4.0.6-37.1.hum1@aarch64, ruby4.0-4.0.6-37.1.hum1@src, ruby4.0-4.0.6-37.1.hum1@x86_64 +46
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat AMQ Clients | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet: Fix deferred |
| Red Hat Hardened Images | Fixed | RHSA-2026:47932, RHSA-2026:48482 |
Not affected: 3 products
- Red Hat Enterprise Linux AI (RHEL AI) 3
- Red Hat Hardened Images
- Red Hat OpenShift AI (RHOAI)
Timeline
- 2026-10-02 Threatist record created from CVE-2026-54696
- 2026-10-03 Alias added: GHSA-x2f5-4prf-w687
References
Other 5
- https://github.com/ruby/json/security/advisories/GHSA-x2f5-4prf-w687
- https://github.com/ruby/json/releases/tag/v2.19.9
- https://github.com/ruby/json/commit/996bac686d64e4e3aaeae03b14a7f9ee9695ebdb
- https://github.com/ruby/json
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/json/CVE-2026-54696.yml
More ruby vulnerabilities
- TI-2026-71508 Integer overflow in GitLab allows code execution on the server KEVCVSS 3.1CRITICAL 10.0
- TI-2026-50176 Use after free in ruby json CVSS 4.0HIGH 8.7
- TI-2017-12709 Ruby before 2.4.3 allows Net::FTP command injection. CVSS 3.0HIGH 8.8
- TI-2008-03501 Algorithmic complexity vulnerability in the WEBrick::HTTPUtils.split_header_value… CVSS 2.0HIGH 7.8
- TI-2021-09891 In Ruby through 3.0 on Windows, a remote attacker can submit a crafted path when a Web… CVSS 3.1HIGH 7.5
- TI-2025-18855 Net::IMAP vulnerable to possible DoS by memory exhaustion CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-54696 · CVE Program
- CVE-2026-54696 · NVD
- FIRST EPSS
- GHSA-x2f5-4prf-w687 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-54696 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences