CVE-2026-54901: CWE-416: Use After Free in ohler55 oj
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2, Oj::Parser in usual mode does not mark array_class and hash_class references during garbage collection, leading to Use-After-Free. If GC runs after the class is assigned but before a parse, the class object is reclaimed, leaving the parser holding a dangling VALUE. The subsequent parse call dereferences the freed object, producing a segfault. This issue has been fixed in version 3.17.2.
AI Analysis
Technical Summary
CVE-2026-54901 is a Use-After-Free vulnerability in the Oj Ruby gem (versions before 3.17.2). The vulnerability arises because Oj::Parser in usual mode does not mark array_class and hash_class references during garbage collection. If the garbage collector runs after these classes are assigned but before a parse operation, the class objects may be reclaimed, leaving the parser with dangling references. When the parser subsequently attempts to parse JSON, it dereferences these freed objects, resulting in a segmentation fault. This vulnerability has been addressed and fixed in version 3.17.2.
Potential Impact
Exploitation of this vulnerability leads to a segmentation fault in the Oj parser, causing a denial of service by crashing the parsing process. There is no indication of code execution or data corruption beyond the crash. The CVSS 4.0 score is 6.3 (medium severity), reflecting network attack vector, low complexity, no privileges required, no user interaction, and limited impact confined to availability.
Mitigation Recommendations
Upgrade Oj to version 3.17.2 or later, where this Use-After-Free vulnerability is fixed. No other mitigation is indicated or required.
CVE-2026-54901: CWE-416: Use After Free in ohler55 oj
Description
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2, Oj::Parser in usual mode does not mark array_class and hash_class references during garbage collection, leading to Use-After-Free. If GC runs after the class is assigned but before a parse, the class object is reclaimed, leaving the parser holding a dangling VALUE. The subsequent parse call dereferences the freed object, producing a segfault. This issue has been fixed in version 3.17.2.
CVSS v4.0
Score 6.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-54901 is a Use-After-Free vulnerability in the Oj Ruby gem (versions before 3.17.2). The vulnerability arises because Oj::Parser in usual mode does not mark array_class and hash_class references during garbage collection. If the garbage collector runs after these classes are assigned but before a parse operation, the class objects may be reclaimed, leaving the parser with dangling references. When the parser subsequently attempts to parse JSON, it dereferences these freed objects, resulting in a segmentation fault. This vulnerability has been addressed and fixed in version 3.17.2.
Potential Impact
Exploitation of this vulnerability leads to a segmentation fault in the Oj parser, causing a denial of service by crashing the parsing process. There is no indication of code execution or data corruption beyond the crash. The CVSS 4.0 score is 6.3 (medium severity), reflecting network attack vector, low complexity, no privileges required, no user interaction, and limited impact confined to availability.
Mitigation Recommendations
Upgrade Oj to version 3.17.2 or later, where this Use-After-Free vulnerability is fixed. No other mitigation is indicated or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-16T13:49:33.555Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a445a0927e9c7971999d89d
Added to database: 07/01/2026, 00:06:33 UTC
Last enriched: 07/08/2026, 13:01:22 UTC
Last updated: 08/11/2026, 12:41:11 UTC
Views: 72
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.
External Links
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.