Ruby oj: Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. (CVE-2026-54901)
Description
Oj (Optimized JSON) is a Ruby gem for JSON parsing and object marshalling. Versions prior to 3.17.2 have a Use-After-Free vulnerability in Oj::Parser's usual mode due to improper garbage collection marking of array_class and hash_class references. This can cause a segmentation fault if the garbage collector reclaims a class object before parsing. The issue is fixed in version 3.17.2.
CVSS v4.0
Affected software
pkg:deb/ubuntu/ruby-oj?arch=source&distro=trustypkg:deb/ubuntu/ruby-oj?arch=source&distro=xenialpkg:deb/ubuntu/ruby-oj?arch=source&distro=bionicpkg:deb/ubuntu/ruby-oj?arch=source&distro=focalpkg:deb/ubuntu/ruby-oj?arch=source&distro=jammypkg:deb/ubuntu/ruby-oj?arch=source&distro=noblepkg:deb/ubuntu/ruby-oj?arch=source&distro=questingpkg:deb/ubuntu/ruby-oj?arch=source&distro=stonkingpkg:deb/ubuntu/ruby-oj?arch=source&distro=resoluteRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Oj (Optimized JSON) affects versions prior to 3.17.2. The Oj::Parser in usual mode does not mark array_class and hash_class references during garbage collection, which can lead to a Use-After-Free condition. If the garbage collector runs after the class is assigned but before a parse operation, the class object may be reclaimed, leaving the parser with a dangling reference. Subsequent parse calls dereference this freed object, causing a segmentation fault. This defect has been addressed and fixed in version 3.17.2.
Potential Impact
Exploitation of this vulnerability can cause a segmentation fault in applications using vulnerable versions of the Oj gem, potentially leading to denial of service. There is no indication of code execution or data corruption beyond the crash. The impact is limited to application stability.
Mitigation Recommendations
Upgrade Oj to version 3.17.2 or later, where this Use-After-Free vulnerability has been fixed. No other mitigation is required as the issue is resolved in the official fix.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- UBUNTU-CVE-2026-54901
- Osv Schema Version
- 1.7.0
- Ecosystems
- ["Ubuntu:14.04:LTS","Ubuntu:16.04:LTS","Ubuntu:18.04:LTS","Ubuntu:20.04:LTS","Ubuntu:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:25.10","Ubuntu:26.10","Ubuntu:26.04:LTS"]
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad3f5f52cdf04f656663534
Added to database: 10/17/2026, 22:25:57 UTC
Last enriched: 10/18/2026, 00:47:18 UTC
Last updated: 10/18/2026, 00:47:18 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.