Vulnerability
CVE-2026-54897
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. Prior to 3.17.2, Oj::Doc iterators (each_value, each_child, each_leaf) were vulnerable to a heap use-after-free. When a Ruby block yielded during iteration calls doc.close or d.close, the document's heap memory is freed while the C iterator is still running. When control returns from the block, the iterator reads from the freed region, producing a use-after-free accessible from pure Ruby. This issue has been fixed in version 3.17.2.
65 advisories report this vulnerability, across 5 ecosystems.
Advisories
- CGA-24rj-ww3f-9475
- CGA-25c8-8rm4-g68m
- CGA-26vg-rxwp-c3qc
- CGA-2f32-qqpw-8v37
- CGA-2f79-c5ph-3x4h
- CGA-2pcf-g9xr-fmwj
- CGA-2w64-vphc-wjm3
- CGA-33jp-hxxw-fcfr
- CGA-36jc-78h5-x67v
- CGA-3h6g-v2f8-2rm6
- CGA-3mrx-29xh-3vm5
- CGA-424r-587w-wcrh
- CGA-46j5-c97w-mqqj
- CGA-4qh5-qmj4-4689
- CGA-5f9h-gg84-wp96
- CGA-699q-f8jh-cj4w
- CGA-6j7m-3f3w-773r
- CGA-6mw3-m6vw-5vhh
- CGA-6vw4-548h-6h3c
- CGA-74g2-h23q-5f39
- CGA-753m-7c5x-w8q9
- CGA-87qx-q8gr-wgfc
- CGA-8c8x-8p8h-x3pp
- CGA-8jqm-mvp3-28v4
- CGA-8p4r-mhhp-hf9w
- CGA-8r35-qmr4-x2xq
- CGA-967p-x3hm-hcfc
- CGA-9846-r77c-c4cg
- CGA-9cx7-c558-86mh
- CGA-9q2v-6mh7-24hg
- CGA-c4mr-95xp-mp4x
- CGA-cgcx-qfvg-8wr4
- CGA-cqwv-gff2-94q4
- CGA-cx85-p749-3fgw
- CGA-f8ff-hr8p-gh33
- CGA-fh53-4v88-v2rx
- CGA-fm9p-5pvw-59jc
- CGA-gwgr-8r45-f25q
- CGA-hgh6-gj25-r9rw
- CGA-hqw2-hxwc-4pmr
- CGA-hvp7-hr98-fq82
- CGA-j45j-jr87-xhmj
- CGA-jh96-6g96-9mcj
- CGA-p4rf-f5f3-mgrx
- CGA-pjg9-jmp9-548f
- CGA-pwh7-6jcj-cx62
- CGA-q275-jmff-q35p
- CGA-qc42-27mf-7pgq
- CGA-qj4h-vvm9-v8gx
- CGA-qmrx-7rr2-q656
- CGA-qppq-jrr8-93j3
- CGA-rh62-78f7-5j36
- CGA-v8vv-ccg6-2fqp
- CGA-vqpp-43j4-qqpj
- CGA-vr4r-pf72-5q4r
- CGA-vwcc-3fwr-x634
- CGA-w6xp-vcg5-6vrx
- CGA-xgcm-57f5-6cgx
- CGA-xq82-68w3-52pv
- CGA-xrw3-jcrr-348r
-
DEBIAN-CVE-2026-54897
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. Prior to 3.17.2, Oj::Doc iterators (each_value, each_child, each_leaf) were vulnerable to a heap use-after-free. When a Ruby block…
-
DLA-4803-1
ruby-oj - security update
-
DSA-6521-1
ruby-oj - security update
-
GHSA-9ppp-w3g4-fh4q
Oj: Use-After-Free in Oj::Doc Iterators via Reentrant Close
-
UBUNTU-CVE-2026-54897
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. Prior to 3.17.2, Oj::Doc iterators (each_value, each_child, each_leaf) were vulnerable to a heap use-after-free. When a Ruby block…