{"id":"CVE-2026-54500","published":"2026-06-30T23:08:28Z","modified":"2026-07-01T14:26:18Z","title":"Oj: intern.c form_attr has an uninitialized stack read","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.3, Oj.load in :object mode reads uninitialized stack memory (and, for long keys, reads out of bounds) when parsing a JSON object whose key is 254 bytes or longer. The interned bytes can surface to the caller, disclosing process stack memory. In ext/oj/intern.c, form_attr() handles the long-key path by allocating a heap buffer, `b`, populating it with the attribute name, and then freeing it — but it passed the uninitialized stack buffer buf (not b) to rb_intern3(). rb_intern3 therefore reads len + 1 bytes of uninitialized stack memory. When the key length is >= 256, it also reads out of bounds past the 256-byte buf. The resulting bytes are interned and can reach the caller via the produced Symbol or via the EncodingError message raised on invalid UTF-8, leaking process stack contents. This issue has been fixed in version 3.17.3.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00198,"percentile":0.09665,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"},{"id":"CWE-908","name":"Use of Uninitialized Resource"}],"references":[{"url":"https://github.com/ohler55/oj/security/advisories/GHSA-fm7p-mprw-wjm9","tags":["x_refsource_CONFIRM"]}],"priority":{"score":5.6,"factors":[{"name":"EPSS percentile","points":1.93},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"ohler55","affectedVersions":[{"vendor":"ohler55","product":"oj","versions":["< 3.17.3"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-07-01T13:34:29.080763Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"oj","vulnerableRanges":["<3.17.3"],"patched":["3.17.3"],"from":["GHSA-fm7p-mprw-wjm9"],"provenance":"source"}],"summary":{"text":"The Oj JSON parser gem (ohler55/oj), in versions prior to 3.17.3, contains an uninitialized stack read and out-of-bounds read in the long-key handling of form_attr() in ext/oj/intern.c. An attacker who can supply JSON with an object key of 254 bytes or longer to Oj.load in :object mode can cause process stack memory to be read and interned, with the leaked bytes returned to the caller through the resulting Symbol or an EncodingError message, so the attack requires no authentication or user interaction and only that the application parse attacker-supplied input in :object mode.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:19:16Z"},"euvd":{"id":"EUVD-2026-40849","exploited":false,"provenance":"source"}}