CVE-2026-54897: Use After Free in ohler55 oj
Affects ojSource GCVE Database
Not known to be exploited · fixed in 3.17.2 : patch oj soon.
Data as of 26 Oct 2026, 14:05 UTC
Rated by Threat Radar · No CVSS score from NVD or the CNA
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 10% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.17.2, 3.17.3
Exploitation evidence
Disclosed: evidence found.
CVE published 1 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade oj to 3.17.2; oj to 3.17.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
RubyGemsojpkg:gem/ojOther threats | Affected
| Fixed in
|
| RubyGemsoj | Affected
| Fixed in
|
Ubuntu 14.04 LTSruby-ojpkg:deb/ubuntu/ruby-oj?arch=source&distro=trustyOther threats | Affected
| Fixed in– |
Ubuntu 16.04 LTSruby-ojpkg:deb/ubuntu/ruby-oj?arch=source&distro=xenialOther threats | Affected
| Fixed in– |
Ubuntu 18.04 LTSruby-ojpkg:deb/ubuntu/ruby-oj?arch=source&distro=bionicOther threats | Affected
| Fixed in– |
Ubuntu 20.04 LTSruby-ojpkg:deb/ubuntu/ruby-oj?arch=source&distro=focalOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in versions 3.17.2 and 3.17.3 of the Ruby oj gem. Users should upgrade to these versions or later to remediate this vulnerability.
Description
CVE-2026-54897 is a heap use-after-free vulnerability in the Ruby oj gem (Optimized JSON) versions prior to 3.17.2. The flaw occurs when a Ruby block yields during iteration over Oj::Doc iterators and calls doc.close or d.close, which frees the document's heap memory while the C iterator remains active. This can lead to use-after-free conditions. The vulnerability has been fixed in versions 3.17.2 and 3.17.3.
References
- github.com/ohler55/oj/security/advisories/GHSA-9ppp-w3g4-fh4q (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-54897 (opens in a new tab)
- github.com/ohler55/oj (opens in a new tab)
- github.com/rubysec/ruby-advisory-db/blob/master/gems/oj/CVE-2026-54897.yml (opens in a new tab)
- cve.org/CVERecord/SearchResults?query=CVE-2026-54897 (opens in a new tab)
- ubuntu.com/security/CVE-2026-54897 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-54897 (opens in a new tab)