CVE-2017-14064
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.
Severity
CRITICAL
CVSS v3
9.8
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H · source nvd
Exploit chance (EPSS)
9.445%
chance of exploitation in the next 30 days
higher than 95.5% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 1
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Timeline
- 2017-08-31Published by the CNA17:00 UTC
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| ruby-lang ruby | through 2.2.7no fix listed2.3.0no fix listed2.3.1no fix listed2.3.2no fix listed2.3.3no fix listed(+3 more) | not listednot listednot listednot listednot listed |
| canonical ubuntu_linux | 14.04no fix listed16.04no fix listed17.10no fix listed | not listednot listednot listed |
| debian debian_linux | 8.0no fix listed9.0no fix listed | not listednot listed |
| redhat enterprise_linux_desktop | 7.0no fix listed | not listed |
| redhat enterprise_linux_server | 7.0no fix listed | not listed |
| redhat enterprise_linux_server_aus | 7.4no fix listed7.6no fix listed | not listednot listed |
| redhat enterprise_linux_server_eus | 7.4no fix listed7.5no fix listed7.6no fix listed | not listednot listednot listed |
| redhat enterprise_linux_server_tus | 7.4no fix listed7.6no fix listed | not listednot listed |
| redhat enterprise_linux_workstation | 7.0no fix listed | not listed |
References
- https://bugs.ruby-lang.org/issues/13853
- https://github.com/flori/json/commit/8f782fd8e181d9cfe9387ded43a5ca9692266b85
- 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://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/
- https://hackerone.com/reports/209949
- http://www.securityfocus.com/bid/100890
- http://www.securitytracker.com/id/1039363
- http://www.securitytracker.com/id/1042004
- https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2017-14064'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2017-14064'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2017-14064'curl 'https://api.contrastcyber.com/cve_products/CVE-2017-14064'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).