{"cve":"CVE-2026-54502","nvd":{"published":"2026-07-01T00:16:32.620","modified":"2026-10-25T17:10:00.197","status":"Deferred","description":"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.","cvss_v4":{"vector":"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","score":6.3},"cvss_v3":null,"cwes":["CWE-121"],"references":["https://github.com/ohler55/oj/security/advisories/GHSA-3v45-f3vh-wg7m","https://github.com/ohler55/oj/security/advisories/GHSA-3v45-f3vh-wg7m"],"products":[],"source":"nvd","synced_at":"2026-10-25T17:50:06.907763985+00:00"},"epss":{"cve":"CVE-2026-54502","score":0.00338,"percentile":0.2695,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-3v45-f3vh-wg7m","url":"https://osv.dev/vulnerability/GHSA-3v45-f3vh-wg7m","summary":"Oj: Stack Buffer Overflow in Oj.dump via Large Indent","modified":"2026-09-10T03:50:55.313173823Z","packages":[{"ecosystem":"RubyGems","name":"oj","purl":"pkg:gem/oj","ranges":["<3.17.3"],"fixed":["3.17.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}