
CVE catalog
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
- Severity
- Medium · CVSS 6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.15% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | ruby-oj | sid | 3.17.7-1 | fixed |
| Debian | ruby-oj | forky | 3.17.7-1 | fixed |
| Debian | ruby-oj | trixie | 3.16.3-1 | vulnerable |
| Debian | ruby-oj | trixie-security | 3.16.3-1+deb13u1 | fixed |
| Debian | ruby-oj | bookworm | 3.14.2-1 | vulnerable |
| Debian | ruby-oj | bookworm-security | 3.14.2-1+deb12u1 | fixed |
| Cpe | ruby-oj | Not reported | Not reported | vulnerable |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | ruby-oj | source | sid | 3.17.3-1 | not yet assigned | Not reported | Not reported |
| Debian | ruby-oj | source | forky | 3.17.3-1 | not yet assigned | Not reported | Not reported |
| Debian | ruby-oj | source | trixie | 3.16.3-1+deb13u1 | not yet assigned | Not reported | Not reported |
| Debian | ruby-oj | source | bookworm | 3.14.2-1+deb12u1 | not yet assigned | Not reported | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [ruby-oj]Affected
Details (2)
3.14.2-1· amd64 · bookwormAffected · Fixed:
3.14.2-1+deb12u1nvd · ruby-oj · debian · bookworm; nvd · ruby-oj · debian · 12
3.14.2-1· arm64 · bookwormAffected · Fixed:
3.14.2-1+deb12u1nvd · ruby-oj · debian · bookworm; nvd · ruby-oj · debian · 12
[Debian 13 (Trixie)]
- [ruby-oj]Affected
Details (3)
3.16.3-1+b5· amd64 · trixieAffected · Fixed:
3.16.3-1+deb13u1nvd · ruby-oj · debian · 13
3.16.3-1+b5· arm64 · trixieAffected · Fixed:
3.16.3-1+deb13u1nvd · ruby-oj · debian · 13
3.16.3-1+deb13u1· amd64 · trixie-securityFixed · Fixed:
3.16.3-1+deb13u1nvd · ruby-oj · debian · 13
Observed:
References
- [https://github.com/ohler55/oj/security/advisories/GHSA-q2gm-54r6-8fwm]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-54898]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-54898]
- [https://security-tracker.debian.org/tracker/CVE-2026-54898]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-54898.json]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]