CVE-2017-14064

CRITICAL
New! CVE Severity Now Using CVSS v3

The calculated severity for CVEs has been updated to use CVSS v3 by default. CVEs that do not have a CVSS v3 score will fall back CVSS v2 for calculating severity. Severity display preferences can be toggled in the settings dropdown.

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.

References

http://www.securityfocus.com/bid/100890

http://www.securitytracker.com/id/1039363

http://www.securitytracker.com/id/1042004

https://access.redhat.com/errata/RHSA-2017:3485

https://access.redhat.com/errata/RHSA-2018:0378

https://access.redhat.com/errata/RHSA-2018:0583

https://access.redhat.com/errata/RHSA-2018:0585

https://bugs.ruby-lang.org/issues/13853

https://github.com/flori/json/commit/8f782fd8e181d9cfe9387ded43a5ca9692266b85

https://hackerone.com/reports/209949

https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html

https://security.gentoo.org/glsa/201710-18

https://usn.ubuntu.com/3685-1/

https://www.debian.org/security/2017/dsa-3966

https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-2-8-released/

https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-3-5-released/

Details

Source: MITRE

Published: 2017-08-31

Updated: 2019-05-13

Type: CWE-119

Risk Information

CVSS v2

Base Score: 7.5

Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P

Impact Score: 6.4

Exploitability Score: 10

Severity: HIGH

CVSS v3

Base Score: 9.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Impact Score: 5.9

Exploitability Score: 3.9

Severity: CRITICAL

Vulnerable Software

Configuration 1

OR

cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* versions up to 2.2.7 (inclusive)

cpe:2.3:a:ruby-lang:ruby:2.3.0:*:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.3.0:preview1:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.3.0:preview2:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.3.1:*:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.3.2:*:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.3.3:*:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.3.4:*:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.4.0:*:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.4.0:preview1:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.4.0:preview2:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.4.0:preview3:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.4.0:rc1:*:*:*:*:*:*

cpe:2.3:a:ruby-lang:ruby:2.4.1:*:*:*:*:*:*:*

Configuration 2

OR

cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*

cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*

Configuration 3

OR

cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*

cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*

cpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:*

Configuration 4

OR

cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*

cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*

Tenable Plugins

View all (28 total)

IDNameProductFamilySeverity
137599SUSE SLES12 Security Update : ruby2.1 (SUSE-SU-2020:1570-1)NessusSuSE Local Security Checks
high
127164NewStart CGSL MAIN 5.04 : ruby Multiple Vulnerabilities (NS-SA-2019-0013)NessusNewStart CGSL Local Security Checks
high
124910EulerOS Virtualization for ARM 64 3.0.1.0 : ruby (EulerOS-SA-2019-1407)NessusHuawei Local Security Checks
high
700517macOS 10.13.x < 10.13.6 Multiple VulnerabilitiesNessus Network MonitorOperating System Detection
critical
121731Photon OS 1.0: Ruby PHSA-2017-0034NessusPhotonOS Local Security Checks
critical
118573macOS and Mac OS X Multiple Vulnerabilities (Security Update 2018-005)NessusMacOS X Local Security Checks
critical
117557EulerOS Virtualization 2.5.0 : ruby (EulerOS-SA-2018-1248)NessusHuawei Local Security Checks
high
111883Photon OS 1.0: Ruby / Tcpdump PHSA-2017-0034 (deprecated)NessusPhotonOS Local Security Checks
critical
111137macOS 10.13.x < 10.13.6 Multiple VulnerabilitiesNessusMacOS X Local Security Checks
critical
111136macOS and Mac OS X Multiple Vulnerabilities (Security Update 2018-004)NessusMacOS X Local Security Checks
critical
111081Debian DLA-1421-1 : ruby2.1 security updateNessusDebian Local Security Checks
critical
110551Ubuntu 14.04 LTS / 16.04 LTS / 17.10 : Ruby vulnerabilities (USN-3685-1)NessusUbuntu Local Security Checks
critical
108471EulerOS 2.0 SP2 : ruby (EulerOS-SA-2018-1067)NessusHuawei Local Security Checks
high
108470EulerOS 2.0 SP1 : ruby (EulerOS-SA-2018-1066)NessusHuawei Local Security Checks
high
107270CentOS 7 : ruby (CESA-2018:0378)NessusCentOS Local Security Checks
critical
107084Scientific Linux Security Update : ruby on SL7.x x86_64 (20180228)NessusScientific Linux Local Security Checks
critical
107082RHEL 7 : ruby (RHSA-2018:0378)NessusRed Hat Local Security Checks
critical
107080Oracle Linux 7 : ruby (ELSA-2018-0378)NessusOracle Linux Local Security Checks
critical
105751Ubuntu 14.04 LTS / 16.04 LTS / 17.10 : ruby1.9.1, ruby2.3 vulnerabilities (USN-3528-1)NessusUbuntu Local Security Checks
critical
104181Amazon Linux AMI : ruby24 (ALAS-2017-915)NessusAmazon Linux Local Security Checks
critical
103911GLSA-201710-18 : Ruby: Multiple vulnerabilitiesNessusGentoo Local Security Checks
critical
103692Ubuntu 14.04 LTS : ruby1.9.1 vulnerabilities (USN-3439-1)NessusUbuntu Local Security Checks
critical
103603Amazon Linux AMI : ruby22 / ruby23 (ALAS-2017-906)NessusAmazon Linux Local Security Checks
critical
103472Debian DLA-1114-1 : ruby1.9.1 security updateNessusDebian Local Security Checks
critical
103345FreeBSD : ruby -- multiple vulnerabilities (95b01379-9d52-11e7-a25c-471bafc3262f)NessusFreeBSD Local Security Checks
critical
103341Fedora 25 : ruby (2017-e136d63c99)NessusFedora Local Security Checks
critical
103308Slackware 14.2 / current : ruby (SSA:2017-261-03)NessusSlackware Local Security Checks
critical
102964Debian DSA-3966-1 : ruby2.3 - security updateNessusDebian Local Security Checks
critical