patchminder
Proof of concept · CISA assessment CVE-2026-71847

Use after freein Ruby json.

Published 7 Aug 2026 · Updated 7 Aug 2026 · Every fact sourced

JSONCite
Is it exploited?
Not confirmed

Proof of concept public (CISAThe US cyber defence agency. Its list names every hole it has seen used in real attacks. assessment).

Severity
High 8.7
CVSSA severity score from 0 to 10. 9 and higher is critical. 4.0 · no login needed
Attack likelihood
Low
EPSSA daily score from FIRST: the chance a hole is attacked in the next 30 days. 0.4% chance in 30 days · 4 Dec 2026
Fix
Available
Upgrade to 2.21.2 or later
In plain words

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.

What to do now
  • Upgrade json to 2.21.2 or later.
  • Upgrade json (RubyGems) to 2.21.2 or later.
Versions

Affected and fixed versions

Product or package
Affected
Fixed in
Source
json
2.20.0 to before 2.21.2
2.21.2
CVE record
json (RubyGems)
2.20.0 to before 2.21.2
2.21.2
GitHub advisory

From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.

Timeline

From first report to first attacks

  1. 7 Aug 2026
    CVE ID reserved by GitHub_M.
  2. 7 Aug 2026
    Published in the CVE List.
  3. 7 Aug 2026
    CVE record last updated.
Exploit code

Attack code anyone can find

Exploit maturity: Proof of concept (CISA assessment). CISA assessment (SSVC): exploitation poc.

Metasploit module
None known
Nuclei scan template
None known
Exploit-DB
None known
GitHub proof of concepts
None known

Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.

Related

Other json vulnerabilities

Same weakness: Use after free

All CWE-416 vulnerabilities

References
Cite this page

Patchminder. CVE-2026-71847: Use after free in Ruby json. https://patchminder.com/cve/cve-2026-71847/ (accessed 5 December 2026).