ubuntu-cve-2026-71847
Vulnerability from osv_ubuntu
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.
{
"affected": [
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "ruby-json",
"binary_version": "1.8.0-1build1"
}
]
},
"package": {
"ecosystem": "Ubuntu:14.04:LTS",
"name": "ruby-json",
"purl": "pkg:deb/ubuntu/ruby-json@1.8.0-1build1?arch=source\u0026distro=trusty"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.8.0-1",
"1.8.0-1build1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "ruby-json",
"binary_version": "1.8.3-1build4"
}
]
},
"package": {
"ecosystem": "Ubuntu:16.04:LTS",
"name": "ruby-json",
"purl": "pkg:deb/ubuntu/ruby-json@1.8.3-1build4?arch=source\u0026distro=xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.8.3-1build1",
"1.8.3-1build2",
"1.8.3-1build4"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "ruby-json",
"binary_version": "2.1.0+dfsg-2"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "ruby-json",
"purl": "pkg:deb/ubuntu/ruby-json@2.1.0+dfsg-2?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"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.3.0+dfsg-1build1"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "ruby-json",
"purl": "pkg:deb/ubuntu/ruby-json@2.3.0+dfsg-1build1?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.1.0+dfsg-2",
"2.3.0+dfsg-1",
"2.3.0+dfsg-1build1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "ruby-json",
"binary_version": "2.5.1+dfsg-2build1"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "ruby-json",
"purl": "pkg:deb/ubuntu/ruby-json@2.5.1+dfsg-2build1?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.3.0+dfsg-1build1",
"2.5.1+dfsg-2",
"2.5.1+dfsg-2build1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "ruby-json",
"binary_version": "2.6.3+dfsg-1build4"
}
]
},
"package": {
"ecosystem": "Ubuntu:24.04:LTS",
"name": "ruby-json",
"purl": "pkg:deb/ubuntu/ruby-json@2.6.3+dfsg-1build4?arch=source\u0026distro=noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.6.3+dfsg-1build2",
"2.6.3+dfsg-1build3",
"2.6.3+dfsg-1build4"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "ruby-json",
"binary_version": "2.18.1+dfsg-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:26.04:LTS",
"name": "ruby-json",
"purl": "pkg:deb/ubuntu/ruby-json@2.18.1+dfsg-1?arch=source\u0026distro=resolute"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.9.1+dfsg-1",
"2.15.2+dfsg-1",
"2.18.1+dfsg-1"
]
}
],
"aliases": [],
"details": "Ruby JSON is a JSON implementation for Ruby. From 2.20.0 until 2.21.2, Ruby\u0027s 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.",
"id": "UBUNTU-CVE-2026-71847",
"modified": "2026-08-13T00:14:08Z",
"published": "2026-08-07T19:18:00Z",
"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"
}
],
"related": [],
"schema_version": "1.7.0",
"severity": [
{
"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": "CVSS_V4"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2026-71847"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.