CVE-2026-54898Oj: Use-After-Free in Oj::Parser SAJ Callback via Input Mutation
Updated under an hour ago ()
Does this affect you?
It affects ohler55 oj. Add what you run to find out whether that includes you.
No exploitation reported and no EPSS estimate yet.
Do this next
Free account, 1 product
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.
- CVSS
- 2.1 LOW (v4.0, CNA)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
- Weakness (CWE)
- CWE-416
- Known exploited
- Not in CISA's KEV catalog
- EPSS (exploitation in the next 30 days)
- Not loaded for this CVE
- Assigned by
- GitHub_M
- NVD analysis
- Deferred
- Record last updated
- Jul 1, 2026
- First seen by InfoSec Signals
- Oct 9, 2026
Affected products
ohler55 oj ohler55:oj (from the name) | before 3.17.2 | CNA record |
References
- https://github.com/ohler55/oj/security/advisories/GHSA-q2gm-54r6-8fwmx-refsource-confirm
The CVE record on cve.org NVD's entry
The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.