CVE-2026-54696

Ruby JSON: JSON generator heap buffer overflow when streaming to an IO

Published Jun 30, 2026 CVSS 3.1 · 3.7 Low EPSS < 1% KEV · Not listed
Description
Ruby JSON is a JSON implementation for Ruby. Versions 2.9.0 through 2.19.8 are vulnerable to heap buffer overflow when the JSON generator is provided with an oversized streamed object. When streaming to an IO JSON.dump(obj, io) and JSON::State#generate(obj, io) can write past the internal JSON generator buffer when a streamed object contains an
attacker-controlled string near 16 KB. Exploitation would result in a reliable process crash/denial of service. This issue has been fixed in version 2.19.9.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-x2f5-4prf-w687 Ruby json: JSON generator heap buffer overflow when streaming to an IO
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Ruby
Ruby json
Vendors & Products Ruby
Ruby json
Type Values Removed Values Added
Description Ruby JSON is a JSON implementation for Ruby. Versions 2.9.0 through 2.19.8 are vulnerable to heap buffer overflow when the JSON generator is provided with an oversized streamed object. When streaming to an IO JSON.dump(obj, io) and JSON::State#generate(obj, io) can write past the internal JSON generator buffer when a streamed object contains an attacker-controlled string near 16 KB. Exploitation would result in a reliable process crash/denial of service. This issue has been fixed in version 2.19.9.
Title Ruby JSON: JSON generator heap buffer overflow when streaming to an IO
Weaknesses CWE-122
CWE-131
CWE-787
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 1, 2026, 1:20 PM
Reserved
Jun 15, 2026, 10:58 PM
Status
Deferred
Published
Jun 30, 2026, 11:17 PM
Modified
Oct 25, 2026, 5:10 PM