{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-54592","id":"CVE-2026-54592","title":"Oj: Stack Buffer Overflow in Oj::Doc#each_child via Deeply Nested Input","description":"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->where past the where_path[MAX_STACK = 100] array with no boun","descriptionLong":"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->where past the where_path[MAX_STACK = 100] array with no bounds check and never restores it (the doc->where-- is missing), so calling each_child recursively from inside the yield block drives doc->where 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->where - doc->where_path, so when the previous recursive call left doc->where 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.","published":"2026-06-30T23:16:24.378Z","updated":"2026-10-28T10:52:06.883496349Z","reserved":"2026-06-15T19:45:23.539Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["ohler55 oj"],"affectedProducts":[{"vendor":"ohler55","product":"oj","defaultStatus":null,"versions":[{"version":"< 3.17.3","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"RubyGems","name":"oj","purl":"pkg:gem/oj","ranges":["<3.17.3"],"fixed":["3.17.3"],"advisory":"GHSA-3m6q-jj5j-38c9"}],"cwes":["CWE-125","CWE-787"],"aliases":["GHSA-3m6q-jj5j-38c9"],"references":[{"url":"https://github.com/ohler55/oj/security/advisories/GHSA-3m6q-jj5j-38c9","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54592.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54592","tags":["advisory"]},{"url":"https://github.com/ohler55/oj","tags":["package"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.00328,"epssPercentile":0.26281,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-54592","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54592","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-54592","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-3m6q-jj5j-38c9","ok":true,"note":"GHSA-3m6q-jj5j-38c9"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-54592","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}