Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 83%

CVE-2026-54902: CWE-416: Use After Free in ohler55 oj

0
Medium
VulnerabilityCVE-2026-54902cvecve-2026-54902cwe-416
Published: 06/30/2026 (06/30/2026, 23:40:32 UTC)
Source: CVE Database V5
Vendor/Project: ohler55
Product: oj

Description

Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. Prior to version 3.17.2, is vulnerable to Use-After-Free when in SAJ mode. The Oj::Parser does not protect cached object keys (≥ 35 bytes) from garbage collection, and a Ruby callback that triggers GC inside hash_end can cause the key string to be reclaimed while the C parser still holds a pointer to it. The subsequent access to the freed string VALUE results in a segfault, confirmed by an RIP pointing to address 0x4242 (a canary-style pattern suggesting control over the freed memory's content). This issue has been fixed in version 3.17.2.

CVSS v4.0

Score 6.3medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Affected software

oj
pkg:gem/oj
Affected versions
<3.17.2

Run 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

AILast updated: 07/08/2026, 13:01:29 UTC

Technical Analysis

CVE-2026-54902 is a Use-After-Free vulnerability in the ohler55 oj Ruby gem, affecting versions before 3.17.2. The vulnerability occurs in SAJ mode when the Oj::Parser caches object keys of at least 35 bytes without protecting them from Ruby's garbage collector. If a Ruby callback triggers garbage collection inside the hash_end function, the cached key string may be reclaimed while the C parser still references it. Subsequent access to this freed memory results in a segmentation fault, with evidence of control over the freed memory content indicated by an RIP pointing to a canary-style pattern (0x4242). The issue was resolved in version 3.17.2.

Potential Impact

Exploitation of this vulnerability can cause a segmentation fault (crash) in applications using vulnerable versions of the oj gem in SAJ mode. The crash results from accessing freed memory, which may allow an attacker to control the content of the freed memory area. No known exploits in the wild have been reported. The CVSS 4.0 base score is 6.3 (medium severity), indicating a moderate impact with network attack vector, low attack complexity, and limited availability impact.

Mitigation Recommendations

This vulnerability is fixed in oj version 3.17.2. Users should upgrade to version 3.17.2 or later to remediate the issue. No other official remediation or temporary fixes are indicated. Since this is not a cloud service, remediation depends on user action to update the gem.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 6a445a0927e9c7971999d8a0

Added to database: 07/01/2026, 00:06:33 UTC

Last enriched: 07/08/2026, 13:01:29 UTC

Last updated: 08/14/2026, 12:41:11 UTC

Views: 86

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses