<Vulnerability name="CVE-2026-54502">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-06-30T23:10:27</PublicDate>
    <Bugzilla id="2495807" url="https://bugzilla.redhat.com/show_bug.cgi?id=2495807" xml:lang="en:us">
Oj: Stack Buffer Overflow in Oj.dump via Large Indent
    </Bugzilla>
    <Details xml:lang="en:us" source="Mitre">
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2, Oj.dump is vulnerable to a stack-based buffer overflow when a large :indent value is provided by the developer. fill_indent in dump.h calls memset(indent_str, ' ', (size_t)opts-&gt;indent) without validating the size. When opts-&gt;indent is set to INT_MAX (2,147,483,647), the (size_t) cast preserves the large value and memset writes 2 GB into the stack-allocated out buffer (4,184 bytes), corrupting the stack and crashing the process. This issue has been fixed in version 3.17.2.
    </Details>
    <Statement xml:lang="en:us">
Red Hat's only product shipping the Oj Ruby gem (Compliance Backend) already includes version 3.17.3, which contains the fix for this vulnerability. No Red Hat products are affected.
    </Statement>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-54502
https://nvd.nist.gov/vuln/detail/CVE-2026-54502
https://github.com/ohler55/oj/security/advisories/GHSA-3v45-f3vh-wg7m
    </References>
</Vulnerability>