# CVE-2026-54902: Oj: Use-After-Free in Oj::Parser SAJ Long Key Callback

- Priority: **Routine**
- Reason: Not severe (CVSS 6.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-06-30 · Modified: 2026-07-01
- Aliases: UBUNTU-CVE-2026-54902, DEBIAN-CVE-2026-54902, CGA-45x9-h789-w427, CGA-56jq-x25v-63pf, CGA-65w7-7pvp-84p7, CGA-8386-qqvf-h88g, CGA-8fwm-447w-7xj6, CGA-8hpw-vvwf-x873, CGA-97mw-p4cw-2r6m, CGA-c2fr-vg4r-jxr4, CGA-g792-6j3p-hxmp, CGA-hwhv-9x9m-6qfq, CGA-hxqq-72fv-q2h2, CGA-mx7h-jxhp-8wx3, CGA-p8pc-25qh-chmw, CGA-q23c-24j2-g2mg, CGA-q76h-v9p3-rm4w, CGA-qx4v-fr3w-9p8g, 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-47r3-j4xm-gqrh, CGA-4fw6-vr32-rjfj, CGA-52f8-ccvw-75cr, CGA-543g-r94h-f3qm, CGA-56q4-q94q-62rr, CGA-573x-gr6h-57fj, CGA-5jpc-c68v-x4cw, CGA-5mrq-q4vq-v62j, CGA-73fj-h578-wqv9, CGA-7gqc-hhx3-qxwr, CGA-7qg9-9ff3-5fc5, CGA-7wqm-mmqg-g8wc, CGA-96q7-97fh-w77j, CGA-99fw-p6hx-h843, CGA-9cq3-63g6-4v8j, CGA-ccqf-3xf4-rh23, CGA-cx2c-qqjm-63hp, CGA-fch6-h7wf-2457, CGA-fgjw-mh3w-75fh, CGA-fwjp-p89f-2wwh, CGA-gwfq-xx42-w5fw, CGA-h2m5-hcp6-79xv, CGA-hc2r-jmmj-q3r5, CGA-hhx9-cvr3-qm88, CGA-j7w9-9hqh-wv59, CGA-m286-jcrh-wrrj, CGA-m7vc-m9r9-h3x7, CGA-p4vh-rr7h-3mmp, CGA-ppc9-c4fc-4vc2, GHSA-m578-w5vf-rfcm, CGA-q5x3-j9wh-q8mw, CGA-qhwm-gff7-5r99, 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
- Record: https://cvemate.com/vulnerability/CVE-2026-54902 · JSON: https://cvemate.com/vulnerability/CVE-2026-54902/json

## Description

```text
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.
```

## Signals

- CVSS: 6.3 medium (v4.0, CVE.org) CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
- EPSS: 0.499%, percentile 44.337%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 38)

- chainguard gitlab-rails-ce-18.1 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.6 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.8 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.9 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.1 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.6 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.8 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.9 (Chainguard): All versions (No fix recorded)
- chainguard ruby3.2-fluentd-kubernetes-daemonset-1.16-kinesis (Chainguard): \< 1.16.11.1.0-r3
- chainguard ruby3.2-fluentd-kubernetes-daemonset-1.17-kinesis (Chainguard): \< 1.17.1.1.2-r10
- chainguard ruby3.2-fluentd-kubernetes-daemonset-1.18-kinesis (Chainguard): \< 1.18.0.1.5-r3
- chainguard ruby3.2-fluentd-kubernetes-daemonset-1.19-kinesis (Chainguard): \< 1.19.2.1.1-r5
- chainguard ruby3.2-kube-logging-operator-fluentd-outputs (Chainguard): \< 6.7.0-r4
- chainguard ruby3.3-fluentd-kubernetes-daemonset-1.16-kinesis (Chainguard): \< 1.16.11.1.0-r3
- chainguard ruby3.3-fluentd-kubernetes-daemonset-1.17-kinesis (Chainguard): \< 1.17.1.1.2-r9
- chainguard ruby3.3-fluentd-kubernetes-daemonset-1.18-kinesis (Chainguard): \< 1.18.0.1.5-r4

## References

- <https://github.com/ohler55/oj/security/advisories/GHSA-m578-w5vf-rfcm>
- <https://ubuntu.com/security/CVE-2026-54902>
- <https://www.cve.org/CVERecord?id=CVE-2026-54902>
- <https://security-tracker.debian.org/tracker/CVE-2026-54902>
- <https://github.com/ohler55/oj>

---

Data as of 2026-12-05T03:32:16.822Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
