CVE-2026-71847: CWE-416: Use After Free in ruby json
CVE-2026-71847 is a use-after-free vulnerability in the Ruby JSON native C extension affecting versions from 2.20.0 up to but not including 2.21.2. The flaw occurs when the JSON::ResumableParser processes incomplete JSON input containing duplicate keys, leading to dereferencing of freed memory and potential process termination. This vulnerability has a high severity with a CVSS score of 8.7 and has been fixed in version 2.21.2.
AI Analysis
Technical Summary
Ruby JSON versions 2.20.0 through 2.21.1 contain a use-after-free vulnerability in the native C extension's JSON::ResumableParser. When parsing incomplete JSON objects with duplicate keys, the parser clears the input buffer but leaves internal pointers referencing freed memory. The duplicate-key warning path calls a function that dereferences these stale pointers, causing a heap-use-after-free condition that can crash the Ruby process. This issue is exploitable by supplying crafted JSON stream data to applications using JSON::ResumableParser. The vulnerability was fixed in version 2.21.2.
Potential Impact
An attacker able to supply JSON stream data to an application using JSON::ResumableParser can cause a heap-use-after-free leading to process termination (crash). This results in a denial of service condition. There is no indication of code execution or data corruption beyond process termination.
Mitigation Recommendations
Upgrade Ruby JSON to version 2.21.2 or later, where this vulnerability is fixed. No other mitigation or workaround is indicated.
CVE-2026-71847: CWE-416: Use After Free in ruby json
Description
CVE-2026-71847 is a use-after-free vulnerability in the Ruby JSON native C extension affecting versions from 2.20.0 up to but not including 2.21.2. The flaw occurs when the JSON::ResumableParser processes incomplete JSON input containing duplicate keys, leading to dereferencing of freed memory and potential process termination. This vulnerability has a high severity with a CVSS score of 8.7 and has been fixed in version 2.21.2.
CVSS v4.0
Score 8.7high
Affected software
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Ruby JSON versions 2.20.0 through 2.21.1 contain a use-after-free vulnerability in the native C extension's JSON::ResumableParser. When parsing incomplete JSON objects with duplicate keys, the parser clears the input buffer but leaves internal pointers referencing freed memory. The duplicate-key warning path calls a function that dereferences these stale pointers, causing a heap-use-after-free condition that can crash the Ruby process. This issue is exploitable by supplying crafted JSON stream data to applications using JSON::ResumableParser. The vulnerability was fixed in version 2.21.2.
Potential Impact
An attacker able to supply JSON stream data to an application using JSON::ResumableParser can cause a heap-use-after-free leading to process termination (crash). This results in a denial of service condition. There is no indication of code execution or data corruption beyond process termination.
Mitigation Recommendations
Upgrade Ruby JSON to version 2.21.2 or later, where this vulnerability is fixed. No other mitigation or workaround is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-07T18:26:53.523Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a762a7bbf8831d539f90bf6
Added to database: 08/07/2026, 18:56:59 UTC
Last enriched: 08/07/2026, 19:11:05 UTC
Last updated: 08/07/2026, 19:16:49 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.