# CVE-2026-54898: Oj: Use-After-Free in Oj::Parser SAJ Callback via Input Mutation

- Priority: **Routine**
- Reason: Not severe (CVSS 2.1, local 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-54898, DEBIAN-CVE-2026-54898, CGA-256x-24mv-f664, CGA-37pv-gx5r-m2c2, CGA-6wv6-mrgf-prv9, CGA-76m7-x639-g2v5, CGA-8x7c-4h7p-vphx, CGA-8xqx-52jj-v4mf, CGA-f7r8-83pc-5xc8, CGA-j7g3-9h92-7m9m, CGA-j7j3-95vh-3vp4, CGA-jpx2-x7rc-5r9v, CGA-m724-7chp-r592, CGA-q3ch-cj9r-mm28, CGA-r3f7-v663-2fhq, CGA-rchj-4qw8-32gc, CGA-vqcj-grw9-3rfh, CGA-wm8w-hrp4-58vq, 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-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-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-jrx7-cp5p-367v, CGA-jw8r-8xvm-92v4, 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, GHSA-q2gm-54r6-8fwm, CGA-px2v-q2rv-m3jm, CGA-px32-6v9m-x2rp, CGA-r76x-6f28-7mcf, CGA-r9m2-cq6g-f86r, CGA-rm36-cf99-hxvm, CGA-rwqj-j8fp-g62c, CGA-w9hj-j7wq-78gg, CGA-wcwg-52qq-mv89, CGA-wgq7-32ww-jf6c, CGA-wq5g-p4x6-x876, CGA-xx7w-h887-9hxv
- Record: https://cvemate.com/vulnerability/CVE-2026-54898 · JSON: https://cvemate.com/vulnerability/CVE-2026-54898/json

## Description

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

## Signals

- CVSS: 2.1 low (v4.0, CVE.org) CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
- EPSS: 0.203%, percentile 10.848%, 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-q2gm-54r6-8fwm>
- <https://ubuntu.com/security/CVE-2026-54898>
- <https://www.cve.org/CVERecord?id=CVE-2026-54898>
- <https://security-tracker.debian.org/tracker/CVE-2026-54898>
- <https://github.com/ohler55/oj>

---

Data as of 2026-12-05T03:44:02.571Z. 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
