cve.bz

CVE-2026-54502 ohler55 oj: Stack-based Buffer Overflow

6.3 mediumEPSS 0.4%Fix available

Medium (6.3) in ohler55 oj. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in oj 3.17.3.

On this page
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2, Oj.dump is vulnerable to a stack-based buffer overflow when a large :indent value is provided by the developer. fill_indent in dump.h calls memset(indent_str, ' ', (size_t)opts->indent) without validating the size. When opts->indent is set to INT_MAX (2,147,483,647), the (size_t) cast preserves the large value and memset writes 2 GB into the stack-allocated out buffer (4,184 bytes), corrupting the stack and crashing the process. This issue has been fixed in version 3.17.2.

Severity

CVSS 4.0

6.3 medium
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
EPSS
0.4% (unchanged from 0.4% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 35th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2026-07-01. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-121 Stack-based Buffer Overflow
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-54502 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-54502?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-54502?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-54502 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
ohler55 oj< 3.17.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-3v45-f3vh-wg7mRubyGemsoj<3.17.33.17.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12ruby-oj3.14.2-1+deb12u1DEBIAN-CVE-2026-54502 DLA-4803-1
Debian13ruby-oj3.16.3-1+deb13u1DEBIAN-CVE-2026-54502 DSA-6521-1
Debian14ruby-oj3.17.3-1DEBIAN-CVE-2026-54502
Ubuntu14.04:LTS, 16.04:LTS, 18.04:LTS and 6 moreruby-ojno fix listedUBUNTU-CVE-2026-54502

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat's only product shipping the Oj Ruby gem (Compliance Backend) already includes version 3.17.3, which contains the fix for this vulnerability. No Red Hat products are affected.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-54502.

References

Check your stackJSON