Vulnerability
CVE-2026-54502
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->indent) without validating the size. When opts->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.
65 advisories report this vulnerability, across 5 ecosystems.
Advisories
- CGA-22x7-vj8g-j65g
- CGA-23jc-fpmq-694p
- CGA-27xc-x8pj-74xh
- CGA-2wwh-6rp2-2j34
- CGA-3m6h-hw9h-hj4h
- CGA-3w44-q85r-pfr2
- CGA-4f78-qqhv-r7cf
- CGA-4gqw-65w9-pf87
- CGA-4mrf-mx2c-8pcr
- CGA-59vj-ghf4-p53m
- CGA-5c8h-w3j6-mhvc
- CGA-5g62-r2j7-3x45
- CGA-5qf3-gr22-64x3
- CGA-5wjf-6mpr-cf77
- CGA-64vh-8gvv-4xvw
- CGA-69gc-8rgh-cj82
- CGA-7749-c79x-w8mv
- CGA-7hg8-3rc4-432p
- CGA-7r82-76pw-j3jq
- CGA-7w6c-h9fh-jv8p
- CGA-7wq5-vjfh-xcp6
- CGA-84p7-6rx2-8x63
- CGA-8fxw-9fg4-cxx8
- CGA-8g47-6627-2vw6
- CGA-8h37-v49w-h55r
- CGA-8xf6-hqfp-jw3r
- CGA-9j6c-mfh8-6x2p
- CGA-9j82-cx27-fj8v
- CGA-c6rj-7m7q-jwpx
- CGA-cx72-4cj2-6rqm
- CGA-f8pg-87q4-5qfp
- CGA-fj8h-f7qc-jmqh
- CGA-fmqm-8m4v-cxf9
- CGA-fxv6-f24q-7pw3
- CGA-gcp2-52p8-976c
- CGA-gcq5-8cx8-qfj9
- CGA-gj92-5g4c-8qrf
- CGA-gp7x-g586-69w9
- CGA-h3j7-r8xw-9wpm
- CGA-h4wh-fhqg-6qjv
- CGA-hcc3-5mpq-vhpr
- CGA-hrf5-v253-5gwx
- CGA-jg49-vxjg-48cc
- CGA-p8c5-3f77-qgh5
- CGA-pjgc-97xx-rh4c
- CGA-pmh8-jhgr-g97v
- CGA-ppjp-xr6c-5fwc
- CGA-q39q-35qx-7v7x
- CGA-q5jj-5gh2-mh2f
- CGA-qjpj-4xrw-8gq8
- CGA-qm45-2qjc-8f8x
- CGA-rc3c-mmfw-gv54
- CGA-rfq6-26jh-h8f2
- CGA-rjf5-h5f6-m88x
- CGA-rx5r-q9vj-9q75
- CGA-v6gp-3xhw-j7wc
- CGA-vx3w-fqwq-j9wm
- CGA-w7p2-8r8x-m349
- CGA-wr22-9xxm-cfr4
- CGA-xfv9-6qjf-hjh2
-
DEBIAN-CVE-2026-54502
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…
-
DLA-4803-1
ruby-oj - security update
-
DSA-6521-1
ruby-oj - security update
-
GHSA-3v45-f3vh-wg7m
Oj: Stack Buffer Overflow in Oj.dump via Large Indent
-
UBUNTU-CVE-2026-54502
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…