Description
Ruby through 2.2.7, 2.3.x through 2.3.4, and 2.4.x through 2.4.1 can expose arbitrary memory during a JSON.generate call. The issues lies in using strdup in ext/json/ext/generator/generator.c, which will stop after encountering a '\0' byte, returning a pointer to a string of length zero, which is not the length stored in space_len.
Remediation
References
Related Vulnerabilities
Java Unspesificed Vulnerability (CVE-2018-3149)
Apache HTTP Server CVE-2004-0809 Vulnerability (CVE-2004-0809)
WordPress Plugin Tutor LMS-eLearning and online course solution SQL Injection (2.6.1)
WordPress Plugin Slimstat Analytics Cross-Site Scripting (0.9.2)
WordPress Permissions, Privileges, and Access Controls Vulnerability (CVE-2012-2402)