CVE-2017-14064: Buffer Overflow

Published Aug 31, 2017
·
Updated

Last updated 25 August 2025

Other sources

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 spacelen.

Upstream patch:

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

References:

https://bugs.ruby-lang.org/issues/13853 https://hackerone.com/reports/209949

— Red Hat

Ruby. Multiple issues in Ruby were addressed in this update.

Credit

CVE-2017-0898, CVE-2017-10784, CVE-2017-14033, CVE-2017-14064, CVE-2017-17405, CVE-2017-17742, CVE-2018-6914, CVE-2018-8777, CVE-2018-8778, CVE-2018-8779, CVE-2018-8780

Affected Software

64 affected componentsFixes available
Apple macOS Mojave<10.14.1
10.14.1
Apple High Sierra
Apple Sierra
Apple macOS High Sierra<10.13.6
10.13.6
Apple El Capitan
ruby-lang Ruby<=2.2.7
ruby-lang Ruby=2.3.0
ruby-lang Ruby=2.3.0-preview1
ruby-lang Ruby=2.3.0-preview2
ruby-lang Ruby=2.3.1
ruby-lang Ruby=2.3.2
ruby-lang Ruby=2.3.3
ruby-lang Ruby=2.3.4
ruby-lang Ruby=2.4.0
ruby-lang Ruby=2.4.0-preview1
ruby-lang Ruby=2.4.0-preview2
ruby-lang Ruby=2.4.0-preview3
ruby-lang Ruby=2.4.0-rc1
ruby-lang Ruby=2.4.1
Debian Debian Linux=8.0
Debian Debian Linux=9.0
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=17.10
redhat Enterprise Linux Desktop=7.0
redhat Enterprise Linux Server=7.0
redhat Enterprise Linux Server Aus=7.4
redhat Enterprise Linux Server Aus=7.6
redhat Enterprise Linux Server Eus=7.4
redhat Enterprise Linux Server Eus=7.5
redhat Enterprise Linux Server Eus=7.6
redhat Enterprise Linux Server Tus=7.4
redhat Enterprise Linux Server Tus=7.6
redhat Enterprise Linux Workstation=7.0
redhat/ruby<2.4.2
2.4.2
redhat/ruby<2.3.5
2.3.5
redhat/ruby<2.2.8
2.2.8
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.2.8-r0
2.2.8-r0
alpine/ruby<2.3.5-r0
2.3.5-r0
alpine/ruby<2.3.5-r0
2.3.5-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby<2.4.2-r0
2.4.2-r0
alpine/ruby2.2<2.2.8-r0
2.2.8-r0
alpine/ruby2.2<2.2.8-r0
2.2.8-r0
debian/ruby1.9.1
1.9.3.194-8.1+deb7u6
debian/ruby2.1
2.1.5-2+deb8u4
debian/ruby2.3
2.3.3-1+deb9u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade macOS Mojave to a version that resolves this vulnerability.

    Fixed in 10.14.1
  2. Upgrade

    Upgrade macOS High Sierra to a version that resolves this vulnerability.

    Fixed in 10.13.6
  3. Upgrade

    Upgrade redhat/ruby to a version that resolves this vulnerability.

    Fixed in 2.4.2
  4. Upgrade

    Upgrade redhat/ruby to a version that resolves this vulnerability.

    Fixed in 2.3.5
  5. Upgrade

    Upgrade redhat/ruby to a version that resolves this vulnerability.

    Fixed in 2.2.8
  6. Upgrade

    Upgrade alpine/ruby to a version that resolves this vulnerability.

    Fixed in 2.4.2-r0
  7. Upgrade

    Upgrade alpine/ruby to a version that resolves this vulnerability.

    Fixed in 2.2.8-r0
  8. Upgrade

    Upgrade alpine/ruby to a version that resolves this vulnerability.

    Fixed in 2.3.5-r0
  9. Upgrade

    Upgrade alpine/ruby2.2 to a version that resolves this vulnerability.

    Fixed in 2.2.8-r0
  10. Upgrade

    Upgrade debian/ruby1.9.1 to a version that resolves this vulnerability.

    Fixed in 1.9.3.194-8.1+deb7u6
  11. Upgrade

    Upgrade debian/ruby2.1 to a version that resolves this vulnerability.

    Fixed in 2.1.5-2+deb8u4
  12. Upgrade

    Upgrade debian/ruby2.3 to a version that resolves this vulnerability.

    Fixed in 2.3.3-1+deb9u1

Event History

Aug 31, 2017
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·05:00 PM
Data Sourced
via MITRE·05:00 PM
Description
Data Sourced
via OSV·05:29 PM
DescriptionSeverityAffected Software
May 13, 2019
Data Sourced
06:48 PM
Weakness
Data Sourced
via NVD·06:48 PM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
via NVD·06:48 PM
Affected Software
Jul 27, 2020
Updated
12:00 AM
Affected Software
Feb 17, 2021
Data Sourced
via Red Hat·01:38 AM
DescriptionSeverityAffected Software
Nov 21, 2024
Updated
via NVD·03:12 AM
RemedyAffected Software
Apr 20, 2025
Updated
via NVD·01:37 AM
Affected Software
Jun 17, 2026
Updated
via NVD·01:05 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2017-14064?

CVE-2017-14064 is a vulnerability in Ruby that can expose arbitrary memory during a JSON.generate call.

2

How severe is CVE-2017-14064?

CVE-2017-14064 has a severity rating of 9.8 out of 10, which is considered critical.

3

Which versions of Ruby are affected by CVE-2017-14064?

Ruby versions through 2.2.7, 2.3.x through 2.3.4, and 2.4.x through 2.4.1 are affected by CVE-2017-14064.

4

How can this vulnerability be fixed?

There is currently no known remedy for CVE-2017-14064. It is recommended to update to a fixed version of Ruby when it becomes available.

5

Where can I find more information about CVE-2017-14064?

More information about CVE-2017-14064 can be found at the following references: [Reference 1](https://bugs.ruby-lang.org/issues/13853), [Reference 2](https://github.com/flori/json/commit/8f782fd8e181d9cfe9387ded43a5ca9692266b85), [Reference 3](https://security-tracker.debian.org/tracker/CVE-2017-14064).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203