CVE-2026-71847
Ruby JSON: JSON::ResumableParser#partial_value dereferences a freed input buffer and crashes on truncated duplicate-key streams
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.
INFO
Published Date :
Aug. 7, 2026, 7:18 p.m.
Last Modified :
Oct. 24, 2026, 3:10 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 4.0 | HIGH | [email protected] |
Solution
- Update Ruby JSON gem to version 2.21.2.
- Avoid parsing untrusted JSON with duplicate keys.
- Ensure proper memory management in JSON parsing.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-71847.
| URL | Resource |
|---|---|
| https://github.com/ruby/json/security/advisories/GHSA-9hj4-r449-hfvc | |
| https://github.com/ruby/json/security/advisories/GHSA-9hj4-r449-hfvc |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-71847 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-71847
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-71847 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-71847 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 24, 2026
Action Type Old Value New Value Changed Translation Title: json de ruby, Description: Ruby JSON es una implementación de JSON para Ruby. Desde la versión 2.20.0 hasta la 2.21.2, la extensión C nativa de JSON de Ruby borra el búfer de entrada consumido de JSON::ResumableParser pero deja state.start, state.cursor y state.end apuntando a almacenamiento liberado. Cuando partial_value reconstruye un objeto incompleto que contiene claves duplicadas, la ruta de advertencia de clave duplicada llama a cursor_position, que desreferencia esos punteros obsoletos. Esto resulta en un uso después de liberación en el montón y puede terminar el proceso de Ruby. Un atacante que puede suministrar datos de flujo JSON a una aplicación que usa JSON::ResumableParser puede causar la terminación del proceso cuando la aplicación llama a partial_value en una entrada incompleta controlada por el atacante que contiene claves de objeto duplicadas. Este problema ha sido corregido en la versión 2.21.2. Title: json de ruby, Description: Ruby JSON es una implementación de JSON para Ruby. Desde la versión 2.20.0 hasta la 2.21.2, la extensión C nativa de JSON de Ruby borra el búfer de entrada consumido de JSON::ResumableParser pero deja state.start, state.cursor y state.end apuntando a almacenamiento liberado. Cuando partial_value reconstruye un objeto incompleto que contiene claves duplicadas, la ruta de advertencia de clave duplicada llama a cursor_position, que desreferencia esos punteros obsoletos. Esto resulta en un uso después de liberación en el montón y puede terminar el proceso de Ruby. Un atacante que puede suministrar datos de flujo JSON a una aplicación que usa JSON::ResumableParser puede causar la terminación del proceso cuando la aplicación llama a partial_value en una entrada incompleta controlada por el atacante que contiene claves de objeto duplicadas. Este problema ha sido corregido en la versión 2.21.2. -
CVE Translated by [email protected]
Oct. 23, 2026
Action Type Old Value New Value Added Translation Title: json de ruby, Description: Ruby JSON es una implementación de JSON para Ruby. Desde la versión 2.20.0 hasta la 2.21.2, la extensión C nativa de JSON de Ruby borra el búfer de entrada consumido de JSON::ResumableParser pero deja state.start, state.cursor y state.end apuntando a almacenamiento liberado. Cuando partial_value reconstruye un objeto incompleto que contiene claves duplicadas, la ruta de advertencia de clave duplicada llama a cursor_position, que desreferencia esos punteros obsoletos. Esto resulta en un uso después de liberación en el montón y puede terminar el proceso de Ruby. Un atacante que puede suministrar datos de flujo JSON a una aplicación que usa JSON::ResumableParser puede causar la terminación del proceso cuando la aplicación llama a partial_value en una entrada incompleta controlada por el atacante que contiene claves de objeto duplicadas. Este problema ha sido corregido en la versión 2.21.2. -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Aug. 07, 2026
Action Type Old Value New Value Added Reference https://github.com/ruby/json/security/advisories/GHSA-9hj4-r449-hfvc Added SSVC {'id': 'CVE-2026-71847', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'yes'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-08-07T20:56:50.796148Z'} -
New CVE Received by [email protected]
Aug. 07, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'ruby', 'product': 'json', 'versions': [{'status': 'affected', 'version': '>= 2.20.0, < 2.21.2'}]}] Added 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. Added CVSS V4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Added CWE CWE-416 Added Reference https://github.com/ruby/json/security/advisories/GHSA-9hj4-r449-hfvc