CVE-2026-71847 Ruby JSON: JSON::ResumableParser#partial_value dereferences a freed input buffer and crashes on truncated duplicate-key streams
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- UbuntuDebianRed Hat
Description
Ruby JSON is a JSON implementation for Ruby. From 2.20.0 until 2.21.2, Ruby's JSON native C extension clears the consumed JSON::ResumableParser input buffer but leaves state.start, state.cursor, and state.end pointing into released storage. When partial_value reconstructs an incomplete object containing duplicate keys, the duplicate-key warning path calls cursor_position, which dereferences those stale pointers. This results in a heap-use-after-free and can terminate the Ruby process. An attacker who can supply JSON stream data to an application using JSON::ResumableParser may cause process termination when the application calls partial_value on incomplete attacker-controlled input containing duplicate object keys. This issue has been fixed in version 2.21.2.
Upgrade path
8 packages: 2 fixed, 5 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/ruby-json(Debian 13) | = 2.9.1+dfsg-1; = 2.15.2+dfsg-1; = 2.18.1+dfsg-1; = 2.19.1+dfsg-1 +7 more | No fix listed | No fix yet |
| ubuntu/ruby-json(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/ruby-json(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/ruby-json(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/ruby-json(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| debian/ruby-json(Debian 14) | < 2.21.2+dfsg-1; = 2.9.1+dfsg-1; = 2.15.2+dfsg-1; = 2.18.1+dfsg-1 +5 more | 2.21.2+dfsg-1 | Fixed |
| rubygems json(RubyGems) | = 2.20.0; = 2.21.0; = 2.21.1; >= 2.20.0, < 2.21.2 +1 more | 2.21.2 | Fixed |
| ruby json | = >= 2.20.0, < 2.21.2 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| ruby json | = >= 2.20.0, < 2.21.2 | No fix listed |
| rubygems json(RubyGems) | >= 2.20.0, < 2.21.2 | 2.21.2 |
| rubygems json(RubyGems) | = 2.20.0 | No fix listed |
| rubygems json(RubyGems) | = 2.21.0 | No fix listed |
| rubygems json(RubyGems) | = 2.21.1 | No fix listed |
| rubygems json(RubyGems) | >= 2.20.0, <= 2.21.1 | No fix listed |
| debian/ruby-json(Debian:13) | All versions | No fix listed |
| debian/ruby-json(Debian:13) | = 2.15.2+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 2.18.1+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 2.19.1+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 2.19.2+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 2.19.4+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 2.19.9+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 2.21.1+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 2.21.2+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 2.9.1+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:13) | = 3.0.2+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:14) | < 2.21.2+dfsg-1 | 2.21.2+dfsg-1 |
| debian/ruby-json(Debian:14) | = 2.15.2+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:14) | = 2.18.1+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:14) | = 2.19.1+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:14) | = 2.19.2+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:14) | = 2.19.4+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:14) | = 2.19.9+dfsg-1 | No fix listed |
| debian/ruby-json(Debian:14) | = 2.21.1+dfsg-1 | No fix listed |
Show 5 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/ruby-json(Debian:14) | = 2.9.1+dfsg-1 | No fix listed |
| ubuntu/ruby-json(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/ruby-json(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/ruby-json(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/ruby-json(Ubuntu:26.10) | All versions | No fix listed |
References
- https://github.com/ruby/json/security/advisories/GHSA-9hj4-r449-hfvc exploit vendor-advisory
- github.com product
- Red Hat CVE page mitigation vendor-advisory
- Red Hat Bugzilla 2512602 issue-tracking
- www.cve.org
- nvd.nist.gov
- github.com
- Debian Security Tracker CVE-2026-71847 vendor-advisory
- Ubuntu CVE tracker vendor-advisory
- ENISA EUVD EUVD-2026-54576 third-party-advisory