Impact
Oj is a Ruby gem that parses JSON into Ruby objects. In versions before 3.17.3, the form_attr routine in intern.c incorrectly passes an uninitialized stack buffer to rb_intern3 when processing object keys of 254 bytes or longer. This triggers an out‑of‑bounds read of len + 1 bytes, and for keys of 256 bytes or more it also reads beyond the 256‑byte stack buffer. The leaked bytes are interned and can surface to the caller as part of a Symbol or in an EncodingError message, effectively exposing contents of the process stack.
Affected Systems
The affected product is the Oj gem produced by ohler55. All releases prior to 3.17.3 are vulnerable. Applications that use Oj.load in :object mode and accept JSON with keys of 254 bytes or more are impacted. Upgrading to version 3.17.3 or newer mitigates the issue.
Risk and Exploitability
The CVSS score of 5.3 denotes a medium severity flaw. EPSS data is not available and the vulnerability is not listed in the CISA KEV catalog, indicating limited or no widespread exploitation to date. Based on the description, it is inferred that an attacker can supply a specially crafted JSON object containing long keys to trigger the uninitialized stack read. The material leaked is stack data, which may contain sensitive information. Because the bug is triggered by normal parsing of input, any system processing untrusted JSON with Oj.load in object mode could be exposed to a memory disclosure.
OpenCVE Enrichment
Github GHSA