{"id":"UBUNTU-CVE-2026-71847","details":"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.","modified":"2026-08-13T00:14:08Z","published":"2026-08-07T19:18:00Z","upstream":["CVE-2026-71847"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-71847"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-71847"},{"type":"REPORT","url":"https://github.com/ruby/json/security/advisories/GHSA-9hj4-r449-hfvc"}],"affected":[{"package":{"name":"ruby-json","ecosystem":"Ubuntu:14.04:LTS","purl":"pkg:deb/ubuntu/ruby-json?arch=source&distro=trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.0-1","1.8.0-1build1"],"ecosystem_specific":{"binaries":[{"binary_name":"ruby-json","binary_version":"1.8.0-1build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71847.json"}},{"package":{"name":"ruby-json","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/ruby-json?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.8.3-1build1","1.8.3-1build2","1.8.3-1build4"],"ecosystem_specific":{"binaries":[{"binary_version":"1.8.3-1build4","binary_name":"ruby-json"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71847.json"}},{"package":{"name":"ruby-json","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/ruby-json?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.0+dfsg-1","2.1.0+dfsg-1ubuntu2","2.1.0+dfsg-1ubuntu3","2.1.0+dfsg-2"],"ecosystem_specific":{"binaries":[{"binary_name":"ruby-json","binary_version":"2.1.0+dfsg-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71847.json"}},{"package":{"name":"ruby-json","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/ruby-json?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.0+dfsg-2","2.3.0+dfsg-1","2.3.0+dfsg-1build1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.3.0+dfsg-1build1","binary_name":"ruby-json"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71847.json"}},{"package":{"name":"ruby-json","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/ruby-json?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.3.0+dfsg-1build1","2.5.1+dfsg-2","2.5.1+dfsg-2build1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.5.1+dfsg-2build1","binary_name":"ruby-json"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71847.json"}},{"package":{"name":"ruby-json","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/ruby-json?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.6.3+dfsg-1build2","2.6.3+dfsg-1build3","2.6.3+dfsg-1build4"],"ecosystem_specific":{"binaries":[{"binary_version":"2.6.3+dfsg-1build4","binary_name":"ruby-json"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71847.json"}},{"package":{"name":"ruby-json","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/ruby-json?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.9.1+dfsg-1","2.15.2+dfsg-1","2.18.1+dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_name":"ruby-json","binary_version":"2.18.1+dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-71847.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"},{"type":"Ubuntu","score":"medium"}]}