CVE-2026-71847
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
jsonRubyGems | >= 2.20.0, < 2.21.2 | 2.21.2 |
Affected products
15- osv-coords14 versionspkg:apk/chainguard/ruby3.2-rails-8.1pkg:apk/chainguard/logstash-9.5pkg:apk/chainguard/logstash-9.5-iamguarded-compatpkg:apk/chainguard/logstash-fips-9.5pkg:apk/chainguard/logstash-fips-9.5-iamguarded-compatpkg:apk/chainguard/pact-broker-dockerpkg:apk/chainguard/pact-broker-docker-fipspkg:apk/chainguard/ruby3.3-rails-8.1pkg:apk/chainguard/ruby3.4-rails-8.1pkg:apk/wolfi/cinc-auditorpkg:apk/wolfi/ruby3.2-rails-8.1pkg:apk/wolfi/ruby3.3-rails-8.1pkg:apk/wolfi/ruby3.4-rails-8.1pkg:apk/chainguard/cinc-auditor
< 8.1.3.1-r1+ 13 more
- (no CPE)range: < 8.1.3.1-r1
- (no CPE)range: < 9.5.1-r3
- (no CPE)range: < 9.5.1-r3
- (no CPE)range: < 9.5.0-r2
- (no CPE)range: < 9.5.0-r2
- (no CPE)range: < 2.142.0.2.120.0-r1
- (no CPE)range: < 2.142.0.2.120.0-r1
- (no CPE)range: < 8.1.3.1-r1
- (no CPE)range: < 8.1.3.1-r1
- (no CPE)range: < 7.1.7-r6
- (no CPE)range: < 8.1.3.1-r1
- (no CPE)range: < 8.1.3.1-r1
- (no CPE)range: < 8.1.3.1-r1
- (no CPE)range: < 7.1.7-r6
Patches
Vulnerability mechanics
References
2News mentions
0No linked articles in our index yet.