{"cve":"CVE-2026-54592","nvd":{"published":"2026-07-01T00:16:32.743","modified":"2026-10-25T17:10:00.197","status":"Deferred","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 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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-125","CWE-787"],"references":["https://github.com/ohler55/oj/security/advisories/GHSA-3m6q-jj5j-38c9","https://github.com/ohler55/oj/security/advisories/GHSA-3m6q-jj5j-38c9"],"products":[],"source":"nvd","synced_at":"2026-10-25T17:50:06.907763985+00:00"},"epss":{"cve":"CVE-2026-54592","score":0.00278,"percentile":0.20043,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-3m6q-jj5j-38c9","url":"https://osv.dev/vulnerability/GHSA-3m6q-jj5j-38c9","summary":"Oj: Stack Buffer Overflow in Oj::Doc#each_child via Deeply Nested Input","modified":"2026-09-10T03:50:55.528576355Z","packages":[{"ecosystem":"RubyGems","name":"oj","purl":"pkg:gem/oj","ranges":["<3.17.3"],"fixed":["3.17.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}