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…

CVE-2026-54502: CWE-121: Stack-based Buffer Overflow in ohler55 oj

0
Medium
VulnerabilityCVE-2026-54502gcvecve-2026-54502cwe-121
Published: 06/30/2026 (06/30/2026, 23:10:27 UTC)
Source: GCVE Database
Vendor/Project: ohler55
Product: oj

Description

Oj (Optimized JSON) is a Ruby gem for JSON parsing and marshalling. Versions prior to 3.17.2 contain a stack-based buffer overflow vulnerability in the Oj.dump function when a large :indent value is used. The vulnerability arises because the fill_indent function calls memset with the indent size unchecked, allowing an attacker to cause a stack overflow by specifying a very large indent value such as INT_MAX. 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/01/2026, 01:37:12 UTC

Technical Analysis

CVE-2026-54502 is a stack-based buffer overflow vulnerability in the Oj Ruby gem (versions before 3.17.2). The vulnerability occurs in the Oj.dump function when a large :indent parameter is provided. Specifically, the fill_indent function calls memset to fill an indent string buffer on the stack without validating the size of the indent parameter. If opts->indent is set to INT_MAX (2,147,483,647), memset attempts to write approximately 2 GB into a stack-allocated buffer of only 4,184 bytes, causing stack corruption and process crash. This vulnerability is addressed in version 3.17.2.

Potential Impact

Exploitation of this vulnerability can cause a stack-based buffer overflow leading to stack corruption and process crashes. This may result in denial of service or potentially enable further exploitation depending on the environment. The CVSS 4.0 base score is 6.3 (medium severity), indicating a significant but not critical impact. No known exploits in the wild have been reported.

Mitigation Recommendations

Upgrade to Oj version 3.17.2 or later, where this vulnerability has been fixed. Since the issue is resolved in the fixed version, no additional mitigation steps are required.

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-15T18:01:15.512Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null
Gcve Source
db.gcve.eu

Threat ID: 6a446e6e27e9c79719c50917

Added to database: 07/01/2026, 01:33:34 UTC

Last enriched: 07/01/2026, 01:37:12 UTC

Last updated: 07/01/2026, 01:51:11 UTC

Views: 3

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