Skip to main content
Mallory
← Back to News
open-source-dependency-vulnerabilitywidely-deployed-product-advisoryinternet-facing-service-vulnerability

Ruby JSON ResumableParser Use-After-Free Enables Denial of Service

Vulnerability Disclosure · 2 sources · Updated 4mo ago · First seen Aug 7, 2026

Ruby JSON ResumableParser Use-After-Free Enables Denial of Service

A high-severity denial-of-service flaw tracked as CVE-2026-71847 was disclosed in the Ruby json package, affecting versions 2.20.0 through before 2.21.2. The bug resides in the native C extension behind JSON::ResumableParser, where truncated streaming JSON containing duplicate object keys can cause the parser to clear its input buffer while leaving stale internal pointers behind, creating a heap-use-after-free condition classified as CWE-416.

If an application accepts attacker-controlled JSON streams and later calls partial_value on the incomplete input, the parser can perform pointer operations on freed memory in its warning-handling path and crash the Ruby worker process. The issue impacts availability rather than confidentiality or integrity, and the fix in json 2.21.2 clears the freed buffer, nullifies parser state pointers, and adjusts warning generation logic to avoid cursor calculations when parser state is still present.

Why it matters

Impact assessment

This vulnerability affects Ruby applications that use the json gem's JSON::ResumableParser to process attacker-controlled streaming JSON. The primary impact is application availability: successful exploitation can crash a Ruby worker process, causing denial of service without evidence of confidentiality or integrity loss.

The exposure is likely narrower than a general Ruby ecosystem issue because exploitation requires a specific parser class, incomplete streamed input, duplicate object keys, and an application call to partial_value. No in-the-wild exploitation is reported in the provided references, but the attack is remotely reachable with low complexity where these conditions exist.

Affected populations

  • Organizations running Ruby applications that ingest untrusted streaming JSON
  • Services using the json gem native C extension
  • Applications explicitly using JSON::ResumableParser and partial_value on incomplete input

Severity and business effect

  • Availability impact is high; worker process termination can disrupt API, background job, or stream-processing services
  • No stated confidentiality impact
  • No stated integrity impact
  • Potential operational and reputational impact if exposed internet-facing services can be repeatedly crashed

Scope and exploitation status

  • Affected product: Ruby json package
  • Affected versions: 2.20.0 through before 2.21.2
  • Scope is targeted to a specific feature path rather than all JSON parsing
  • No known exploitation in the wild stated in the references
Do you run this?See affected versions and whether adversaries are exploiting it.
Check your exposure
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

2 events · Aug 7, 2026
  1. Reported Aug 7, 20264mo ago

    Ruby JSON use-after-free fixed in version 2.21.2

    The Ruby JSON package fixed a heap-use-after-free flaw in JSON::ResumableParser by version 2.21.2. The patch nullifies parser state pointers after freeing the buffer and changes warning emission logic to avoid cursor position calculations on freed memory.

    CVE-2026-71847 - Ruby JSON: JSON::ResumableParser#partial_value dereferences a freed input buffer and crashes on truncated duplicate-key streams
  2. Aug 7, 20264mo ago

    GitHub receives CVE-2026-71847 record

    The CVE entry for CVE-2026-71847 was newly received by security-advisories@github.com. The issue describes a denial-of-service vulnerability in Ruby JSON's native extension that can crash a Ruby process via crafted truncated duplicate-key JSON streams.

    CVE-2026-71847 - Ruby JSON: JSON::ResumableParser#partial_value dereferences a freed input buffer and crashes on truncated duplicate-key streams
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.