Vulnerability GHSA-cjpr-jw2g-fw99

Medium Risk
MEDIUM RISK
CVSS Score: 6.5
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
13 hours ago
December 01, 2026 at 09:15 PM UTC
Ruby JSON: Out of Bound Write in parser when `allow_control_characters: true` is enabled
2.18.0 - 2.19.2
2.18.0 - 2.19.2

Summary

Ruby JSON: Out of Bound Write in parser when `allow_control_characters: true` is enabled

Details

Summary

Parsing invalid JSON with the allow_control_characters: true option enabled can result in an out of bound write, potentially corrupting the heap, but more likely a VM crash.

Details

If an ASCI control character is preceded by a backslash, the bound checks can be defeated.

Originally fixed as a regular bug in json 1.9.3.

Proof of concept

The issue can easily be reproduced with a backslash followed by a control character. Some padding is required.

require "json"
doc = '"' + ("A" * 4096) + "\\\x01" + '"'
JSON.parse(doc, allow_control_characters: true)

Impact

If the allow_control_characters: true option is used to parse untrusted input, it could be used as a DOS vector.

Impacted packages

Timeline

Published
13 hours ago
December 01, 2026 at 09:15 PM UTC
Fixed (2.19.3)
8 months ago
March 25, 2026 at 11:00 AM UTC
Fixed (2.18.2)
29 days ago
November 02, 2026 at 02:53 PM UTC
Last Modified
13 hours ago
December 01, 2026 at 09:30 PM UTC