Vulnerabilities in pkg:gem/json
PACKAGECVE-2026-141523 is a MODERATE (CVSS 6.5) out of bound write vulnerability (CWE-787: Out-of-bounds Write) affecting Ruby JSON libraries in the RubyGems ecosystem. The issue involves out of bound write in parser when `allow_control_characters: true` is enabled. Remediation is available by upgrading affected packages to version 2.18.2, 2.19.3.
pkg:gem/json
Vulnerability advisories affecting package pkg:gem/json. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-cjpr-jw2g-fw99 | CVE-2026-141523 | MODERATE | Ruby JSON: Out of Bound Write in parser when `allow_control_characters: true` is enabled |
| GHSA-3m6g-2423-7cp3 | CVE-2026-33210 | HIGH | Ruby JSON has a format string injection vulnerability |
| GHSA-9hj4-r449-hfvc | CVE-2026-71847 | LOW | Ruby JSON: JSON::ResumableParser#partial_value dereferences a freed input buffer and crashes on truncated duplicate-key streams |
| GHSA-x2f5-4prf-w687 | CVE-2026-54696 | LOW | Ruby json: JSON generator heap buffer overflow when streaming to an IO |
| GHSA-9m3q-rhmv-5q44 | CVE-2025-27788 | HIGH | Out-of-bounds Read in Ruby JSON Parser |
| GHSA-x457-cw4h-hq5f | CVE-2013-0269 | HIGH | JSON gem has Improper Input Validation vulnerability |
| GHSA-jphg-qwrw-7w9g | CVE-2020-10663 | HIGH | Unsafe object creation in json RubyGem |
CVE-2026-141523 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H).
How to Fix CVE-2026-141523
To remediate this vulnerability, upgrade all affected Ruby JSON dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade json to 2.18.2
Upgrade json to 2.19.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for json
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-141523, inspect your project dependencies for Ruby JSON:
inspect dependencies for json
Analyze the terminal output to locate any version of Ruby JSON in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.18.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Ruby JSON, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-141523 Affected Ruby JSON Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2026-141523?
Which Ruby JSON versions are affected?
What version fixes CVE-2026-141523?
Is json affected?
What is the CVSS score of CVE-2026-141523?
What CWE is associated with CVE-2026-141523?
How can I check RubyGems dependencies for CVE-2026-141523?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cjpr-jw2g-fw99",
"modified" : "2026-12-01T21:15:43Z",
"published" : "2026-12-01T21:15:43Z",
"aliases" : [ "CVE-2026-141523" ],
"summary" : "Ruby JSON: Out of Bound Write in parser when `allow_control_characters: true` is enabled",
"details" : "### Summary\n\nParsing 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.\n\n### Details\n\nIf an ASCI control character is preceded by a backslash, the bound checks can be defeated.\n\nOriginally fixed as a regular bug in `json` `1.9.3`.\n\n### Proof of concept\n\nThe issue can easily be reproduced with a backslash followed by a control character. Some padding is required.\n\n```ruby\nrequire \"json\"\ndoc = '\"' + (\"A\" * 4096) + \"\\\\\\x01\" + '\"'\nJSON.parse(doc, allow_control_characters: true)\n```\n\n### Impact\n\nIf the `allow_control_characters: true` option is used to parse untrusted input, it could be used as a DOS vector.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "json"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.18.0"
}, {
"fixed" : "2.18.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "json"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.19.0"
}, {
"fixed" : "2.19.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ruby/json/security/advisories/GHSA-cjpr-jw2g-fw99"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/json/commit/75e2f6453a3bf79df086ac10e41dbc5b7f124a76"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/json/commit/dcfbbcd36f240c18c3b89e5399105715f70162e3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ruby/json"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/json/releases/tag/v2.18.2"
}, {
"type" : "WEB",
"url" : "https://github.com/ruby/json/releases/tag/v2.19.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-787" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T21:15:43Z",
"nvd_published_at" : null
}
}