# CVE-2026-54900: Oj: Negative-Size memcpy in Oj::Parser create_id Attribute Handling

- Severity: Medium 6.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-19T20:47:23.000Z
- Modified: 2026-10-25T17:10:00.197Z
- Also known as: GHSA-9cv6-qcjw-4grx
- Weaknesses: CWE-190, CWE-416, CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- ohler55 oj: < 3.17.2
- oj (RubyGems): before 3.17.3

## Every score

- GitHub_M: 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`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/ohler55/oj/security/advisories/GHSA-9cv6-qcjw-4grx> (exploit, web)
- <https://github.com/ohler55/oj> (package)

## Sources

- CVE List: [CVE-2026-54900](https://www.cve.org/CVERecord?id=CVE-2026-54900), CVE Terms of Use, modified 2026-07-01
- GitHub Advisory Database: [GHSA-9cv6-qcjw-4grx](https://github.com/advisories/GHSA-9cv6-qcjw-4grx), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-54900](https://nvd.nist.gov/vuln/detail/CVE-2026-54900), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-54900 · Whole record: https://cve.day/CVE-2026-54900.json · Rebuilt by cve.day 2026-11-25T22:59:26.857Z
