{"id":"CVE-2026-54900","published":"2026-06-30T23:34:05Z","modified":"2026-07-01T15:48:35Z","title":"Oj: Negative-Size memcpy in Oj::Parser create_id Attribute Handling","vendor":"ohler55","product":"oj","tier":"tail","description":{"text":"Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2, when in usual mode with create_id enabled, Oj::Parser#parse is vulnerable to heap corruption via a negative-size memcpy. When a JSON object key is exactly 65,535 bytes long, an integer truncation in form_attr (usual.c:63) converts the length to -1 before passing it to memcpy. This causes memcpy to copy SIZE_MAX bytes (interpreted as a huge size_t), corrupting heap memory and crashing the process. The issue has been fixed in version 3.17.2.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00516,"percentile":0.44846,"provenance":"source"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/ohler55/oj/security/advisories/GHSA-9cv6-qcjw-4grx","tags":["x_refsource_CONFIRM"]}],"priority":{"score":18.4,"factors":[{"name":"EPSS percentile","points":8.97},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.41}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-07-25","earliestUrl":"https://github.com/HORKimhab/CVE-2026-54900","repos":[{"name":"HORKimhab/CVE-2026-54900","url":"https://github.com/HORKimhab/CVE-2026-54900","stars":0,"created":"2026-07-25"}]},"first":{"date":"2026-07-25","source":"PoC-in-GitHub","url":"https://github.com/HORKimhab/CVE-2026-54900"},"provenance":"source"},"vendorSlug":"ohler55","affectedVersions":[{"vendor":"ohler55","product":"oj","versions":["< 3.17.2"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-07-01T15:47:11.451062Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"oj","vulnerableRanges":["<3.17.3"],"patched":["3.17.3"],"from":["GHSA-9cv6-qcjw-4grx"],"provenance":"source"}],"summary":{"text":"The Oj JSON parser and marshaller gem (oj, by ohler55) contains a flaw in its usual-mode create_id attribute handling, where an integer truncation in form_attr (usual.c) turns a 65,535-byte object key into a length of -1 before it is passed to memcpy. An attacker who can send JSON to Oj::Parser#parse with create_id enabled in affected versions can trigger heap corruption and crash the process, provided the crafted object key is exactly 65,535 bytes long and the attacker has network access to the application without needing any authentication or user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:51:11Z"},"euvd":{"id":"EUVD-2026-40855","exploited":false,"provenance":"source"}}