Vulnerability
CVE-2026-54500
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.3, Oj.load in :object mode reads uninitialized stack memory (and, for long keys, reads out of bounds) when parsing a JSON object whose key is 254 bytes or longer. The interned bytes can surface to the caller, disclosing process stack memory. In ext/oj/intern.c, form_attr() handles the long-key path by allocating a heap buffer, `b`, populating it with the attribute name, and then freeing it — but it passed the uninitialized stack buffer buf (not b) to rb_intern3(). rb_intern3 therefore reads len + 1 bytes of uninitialized stack memory. When the key length is >= 256, it also reads out of bounds past the 256-byte buf. The resulting bytes are interned and can reach the caller via the produced Symbol or via the EncodingError message raised on invalid UTF-8, leaking process stack contents. This issue has been fixed in version 3.17.3.
65 advisories report this vulnerability, across 5 ecosystems.
Advisories
- CGA-22q8-r7rf-gf2c
- CGA-2mrh-2c67-pqwr
- CGA-2mrp-3ccj-gw4r
- CGA-2qhv-6577-fvf8
- CGA-35vj-jmgr-jv2w
- CGA-3xhx-h4p5-8pj8
- CGA-45mh-5cwc-j6m2
- CGA-4q27-pvr4-65hq
- CGA-5jfg-r45x-249g
- CGA-5mpm-5gg2-q45j
- CGA-5vh5-5jv8-c4xr
- CGA-642j-m6wf-f8mg
- CGA-6h64-55gr-6cqg
- CGA-6rg3-m3j5-gvmj
- CGA-7586-3w86-qpcq
- CGA-79p9-jqhg-4mmx
- CGA-7hvv-p7xv-hcxj
- CGA-7wv3-rcgj-4rwh
- CGA-9773-xhrr-r6pc
- CGA-9hj7-hq8x-x4vc
- CGA-9vhv-2wrf-w7p8
- CGA-cjx8-xp4m-fhh9
- CGA-cm4g-pg4h-xjr6
- CGA-cmqc-x85m-x74g
- CGA-cp9c-6xcx-g586
- CGA-cqch-4988-v75x
- CGA-f7c6-vrfr-qhwp
- CGA-fx4q-cq29-f2cg
- CGA-g2g4-w5c4-q9cm
- CGA-g586-rxf9-2wh2
- CGA-hhww-6p7g-32fw
- CGA-hpwf-x872-j73j
- CGA-j4rx-q2g8-wggv
- CGA-jh8p-xm9c-mjfr
- CGA-m68x-qr62-7xwm
- CGA-m8r4-2fjw-w4q4
- CGA-p548-4v3x-xrxx
- CGA-p5gm-ch9w-c37v
- CGA-p62p-8fr4-8v68
- CGA-pchg-2375-f6fp
- CGA-q67v-cmm5-v9qh
- CGA-qh3v-jhw2-j8h7
- CGA-qmr2-fqq6-vqc5
- CGA-qph6-gqwc-pqhw
- CGA-qrc5-x86v-3x2f
- CGA-qw9x-ffvh-gjh4
- CGA-qwgv-p7hr-92q7
- CGA-r59m-rrfq-x593
- CGA-rg8m-3gvq-5mh6
- CGA-rj38-23w6-3fmh
- CGA-rr4v-3vg8-943q
- CGA-rvmm-hcp3-5pf4
- CGA-v2c3-2vp2-mhhq
- CGA-v8vc-w77h-r9v7
- CGA-wwj5-mqqf-9ff5
- CGA-wxq7-8cpc-v3rg
- CGA-x9jg-phx4-qf53
- CGA-xfwh-c4qh-28qj
- CGA-xq7w-7w46-2f77
- CGA-xv5h-3246-3fh4
-
DEBIAN-CVE-2026-54500
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.3, Oj.load in :object mode reads uninitialized stack memory (and, for long keys, reads out of bounds) when…
-
DLA-4803-1
ruby-oj - security update
-
DSA-6521-1
ruby-oj - security update
-
GHSA-fm7p-mprw-wjm9
Oj: intern.c form_attr (uninitialized stack read)
-
UBUNTU-CVE-2026-54500
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.3, Oj.load in :object mode reads uninitialized stack memory (and, for long keys, reads out of bounds) when…