# CVE-2026-54502: Oj: Stack Buffer Overflow in Oj.dump via Large Indent

- 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-54502, DEBIAN-CVE-2026-54502, CGA-5c8h-w3j6-mhvc, CGA-5wjf-6mpr-cf77, CGA-69gc-8rgh-cj82, CGA-8h37-v49w-h55r, CGA-9j82-cx27-fj8v, CGA-f8pg-87q4-5qfp, CGA-fxv6-f24q-7pw3, CGA-gcp2-52p8-976c, CGA-gcq5-8cx8-qfj9, CGA-gj92-5g4c-8qrf, CGA-p8c5-3f77-qgh5, CGA-ppjp-xr6c-5fwc, CGA-qjpj-4xrw-8gq8, CGA-qm45-2qjc-8f8x, CGA-rc3c-mmfw-gv54, CGA-rx5r-q9vj-9q75, CGA-22x7-vj8g-j65g, CGA-23jc-fpmq-694p, CGA-27xc-x8pj-74xh, CGA-2wwh-6rp2-2j34, CGA-3m6h-hw9h-hj4h, CGA-3w44-q85r-pfr2, CGA-4f78-qqhv-r7cf, CGA-4gqw-65w9-pf87, CGA-4mrf-mx2c-8pcr, CGA-59vj-ghf4-p53m, CGA-5g62-r2j7-3x45, CGA-5qf3-gr22-64x3, CGA-64vh-8gvv-4xvw, CGA-7749-c79x-w8mv, CGA-7hg8-3rc4-432p, CGA-7r82-76pw-j3jq, CGA-7w6c-h9fh-jv8p, CGA-7wq5-vjfh-xcp6, CGA-84p7-6rx2-8x63, CGA-8fxw-9fg4-cxx8, CGA-8g47-6627-2vw6, CGA-8xf6-hqfp-jw3r, CGA-9j6c-mfh8-6x2p, CGA-c6rj-7m7q-jwpx, CGA-cx72-4cj2-6rqm, CGA-fj8h-f7qc-jmqh, CGA-fmqm-8m4v-cxf9, CGA-gp7x-g586-69w9, CGA-h3j7-r8xw-9wpm, CGA-h4wh-fhqg-6qjv, CGA-hcc3-5mpq-vhpr, CGA-hrf5-v253-5gwx, CGA-jg49-vxjg-48cc, CGA-pjgc-97xx-rh4c, CGA-pmh8-jhgr-g97v, GHSA-3v45-f3vh-wg7m, CGA-q39q-35qx-7v7x, CGA-q5jj-5gh2-mh2f, CGA-rfq6-26jh-h8f2, CGA-rjf5-h5f6-m88x, CGA-v6gp-3xhw-j7wc, CGA-vx3w-fqwq-j9wm, CGA-w7p2-8r8x-m349, CGA-wr22-9xxm-cfr4, CGA-xfv9-6qjf-hjh2
- Record: https://cvemate.com/vulnerability/CVE-2026-54502 · JSON: https://cvemate.com/vulnerability/CVE-2026-54502/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.dump is vulnerable to a stack-based buffer overflow when a large :indent value is provided by the developer. fill_indent in dump.h calls memset(indent_str, ' ', (size_t)opts->indent) without validating the size. When opts->indent is set to INT_MAX (2,147,483,647), the (size_t) cast preserves the large value and memset writes 2 GB into the stack-allocated out buffer (4,184 bytes), corrupting the stack and crashing the process. 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.401%, percentile 36.432%, 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-3v45-f3vh-wg7m>
- <https://ubuntu.com/security/CVE-2026-54502>
- <https://www.cve.org/CVERecord?id=CVE-2026-54502>
- <https://security-tracker.debian.org/tracker/CVE-2026-54502>
- <https://github.com/ohler55/oj>

---

Data as of 2026-12-05T05:11:13.949Z. 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
