{"id":"CVE-2026-71847","published":"2026-08-07T18:31:28Z","modified":"2026-08-07T21:02:06Z","title":"Ruby JSON: JSON::ResumableParser#partial_value dereferences a freed input buffer and crashes on truncated…","vendor":"ruby","product":"json","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00428,"percentile":0.37918,"provenance":"source"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://github.com/ruby/json/security/advisories/GHSA-9hj4-r449-hfvc","tags":["x_refsource_CONFIRM"]}],"priority":{"score":13.7,"factors":[{"name":"EPSS percentile","points":7.58},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"ruby","affectedVersions":[{"vendor":"ruby","product":"json","versions":[">= 2.20.0, < 2.21.2"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-08-07T20:56:50.796148Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"json","vulnerableRanges":[">=2.20.0, <2.21.2"],"patched":["2.21.2"],"from":["GHSA-9hj4-r449-hfvc"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-54576","exploited":false,"provenance":"source"}}