{"id":"CVE-2026-54502","published":"2026-06-30T23:10:27Z","modified":"2026-07-01T15:50:28Z","title":"Oj: Stack Buffer Overflow in Oj.dump via Large Indent","vendor":"ohler55","product":"oj","tier":"tail","description":{"text":"Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2, Oj.dump is vulnerable to a stack-based buffer overflow when a large :indent value is provided by the developer. fill_indent in dump.h calls memset(indent_str, ' ', (size_t)opts->indent) without validating the size. When opts->indent is set to INT_MAX (2,147,483,647), the (size_t) cast preserves the large value and memset writes 2 GB into the stack-allocated out buffer (4,184 bytes), corrupting the stack and crashing the process. This issue has been fixed in version 3.17.2.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00426,"percentile":0.2854,"provenance":"source"},"cwes":[{"id":"CWE-121","name":"Stack-based Buffer Overflow"}],"references":[{"url":"https://github.com/ohler55/oj/security/advisories/GHSA-3v45-f3vh-wg7m","tags":["x_refsource_CONFIRM"]}],"priority":{"score":10.1,"factors":[{"name":"EPSS percentile","points":5.71},{"name":"CVSS severity","points":4.41}]},"vendorSlug":"ohler55","affectedVersions":[{"vendor":"ohler55","product":"oj","versions":["< 3.17.2"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-07-01T15:49:45.690933Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"oj","vulnerableRanges":["<3.17.3"],"patched":["3.17.3"],"from":["GHSA-3v45-f3vh-wg7m"],"provenance":"source"}],"summary":{"text":"The flaw is a stack-based buffer overflow in the Oj (Optimized JSON) Ruby gem from ohler55, in the Oj.dump function, triggered by a large :indent value in the fill_indent routine in dump.h.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:04:18Z"},"euvd":{"id":"EUVD-2026-40850","exploited":false,"provenance":"source"}}