๐Ÿ” CVE Alert

CVE-2026-54592

HIGH 7.5

Oj: Stack Buffer Overflow in Oj::Doc#each_child via Deeply Nested Input

CVSS Score
7.5
EPSS Score
0.0%
EPSS Percentile
0th

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.

CWE CWE-125 CWE-787
Vendor ohler55
Product oj
Published Jun 30, 2026
Stay Ahead of the Next One

Get instant alerts for ohler55 oj

Be the first to know when new high vulnerabilities affecting ohler55 oj are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

CVSS v3 Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Affected Versions

ohler55 / oj
< 3.17.3

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
github.com: https://github.com/ohler55/oj/security/advisories/GHSA-3m6q-jj5j-38c9