CVE-2018-8779: Input Validation

Published Mar 29, 2018
·
Updated

In Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1, the UNIXServer.open and UNIXSocket.open methods are not checked for null characters. It may be connected to an unintended socket.

Other sources

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

UNIXServer.open accepts the path of the socket to be created at the first parameter. If the path contains NUL (\0) bytes, this method recognize that the path is completed before the NUL bytes. So, if a script accepts an external input as the argument of this method, the attacker can make the socket file in the unintentional path. And, UNIXSocket.open also accepts the path of the socket to be created at the first parameter without checking NUL bytes like UNIXServer.open. So, if a script accepts an external input as the argument of this method, the attacker can accepts the socket file in the unintentional path.

Affected versions:

Ruby 2.2 series: 2.2.9 and earlier Ruby 2.3 series: 2.3.6 and earlier Ruby 2.4 series: 2.4.3 and earlier Ruby 2.5 series: 2.5.0 and earlier

External References:

https://www.ruby-lang.org/en/news/2018/03/28/poisoned-nul-byte-unixsocket-cve-2018-8779/

— Red Hat

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

45 affected componentsFixes available
redhat/ruby<2.2.10
2.2.10
redhat/ruby<2.3.7
2.3.7
redhat/ruby<2.4.4
2.4.4
redhat/ruby<2.5.1
2.5.1
debian/ruby1.8
debian/ruby1.9.1
debian/ruby2.1
debian/ruby2.5
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.0<2.2.10
ruby-lang Ruby>=2.3.0<2.3.7
ruby-lang Ruby>=2.4.0<2.4.4
ruby-lang Ruby>=2.5.0<2.5.1
ruby-lang Ruby=2.6.0-preview1
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=17.10
Debian Debian Linux=7.0
Debian Debian Linux=8.0
Debian Debian Linux=9.0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.3.0<2.3.7-r0
2.3.7-r0
alpine/ruby>=2.3.0<2.3.7-r0
2.3.7-r0
alpine/ruby>=2.4.0<2.4.4-r0
2.4.4-r0
alpine/ruby>=2.4.0<2.4.4-r0
2.4.4-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0
alpine/ruby>=2.5.0<2.5.1-r0
2.5.1-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 2.2.10
  2. Upgrade

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

    Fixed in 2.3.7
  3. Upgrade

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

    Fixed in 2.4.4
  4. Upgrade

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

    Fixed in 2.5.1
  5. Upgrade

    Upgrade macOS Mojave to a version that resolves this vulnerability.

    Fixed in 10.14.1
  6. Upgrade

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

    Fixed in 10.13.6
  7. Upgrade

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

    Fixed in 2.5.1-r0
  8. Upgrade

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

    Fixed in 2.3.7-r0
  9. Upgrade

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

    Fixed in 2.4.4-r0
  10. Upgrade

    Upgrade ruby to a version that resolves this vulnerability.

    Fixed in 2.2.10
  11. Upgrade

    Upgrade ruby to a version that resolves this vulnerability.

    Fixed in 2.3.7
  12. Upgrade

    Upgrade ruby to a version that resolves this vulnerability.

    Fixed in 2.4.4
  13. Upgrade

    Upgrade ruby to a version that resolves this vulnerability.

    Fixed in 2.5.1

Event History

Mar 29, 2018
Data Sourced
09:07 AM
DescriptionSeverityAffected Software
Apr 3, 2018
CVE Published
12:00 AM
Data Sourced
12:00 AM
Remedy
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
DescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·10:00 PM
Data Sourced
via MITRE·10:00 PM
Description
Data Sourced
via OSV·10:29 PM
DescriptionSeverityAffected Software
Jul 21, 2019
Data Sourced
12:15 PM
Weakness
Data Sourced
via NVD·12:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
via NVD·12:15 PM
Affected Software
Jul 27, 2020
Updated
12:00 AM
Affected Software
Feb 17, 2021
Data Sourced
via Red Hat·12:34 AM
DescriptionSeverityAffected Software
Nov 21, 2024
Updated
via NVD·04:14 AM
RemedyAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the vulnerability identifier for this Ruby vulnerability?

The vulnerability identifier for this Ruby vulnerability is CVE-2018-8779.

2

What is the severity level of CVE-2018-8779?

CVE-2018-8779 has a severity level of high (7.5).

3

What is the affected version range of Ruby?

The affected version range of Ruby is before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1.

4

How can I fix CVE-2018-8779 in Ruby?

To fix CVE-2018-8779 in Ruby, you need to update to version 2.2.10, 2.3.7, 2.4.4, 2.5.1, or 2.6.0-preview1.

5

Where can I find more information about CVE-2018-8779?

You can find more information about CVE-2018-8779 at the following references: [https://www.ruby-lang.org/en/news/2018/03/28/poisoned-nul-byte-unixsocket-cve-2018-8779/](https://www.ruby-lang.org/en/news/2018/03/28/poisoned-nul-byte-unixsocket-cve-2018-8779/), [https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=1561957](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=1561957), [https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62991](https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62991).

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