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.
2.0.10-12.1.4-12.4.0-12.5.3-12.12.10-32.12.10-3build12.12.10-42.12.10-4build12.17.4-13.4.0-13.4.0-1build13.10.1-13.10.1-1build13.8.1-13.9.1-13.9.2-13.11.0-13.13.7-13.13.7-1build13.13.9-13.13.9-1build13.15.0-13.16.1-13.16.3-13.16.3-1build13.16.3-1build23.16.3-1build33.16.12-13.16.15-13.16.3-1build3Exploitability
AV:NAC:LAT:PPR:NUI:NVulnerable System
VC:NVI:NVA:LSubsequent System
SC:NSI:NSA:NCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N