Heap-based Buffer Overflow Affecting json package, versions >=2.9.0, <2.19.9


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.3% (22nd 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-RUBY-JSON-17739957
  • published1 Jul 2026
  • disclosed30 Jun 2026
  • creditsusdrip

Introduced: 30 Jun 2026

NewCVE-2026-54696  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade json to version 2.19.9 or higher.

Overview

json is a JSON implementation as a Ruby extension in C.

Affected versions of this package are vulnerable to Heap-based Buffer Overflow via the JSON.dump or JSON::State#generate process when streaming oversized attacker-controlled strings to an IO object. An attacker can cause a process crash or denial of service by providing a specially crafted string near 16 KB in size.

CVSS Base Scores

version 4.0
version 3.1