{"id":"CVE-2017-14064","published":"2017-08-31T17:00:00Z","modified":"2024-08-05T19:13:41Z","title":"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","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.09445,"percentile":0.95541,"provenance":"source"},"cwes":[],"references":[{"url":"https://usn.ubuntu.com/3685-1/","tags":["vendor-advisory","x_refsource_UBUNTU"]},{"url":"https://access.redhat.com/errata/RHSA-2018:0585","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://www.debian.org/security/2017/dsa-3966","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-3-5-released/","tags":["x_refsource_CONFIRM"]},{"url":"https://access.redhat.com/errata/RHSA-2018:0378","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://hackerone.com/reports/209949","tags":["x_refsource_MISC"]},{"url":"http://www.securitytracker.com/id/1042004","tags":["vdb-entry","x_refsource_SECTRACK"]},{"url":"https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-2-8-released/","tags":["x_refsource_CONFIRM"]},{"url":"http://www.securitytracker.com/id/1039363","tags":["vdb-entry","x_refsource_SECTRACK"]},{"url":"https://access.redhat.com/errata/RHSA-2017:3485","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://access.redhat.com/errata/RHSA-2018:0583","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://bugs.ruby-lang.org/issues/13853","tags":["x_refsource_MISC"]},{"url":"https://github.com/flori/json/commit/8f782fd8e181d9cfe9387ded43a5ca9692266b85","tags":["x_refsource_MISC"]},{"url":"http://www.securityfocus.com/bid/100890","tags":["vdb-entry","x_refsource_BID"]},{"url":"https://security.gentoo.org/glsa/201710-18","tags":["vendor-advisory","x_refsource_GENTOO"]}],"priority":{"score":19.1,"factors":[{"name":"EPSS percentile","points":19.11}]},"summary":{"text":"The flaw is in Ruby's JSON extension, specifically the generator in ext/json/ext/generator/generator.c, where strdup stops copying at a NUL byte, so affected Ruby versions through 2.2.7, 2.3.x through 2.3.4, and 2.4.x through 2.4.1 mishandle the string length during JSON.generate. An attacker who can influence the data passed to JSON.generate may be able to cause arbitrary memory to be exposed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:51:33Z"},"euvd":{"id":"EUVD-2017-5577","exploited":false,"provenance":"source"}}