{"id":"DEBIAN-CVE-2026-54592","details":"Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.3, Oj::Doc#each_child, when invoked recursively over a deeply nested JSON document, overflows a fixed-size stack buffer and aborts the process, leading to DoS.  In a two-step chain in ext/oj/fast.c, doc_each_child increments doc-\u003ewhere past the where_path[MAX_STACK = 100] array with no bounds check and never restores it (the doc-\u003ewhere-- is missing), so calling each_child recursively from inside the yield block drives doc-\u003ewhere beyond the array. On the next entry  the function copies the path into the 800-byte stack-local buffer save_path[MAX_STACK]  using wlen = doc-\u003ewhere - doc-\u003ewhere_path, so when the previous recursive call left doc-\u003ewhere past where_path[100] the wlen exceeds MAX_STACK and  the memcpy overflows save_path on the C stack; because the Oj::Doc parser imposes no JSON nesting-depth limit (relying on a C-stack pressure check), deeply nested attacker input reaches this path. This issue has been fixed in version 3.17.3.","modified":"2026-09-14T17:03:19.830256442Z","published":"2026-07-01T00:16:32.743Z","upstream":["CVE-2026-54592"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2026-54592"}],"affected":[{"package":{"name":"ruby-oj","ecosystem":"Debian:12","purl":"pkg:deb/debian/ruby-oj?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.14.2-1","3.15.0-1","3.16.0-1","3.16.1-1","3.16.12-1","3.16.15-1","3.16.16-1","3.16.3-1","3.17.0-1","3.17.1-1","3.17.3-1","3.17.4-1","3.17.6-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-54592.json"}},{"package":{"name":"ruby-oj","ecosystem":"Debian:13","purl":"pkg:deb/debian/ruby-oj?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.16.12-1","3.16.15-1","3.16.16-1","3.16.3-1","3.17.0-1","3.17.1-1","3.17.3-1","3.17.4-1","3.17.6-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-54592.json"}},{"package":{"name":"ruby-oj","ecosystem":"Debian:14","purl":"pkg:deb/debian/ruby-oj?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.17.3-1"}]}],"versions":["3.16.12-1","3.16.15-1","3.16.16-1","3.16.3-1","3.17.0-1","3.17.1-1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-54592.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}