CVE-2026-54900 Details
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.
A heap corruption vulnerability has been identified in the Oj (Optimized JSON) Ruby gem, specifically in versions prior to 3.17.2. The issue arises in the JSON parser's usual mode when the create_id feature is enabled. The vulnerability is triggered by a negative-size memcpy caused by an integer truncation. When a JSON object key is exactly 65,535 bytes long, the length is incorrectly truncated to -1, which is then passed to memcpy. This miscalculation leads memcpy to copy an excessive amount of bytes, corrupting heap memory and causing the process to crash.
Users are advised to update to version 3.17.2 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 1, 2026CISA-ADP
Assessed Jul 1, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/ohler55/oj/security/advisories/GHSA-9cv6-qcjw-4grx | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/ohler55/oj/security/advisories/GHSA-9cv6-qcjw-4grx | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-190 | Integer Overflow or Wraparound | [email protected] |
| CWE-787 | Out-of-bounds Write | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Oj | < 3.17.2 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jul 1, 2026 | CVE Modified | CISA-ADP |
| Jul 1, 2026 | New CVE Received | [email protected] |
Volerion