{"id":"GHSA-cjpr-jw2g-fw99","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.","aliases":["CVE-2026-141523"],"modified":"2026-12-01T21:30:04.283154356Z","published":"2026-12-01T21:15:43Z","database_specific":{"cwe_ids":["CWE-787"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-12-01T21:15:43Z","nvd_published_at":null},"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"}],"affected":[{"package":{"name":"json","ecosystem":"RubyGems","purl":"pkg:gem/json"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.18.0"},{"fixed":"2.18.2"}]}],"versions":["2.18.0","2.18.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-cjpr-jw2g-fw99/GHSA-cjpr-jw2g-fw99.json"}},{"package":{"name":"json","ecosystem":"RubyGems","purl":"pkg:gem/json"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.19.0"},{"fixed":"2.19.3"}]}],"versions":["2.19.0","2.19.1","2.19.2"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-cjpr-jw2g-fw99/GHSA-cjpr-jw2g-fw99.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H"}]}