Live threats

All CVEs / Ruby-lang

CVE-2017-14064Ruby-lang Ruby

Critical 9.8 No auth needed

Priority
75
CVSS 3.0
9.8
EPSS
9.4%
probability of exploitation in 30 days · percentile 96
Auth required
No
Published
Aug 31, 2017
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-119
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Ruby.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected products (CPE)

VendorProductVersions
ruby-langruby≤ 2.2.7
ruby-langruby2.3.0
ruby-langruby2.3.0
ruby-langruby2.3.0
ruby-langruby2.3.1
ruby-langruby2.3.2
ruby-langruby2.3.3
ruby-langruby2.3.4
ruby-langruby2.4.0
ruby-langruby2.4.0
ruby-langruby2.4.0
ruby-langruby2.4.0
ruby-langruby2.4.0
ruby-langruby2.4.1
debiandebian_linux8.0
debiandebian_linux9.0
canonicalubuntu_linux14.04
canonicalubuntu_linux16.04
canonicalubuntu_linux17.10
redhatenterprise_linux_desktop7.0
redhatenterprise_linux_server7.0
redhatenterprise_linux_server_aus7.4
redhatenterprise_linux_server_aus7.6
redhatenterprise_linux_server_eus7.4
redhatenterprise_linux_server_eus7.5
redhatenterprise_linux_server_eus7.6
redhatenterprise_linux_server_tus7.4
redhatenterprise_linux_server_tus7.6
redhatenterprise_linux_workstation7.0

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.