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
MySQL CVE-2024-21050 Vulnerability (CVE-2024-21050)
WordPress Plugin Post Indexer (WPMU DEV) Multiple Vulnerabilities (3.0.6.1)
WordPress Plugin Front File Manager 'upload.php' Arbitrary File Upload (0.1)
WordPress Plugin VDZ Google Analytics or Google Tag Manager/GTM Cross-Site Scripting (1.5.5)
Jetty Exposure of Sensitive Information to an Unauthorized Actor Vulnerability (CVE-2026-10051)