{"id":"CVE-2026-54696","published":"2026-06-30T22:05:48Z","modified":"2026-07-01T13:20:56Z","title":"Ruby JSON: JSON generator heap buffer overflow when streaming to an IO","vendor":"ruby","product":"json","tier":"tail","description":{"text":"Ruby JSON is a JSON implementation for Ruby. Versions 2.9.0 through 2.19.8 are vulnerable to heap buffer overflow when the JSON generator is provided with an oversized streamed object. When streaming to an IO JSON.dump(obj, io) and JSON::State#generate(obj, io) can write past the internal JSON generator buffer when a streamed object contains an\nattacker-controlled string near 16 KB. Exploitation would result in a reliable process crash/denial of service. This issue has been fixed in version 2.19.9.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.7,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00412,"percentile":0.36304,"provenance":"source"},"cwes":[{"id":"CWE-122","name":"Heap-based Buffer Overflow"},{"id":"CWE-131","name":"Incorrect Calculation of Buffer Size"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/ruby/json/security/advisories/GHSA-x2f5-4prf-w687","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ruby/json/releases/tag/v2.19.9","tags":["x_refsource_MISC"]}],"priority":{"score":9.9,"factors":[{"name":"EPSS percentile","points":7.26},{"name":"CVSS severity","points":2.59}]},"vendorSlug":"ruby","affectedVersions":[{"vendor":"ruby","product":"json","versions":[">= 2.9.0, < 2.19.9"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-01T13:20:35.390078Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"json","vulnerableRanges":[">=2.9.0, <2.19.9"],"patched":["2.19.9"],"from":["GHSA-x2f5-4prf-w687"],"provenance":"source"}],"summary":{"text":"The Ruby JSON library (product \"json\", from ruby) contains a heap buffer overflow in its JSON generator, affecting versions 2.9.0 through 2.19.8 when streaming output to an IO via JSON.dump(obj, io) or JSON::State#generate(obj, io). An attacker who can supply a streamed object containing a string of roughly 16 KB can cause a write past the generator's internal buffer, which in practice results in a reliable process crash, with the attack requiring no privileges or authentication but depending on the application serialising attacker-controlled content in that streaming path.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:11:14Z"},"euvd":{"id":"EUVD-2026-40626","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2020-10663","published":"2020-04-28","fixed":"2.3.0","kev":false},{"cve":"CVE-2025-27788","published":"2025-03-12","fixed":"2.10.2","kev":false},{"cve":"CVE-2026-33210","published":"2026-03-20","fixed":"2.19.2","kev":false,"link":{"from":"CVE-2026-33210","to":"CVE-2026-54696","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:json","fromFixed":"2.19.2","toFixed":"2.19.9","daysApart":102}]}},{"cve":"CVE-2026-54696","published":"2026-06-30","fixed":"2.19.9","kev":false},{"cve":"CVE-2026-71847","published":"2026-08-07","fixed":"2.21.2","kev":false}],"package":"RubyGems:json"}}