{"id":"CVE-2026-54896","published":"2026-06-30T23:20:27Z","modified":"2026-07-01T12:39:09Z","title":"Oj: Heap Buffer Overflow in Oj.dump Exception Serialization 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, when in object mode, Oj.dump is vulnerable to a heap buffer overflow when serializing Exception objects with a large :indent value. The serializer allocates a buffer sized for the object's attributes but does not account for the indent bytes added on each write. With indent: 5000, the accumulation of 5,000-byte indent strings overflows the 13,150-byte heap allocation, corrupting adjacent heap memory. This issue has been fixed in version 3.17.2.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.1,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:L/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.002,"percentile":0.10089,"provenance":"source"},"cwes":[{"id":"CWE-122","name":"Heap-based Buffer Overflow"}],"references":[{"url":"https://github.com/ohler55/oj/security/advisories/GHSA-35w3-pjm6-wj95","tags":["x_refsource_CONFIRM"]}],"priority":{"score":3.5,"factors":[{"name":"EPSS percentile","points":2.02},{"name":"CVSS severity","points":1.47}]},"vendorSlug":"ohler55","affectedVersions":[{"vendor":"ohler55","product":"oj","versions":["< 3.17.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-01T12:39:05.040104Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"oj","vulnerableRanges":["<3.17.3"],"patched":["3.17.3"],"from":["GHSA-35w3-pjm6-wj95"],"provenance":"source"}],"summary":{"text":"The flaw is a heap buffer overflow in the exception serialization path of Oj.dump in Oj (Optimized JSON), a JSON parser and object marshaller packaged as a Ruby gem, affecting versions before 3.17.2. An attacker who can get the application to serialize an Exception object in object mode with a large :indent value (such as 5000) can corrupt adjacent heap memory, which requires only local access and no authentication, privileges, or user interaction, and is conditional on the application passing that indent setting.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:23:45Z"},"euvd":{"id":"EUVD-2026-40852","exploited":false,"provenance":"source"}}