Vulnerability
CVE-2026-54898
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2,Oj::Parser#parse is vulnerable to a heap use-after-free when a SAJ/SAJ2 callback mutates the input JSON string during parsing. The C engine holds a raw const byte * pointer into the Ruby string's internal buffer. If a callback (e.g. hash_start) resizes the string — for example by calling String#replace with a longer value — Ruby reallocates the string buffer and frees the old one. The C parser's pointer is left dangling; the next character read at parser.c:607 is a use-after-free. This issue has been fixed in version 3.17.2.
65 advisories report this vulnerability, across 5 ecosystems.
Advisories
- CGA-256x-24mv-f664
- CGA-37pv-gx5r-m2c2
- CGA-37w6-h2qf-gxhf
- CGA-3f86-wxrw-fmqm
- CGA-4p82-f956-r57r
- CGA-4xw8-cc8m-pm5w
- CGA-5m7j-h5r3-pv6x
- CGA-5rfm-29wh-c7vq
- CGA-69xh-c349-6whg
- CGA-6hw3-vfmm-f4pp
- CGA-6wv6-mrgf-prv9
- CGA-76m7-x639-g2v5
- CGA-8x7c-4h7p-vphx
- CGA-8xqx-52jj-v4mf
- CGA-97vf-pr83-gc8x
- CGA-99m8-fc5v-6hjf
- CGA-9fp5-82rc-x2hr
- CGA-9r66-pq5q-c33m
- CGA-c44x-6rm9-w7w9
- CGA-cjch-mw2v-f69v
- CGA-f362-vx25-6rxx
- CGA-f43j-h626-7q3v
- CGA-f7r8-83pc-5xc8
- CGA-frr3-2w85-fvp9
- CGA-g23r-hqpv-2mg8
- CGA-gr9g-c63q-qmqv
- CGA-gwx6-vxgg-p6h2
- CGA-hhf8-779v-42fh
- CGA-hq78-2qhh-9hh7
- CGA-hr9h-5ccf-j66p
- CGA-j35q-5mcc-rcw9
- CGA-j7g3-9h92-7m9m
- CGA-j7j3-95vh-3vp4
- CGA-jpx2-x7rc-5r9v
- CGA-jrx7-cp5p-367v
- CGA-jw8r-8xvm-92v4
- CGA-m724-7chp-r592
- CGA-m728-8738-c84q
- CGA-m86h-47fr-mfvg
- CGA-m89q-28p5-xxgg
- CGA-m93v-4x8v-xg7g
- CGA-mm2q-2jv5-3945
- CGA-mwfh-r49q-4wx2
- CGA-pcj3-vxm6-9jgj
- CGA-px2v-q2rv-m3jm
- CGA-px32-6v9m-x2rp
- CGA-q3ch-cj9r-mm28
- CGA-r3f7-v663-2fhq
- CGA-r76x-6f28-7mcf
- CGA-r9m2-cq6g-f86r
- CGA-rchj-4qw8-32gc
- CGA-rm36-cf99-hxvm
- CGA-rwqj-j8fp-g62c
- CGA-vqcj-grw9-3rfh
- CGA-w9hj-j7wq-78gg
- CGA-wcwg-52qq-mv89
- CGA-wgq7-32ww-jf6c
- CGA-wm8w-hrp4-58vq
- CGA-wq5g-p4x6-x876
- CGA-xx7w-h887-9hxv
-
DEBIAN-CVE-2026-54898
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2,Oj::Parser#parse is vulnerable to a heap use-after-free when a SAJ/SAJ2 callback mutates the input JSON…
-
DLA-4803-1
ruby-oj - security update
-
DSA-6521-1
ruby-oj - security update
-
GHSA-q2gm-54r6-8fwm
Oj: Use-After-Free in Oj::Parser SAJ Callback via Input Mutation
-
UBUNTU-CVE-2026-54898
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2,Oj::Parser#parse is vulnerable to a heap use-after-free when a SAJ/SAJ2 callback mutates the input JSON…