CVE-2026-54502 json
Oj: Stack Buffer Overflow in Oj.dump via Large Indent
published 2026-06-19 4 mo ago modified 2026-10-25 14 d ago also GHSA-3v45-f3vh-wg7m , EUVD-2026-40850
- cvss
- 6.3
- version 4.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 34%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- rubygems oj 3.17.3
- ruby-oj Debian 12 3.14.2-1+deb12u1
- ruby-oj Debian 13 3.16.3-1+deb13u1
- ruby-oj Debian 14 3.17.3-1
debian advisories DEBIAN-CVE-2026-54502
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-54502 updated
Oj: Stack Buffer Overflow in Oj.dump via Large Indent
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 4 mo ago
Exploit prediction
0.40% chance of exploitation in the next 30 days, higher than 34% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/ohler55/oj/security/advisories/GHSA-3v45-f3vh-wg7m referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 6.3 | 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 |
| CNA | 4.0 | 6.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | oj | <3.17.3 |
3.17.3 |
Affected products
- ohler55 oj
Classification
- Weakness
-
- CWE-121 Stack-based Buffer Overflow
References
-
github.com
/ohler55/oj/security/advisories/GHSA-3v45-f3vh-wg7m
exploit, web
-
github.com
/ohler55/oj
package
Sources
- CVE List CVE-2026-54502
- GitHub Advisory GHSA-3v45-f3vh-wg7m
- NVD CVE-2026-54502
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.