Heap Use After Free in Ruby JSON C Extension Affects Multiple Versions
CVE-2026-71847
8.7HIGH
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
