Vulnerability
CVE-2026-54902
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. Prior to version 3.17.2, is vulnerable to Use-After-Free when in SAJ mode. The Oj::Parser does not protect cached object keys (≥ 35 bytes) from garbage collection, and a Ruby callback that triggers GC inside hash_end can cause the key string to be reclaimed while the C parser still holds a pointer to it. The subsequent access to the freed string VALUE results in a segfault, confirmed by an RIP pointing to address 0x4242 (a canary-style pattern suggesting control over the freed memory's content). This issue has been fixed in version 3.17.2.
65 advisories report this vulnerability, across 5 ecosystems.
Advisories
- CGA-235g-8845-gv27
- CGA-2p6m-j6wc-gx79
- CGA-32p7-9vxw-vqrp
- CGA-377c-w75v-jw7j
- CGA-3m6v-jqmj-qvvq
- CGA-43qx-49gp-94qg
- CGA-45x9-h789-w427
- CGA-47r3-j4xm-gqrh
- CGA-4fw6-vr32-rjfj
- CGA-52f8-ccvw-75cr
- CGA-543g-r94h-f3qm
- CGA-56jq-x25v-63pf
- CGA-56q4-q94q-62rr
- CGA-573x-gr6h-57fj
- CGA-5jpc-c68v-x4cw
- CGA-5mrq-q4vq-v62j
- CGA-65w7-7pvp-84p7
- CGA-73fj-h578-wqv9
- CGA-7gqc-hhx3-qxwr
- CGA-7qg9-9ff3-5fc5
- CGA-7wqm-mmqg-g8wc
- CGA-8386-qqvf-h88g
- CGA-8fwm-447w-7xj6
- CGA-8hpw-vvwf-x873
- CGA-96q7-97fh-w77j
- CGA-97mw-p4cw-2r6m
- CGA-99fw-p6hx-h843
- CGA-9cq3-63g6-4v8j
- CGA-c2fr-vg4r-jxr4
- CGA-ccqf-3xf4-rh23
- CGA-cx2c-qqjm-63hp
- CGA-fch6-h7wf-2457
- CGA-fgjw-mh3w-75fh
- CGA-fwjp-p89f-2wwh
- CGA-g792-6j3p-hxmp
- CGA-gwfq-xx42-w5fw
- CGA-h2m5-hcp6-79xv
- CGA-hc2r-jmmj-q3r5
- CGA-hhx9-cvr3-qm88
- CGA-hwhv-9x9m-6qfq
- CGA-hxqq-72fv-q2h2
- CGA-j7w9-9hqh-wv59
- CGA-m286-jcrh-wrrj
- CGA-m7vc-m9r9-h3x7
- CGA-mx7h-jxhp-8wx3
- CGA-p4vh-rr7h-3mmp
- CGA-p8pc-25qh-chmw
- CGA-ppc9-c4fc-4vc2
- CGA-q23c-24j2-g2mg
- CGA-q5x3-j9wh-q8mw
- CGA-q76h-v9p3-rm4w
- CGA-qhwm-gff7-5r99
- CGA-qx4v-fr3w-9p8g
- CGA-r6vw-m9r7-g7v6
- CGA-rrm4-wr6p-fv2r
- CGA-rw9q-g8gf-v772
- CGA-vj54-3jfv-8wpj
- CGA-w644-8q94-xwj2
- CGA-x7wj-f955-gf52
- CGA-xx9f-jjfx-9x9p
-
DEBIAN-CVE-2026-54902
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. Prior to version 3.17.2, is vulnerable to Use-After-Free when in SAJ mode. The Oj::Parser does not protect cached object keys (≥ 35…
-
DLA-4803-1
ruby-oj - security update
-
DSA-6521-1
ruby-oj - security update
-
GHSA-m578-w5vf-rfcm
Oj: Use-After-Free in Oj::Parser SAJ Long Key Callback
-
UBUNTU-CVE-2026-54902
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. Prior to version 3.17.2, is vulnerable to Use-After-Free when in SAJ mode. The Oj::Parser does not protect cached object keys (≥ 35…