Skip to main content

Ruby JSON CVE-2026-141523

| EUVDEUVD-2026-140723 MEDIUM
Out-of-bounds Write (CWE-787)
2026-12-01 GitHub_M GHSA-cjpr-jw2g-fw99
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach endpoint parsing JSON with allow_control_characters
  2. Delivery
    Submit padded backslash-plus-control-char payload
  3. Exploit
    Defeat parser bounds check
  4. Execution
    Out-of-bounds heap write
  5. Impact
    Crash 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 allow_control_characters: true while parsing attacker-controlled input; default parsing is not affected. The attacker must also supply a specifically malformed string - sufficient padding followed by a backslash immediately followed by an ASCII control character (per the advisory PoC, e.g. 4096 'A' characters then \ and byte 0x01) - so arbitrary valid JSON will not trigger it. Only versions >= 2.18.0 < 2.18.2 and >= 2.19.0 < 2.19.3 are vulnerable. Limiting factors: the vulnerable option is off by default and must be deliberately enabled on an untrusted-input path, which substantially reduces the real-world exposed population below what the network/unauthenticated vector alone implies.

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 allow_control_characters: true option must be enabled, and the attacker must craft a specific malformed string (sufficient padding, then a backslash immediately followed by an ASCII control character). It is NOT in CISA KEV and no EPSS score was provided in the input, so there is no signal of active or widespread exploitation; the vuln.today decision label is 'this_month' (patch on a normal cycle, not act_now/emergency). A PoC reproduction snippet is present in the GitHub advisory, but exploitation status is 'no confirmed active exploitation' - treat PoC availability and in-the-wild use as distinct. The impact is honestly characterized by the vendor as 'potentially corrupting the heap, but more likely a VM crash,' i.e. predominantly denial of service (A:H) with only possible/limited integrity impact (I:L); reliable code execution is not demonstrated. Net: real and worth patching this cycle for anyone using the affected option on untrusted input, but the non-default configuration dependency sharply narrows the exposed population.

Exploit ScenarioDerived

An application parses untrusted, attacker-supplied JSON with JSON.parse(input, allow_control_characters: true) using a vulnerable json gem (>= 2.18.0 < 2.18.2, or >= 2.19.0 < 2.19.3). The attacker submits a string containing padding bytes followed by a backslash and an ASCII control character, defeating the parser's bounds check and triggering an out-of-bounds write that crashes the Ruby VM and denies service. A public proof-of-concept reproduction snippet is included in the vendor GHSA advisory, lowering the barrier to triggering a crash.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

json 2.18.0, < 2.18.2
json 2.19.0, < 2.19.3

Affected Packages

rubygems json fix: 2.18.2, 2.19.3

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

Vendor (GitHub_M) PRIMARY 6.5 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
vuln.today AI 6.5 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
High

Lifecycle Timeline

2
Patch available
Dec 01, 2026 - 22:03 EUVD
CVE Published
Dec 01, 2026 - 20:40 cve.org
MEDIUM 6.5

DescriptionCVE.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

Prevalence
High
ruby's standard JSON library, bundled and very widely deployed in Ruby apps
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy