CVE-2026-54592

HIGH

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

Title source: cna
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2026-54592. PoCs published by HermesNA-1.

AI-analyzed exploit summary This repository contains an auto-generated stub module for CVE-2026-54592, a stack overflow vulnerability in the Oj Ruby gem (versions prior to 3.17.3) when recursively processing deeply nested JSON documents. The code includes placeholder methods (`check`, `run`) but lacks actual exploit implementation.

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.

Exploits (1)

github STUB 1 stars
by HermesNA-1 · pythonpoc
https://github.com/HermesNA-1/SnakeSploit/tree/main/data/modules_generated/cve-2026-54592_optimized_json.py

This repository contains an auto-generated stub module for CVE-2026-54592, a stack overflow vulnerability in the Oj Ruby gem (versions prior to 3.17.3) when recursively processing deeply nested JSON documents. The code includes placeholder methods (`check`, `run`) but lacks actual exploit implementation.

Classification
Stub 98%
Attack Type
Dos
Complexity
Moderate
Reliability
Theoretical
Target: Oj (Optimized JSON) Ruby gem < 3.17.3
No auth needed
Prerequisites: Target must be running a vulnerable version of the Oj gem · Network access to the target service parsing JSON input
mistral-large-3 · analyzed Jul 09, 2026 Full analysis →

References (1)

Core 1
Core References

Scores

CVSS v3 7.5
EPSS 0.0026
EPSS Percentile 18.1%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CISA SSVC

Vulnrichment
Exploitation poc
Automatable yes
Technical Impact partial

Details

CWE
CWE-125 CWE-787
Status published
Products (1)
ohler55/oj < 3.17.3
Published Jul 01, 2026
Tracked Since Jul 01, 2026