Heap Use After Free in Ruby JSON C Extension Affects Multiple Versions
CVE-2026-71847

8.7HIGH

Key Information:

Vendor

Ruby

Status
Vendor
CVE Published:
7 August 2026

What is CVE-2026-71847?

The Ruby JSON C extension has a vulnerability that can lead to heap-use-after-free scenarios. This arises when the input buffer is cleared but pointers to released memory remain. If an attacker submits JSON data containing duplicate keys to applications utilizing JSON::ResumableParser, it can cause a crash during the reconstruction of an incomplete object. This occurs as the process attempts to dereference stale pointers during duplicate key handling. It’s crucial for users of Ruby JSON versions 2.20.0 through 2.21.2 to upgrade to version 2.21.2 to mitigate this risk.

Affected Version(s)

json >= 2.20.0, < 2.21.2

References

CVSS V4

Score:
8.7
Severity:
HIGH
Confidentiality:
None
Integrity:
None
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
None

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.