CVE-2026-71847

Ruby · JSON

A use-after-free vulnerability exists in the Ruby JSON library, potentially allowing for memory corruption or arbitrary code execution by unauthenticated attackers.

Executive summary

A high-severity memory corruption vulnerability in the Ruby JSON library poses a risk of unauthorized access or service disruption.

Vulnerability

The vulnerability is a CWE-416 (Use After Free) error. It allows an unauthenticated remote attacker to trigger memory corruption, which can lead to application crashes or potentially the execution of arbitrary code within the context of the Ruby application.

Business impact

This vulnerability is highly dangerous due to the potential for memory corruption. With a CVSS score of 8.7, successful exploitation could result in full system compromise, data theft, or severe service outages. The widespread use of the JSON library in Ruby applications increases the risk profile significantly.

Remediation

Immediate Action: Update the Ruby JSON gem to version 2.21.2 or later immediately.

Proactive Monitoring: Utilize memory debugging tools and monitor application logs for segmentation faults or unusual process terminations.

Compensating Controls: Ensure that applications are running with the principle of least privilege to minimize the impact if the application process is compromised.

Exploitation status

Public Exploit Available: Unknown.

Analyst recommendation

Given the availability of a proof-of-concept and the nature of the vulnerability, organizations should treat this as a high-priority update. Update the Ruby JSON dependency to version 2.21.2 across all production environments immediately to eliminate the risk of memory corruption.