Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach endpoint parsing JSON with allow_control_characters
-
DeliverySubmit padded backslash-plus-control-char payload
-
ExploitDefeat parser bounds check
-
ExecutionOut-of-bounds heap write
-
ImpactCrash Ruby VM (denial of service)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target application call the Ruby json gem with the non-default option |
| Impact | This is a genuine but conditional, moderate-severity issue rather than a top-tier emergency. The provided CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H = 6.5) indicates a remotely reachable, unauthenticated flaw, but AC:H reflects the two real gating conditions confirmed by the vendor advisory: the non-default |
| Exploit ScenarioDerived | An application parses untrusted, attacker-supplied JSON with |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
Out-of-bounds heap write in the Ruby json gem's native parser (versions 2.18.0 through 2.18.1 and 2.19.0 through 2.19.2) when JSON.parse is called with allow_control_characters: true and fed a malformed string containing enough padding followed by a backslash immediately preceding an ASCII control character; the malformed escape sequence defeats the parser's bounds checks. Realistic outcomes are heap corruption with integrity impact and, more probably, a Ruby VM crash producing denial of service in applications that parse untrusted input with that non-default option enabled; default parsing is unaffected, which substantially narrows exposure. No public exploit code or confirmed active exploitation was identified in the available data, and CISA KEV status is not indicated; the issue was fixed upstream in 2.18.2 and 2.19.3.
RemediationAI
Vendor-released patch: upgrade the json gem to 2.18.2 or later on the 2.18 branch, or to 2.19.3 or later on the 2.19 branch (advisory https://github.com/ruby/json/security/advisories/GHSA-cjpr-jw2g-fw99, releases https://github.com/ruby/json/releases/tag/v2.18.2 and https://github.com/ruby/json/releases/tag/v2.19.3); the underlying code fix is in commits 75e2f6453a3bf79df086ac10e41dbc5b7f124a76 and dcfbbcd36f240c18c3b89e5399105715f70162e3. Where an immediate upgrade is not possible, the vendor's security advisory frames the vulnerable configuration as the precondition, so the effective compensating control is to stop passing allow_control_characters: true when parsing untrusted input - the option is off by default, and removing it returns parsing to the unaffected path, with the trade-off that input legitimately containing raw control characters in strings would then be rejected with a JSON::ParserError rather than accepted. Because the trigger requires padding plus a backslash-control-character pair rather than arbitrary JSON, restricting or sanitizing input lengths and rejecting backslash-escaped control bytes before they reach the parser adds another layer, though it is fragile and not a substitute for the patched versions.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in rubygems
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected code is the C extension parser (ext/json/ext/parser/parser.c), specifically the json_string_unescape routine that processes escape sequences inside JSON strings; the flaw is classified CWE-787 (out-of-bounds write). When config->allow_control_characters is enabled, the unescape path mis-handles a backslash followed directly by an ASCII control character: instead of treating it as an invalid escape, control flow falls through into the allow_invalid_escape branch, so the preceding bounds check is bypassed and a write can go past the buffer boundary described by JSON_ParserState. The upstream commit (75e2f6453a3bf79df086ac10e41dbc5b7f124a76) restructures that branch with an added if (config->allow_invalid_escape) guard and adds a regression test covering a backslash-tab sequence with 30 bytes of padding. The advisory notes the malformed input requires padding before the backslash-control-character pair and that the vulnerability was originally fixed as a regular bug in json 1.9.3, meaning it is a regression in the 2.18/2.19 series. CPE tracks the gem as ruby:json; default parsing without the allow_control_characters option does not reach the vulnerable branch, and the exact triggering preconditions are described only in the advisory and its PoC, not beyond that.
Know when Json gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
Remotely reachable unauthenticated (AV:N/PR:N/UI:N) but AC:H because it needs the non-default allow_control_characters option plus a specific padded malformed escape; C:N, I:L for possible heap corruption, A:H for the likely VM crash.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Ruby JSON is a JSON implementation for Ruby. From 2.18.0 until 2.18.2 and 2.19.3, JSON.parse can perform an out-of-bounds write when allow_control_characters is enabled and attacker-controlled invalid JSON contains sufficient padding before a backslash immediately followed by an ASCII control character. This malformed escape sequence can defeat the parser's bounds checks, potentially corrupting heap memory and more likely crashing the Ruby VM, which can cause denial of service in applications that parse untrusted input with the affected option. This issue is fixed in versions 2.18.2 and 2.19.3.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Heap-use-after-free in the Ruby json gem's native C extension (versions 2.20.0 through 2.21.1) allows an unauthenticated
This affects the package json before 10.0.0. Rated high severity (CVSS 7.2), this vulnerability is remotely exploitable,
Jsonxx or Json++ is a JSON parser, writer and reader written in C++. Rated critical severity (CVSS 9.8), this vulnerabil
JSON++ through 2016-06-15 has a buffer over-read in yyparse() in json.y. Rated critical severity (CVSS 9.8), this vulner
Heap buffer overflow in the Ruby JSON gem's streaming generator (versions 2.9.0-2.19.8) enables reliable process crash v
Jsonxx or Json++ is a JSON parser, writer and reader written in C++. Rated high severity (CVSS 7.5), this vulnerability
The JSON gem through 2.2.0 for Ruby, as used in Ruby 2.4 through 2.4.9, 2.5 through 2.5.7, and 2.6 through 2.6.5, has an
EUVD-2026-140723
GHSA-cjpr-jw2g-fw99
NVD
CVE.org
Exploit-DB