Use After Free Affecting ruby3.4-rails-8.1 package, versions <8.1.3.1-r1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.33% (26th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-CHAINGUARDLATEST-RUBY34RAILS81-18598365
  • published9 Aug 2026
  • disclosed7 Aug 2026

Introduced: 7 Aug 2026

NewCVE-2026-71847  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade Chainguard ruby3.4-rails-8.1 to version 8.1.3.1-r1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream ruby3.4-rails-8.1 package and not the ruby3.4-rails-8.1 package as distributed by Chainguard. See How to fix? for Chainguard relevant fixed versions and status.

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.