CVE Catalog

CVE-2017-14064

Critical
Published: Translated: NVD NIST

Summary

A vulnerability in the JSON library of Ruby (versions up to 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 issue lies in using strdup in ext/json/ext/generator/generator.c, which stops after encountering a null byte, returning a pointer to an empty string inconsistent with the actual length stored in space_len.

Risk Assessment

An attacker can exploit this vulnerability to read sensitive data from process memory, such as private keys, passwords, or other confidential information, leading to a breach of system confidentiality.

Recommendation

Immediately upgrade Ruby to version 2.2.8, 2.3.5, 2.4.2 or later, which include a fix for the memory exposure issue.

Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS