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 in Wolfi
- CGA-26vg-rxwp-c3qc
- CGA-46j5-c97w-mqqj
- CGA-6mw3-m6vw-5vhh
- CGA-74g2-h23q-5f39
- CGA-9cx7-c558-86mh
- CGA-cx85-p749-3fgw
- CGA-fm9p-5pvw-59jc
- CGA-gwgr-8r45-f25q
- CGA-j45j-jr87-xhmj
- CGA-pjg9-jmp9-548f
- CGA-qc42-27mf-7pgq
- CGA-qmrx-7rr2-q656
- CGA-qppq-jrr8-93j3
- CGA-rh62-78f7-5j36
- CGA-v8vv-ccg6-2fqp
- CGA-xgcm-57f5-6cgx