ruby: Command injection in lib/resolv.rb:lazy_initialize() allows arbitrary code execution
Published Dec 20, 2017
9.8
CRITICALCVSS 3.0
EPSS 5.91%
Description
The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injection attacks, as demonstrated by a Resolv::Hosts::new argument beginning with a '|' character, a different vulnerability than CVE-2017-17405. NOTE: situations with untrusted input may be highly unlikely.
Affected products
No data.
No data.
Red Hat Enterprise Linux 7
ruby-0:2.0.0.648-33.el7_4
Fixed · RHSA-2018:0378
Red Hat Software Collections for Red Hat Enterprise Linux 6
rh-ruby22-ruby-0:2.2.9-19.el6
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 6
rh-ruby23-ruby-0:2.3.6-67.el6
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 6
rh-ruby24-ruby-0:2.4.3-90.el6
Fixed · RHSA-2018:0584
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
rh-ruby22-ruby-0:2.2.9-19.el6
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
rh-ruby23-ruby-0:2.3.6-67.el6
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
rh-ruby24-ruby-0:2.4.3-90.el6
Fixed · RHSA-2018:0584
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-ruby22-ruby-0:2.2.9-19.el7
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-ruby23-ruby-0:2.3.6-67.el7
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-ruby24-ruby-0:2.4.3-90.el7
Fixed · RHSA-2018:0584
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
rh-ruby22-ruby-0:2.2.9-19.el7
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
rh-ruby23-ruby-0:2.3.6-67.el7
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
rh-ruby24-ruby-0:2.4.3-90.el7
Fixed · RHSA-2018:0584
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-ruby22-ruby-0:2.2.9-19.el7
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-ruby23-ruby-0:2.3.6-67.el7
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-ruby24-ruby-0:2.4.3-90.el7
Fixed · RHSA-2018:0584
CloudForms Management Engine 5
rh-ruby22-ruby
Will not fix
CloudForms Management Engine 5
ruby200-ruby
Will not fix
Red Hat Enterprise Linux 5
ruby
Will not fix
Red Hat Enterprise Linux 6
ruby
Will not fix
Red Hat Subscription Asset Manager
ruby193-ruby
Will not fix
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 7 | ruby-0:2.0.0.648-33.el7_4 | Fixed | RHSA-2018:0378 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-ruby22-ruby-0:2.2.9-19.el6 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-ruby23-ruby-0:2.3.6-67.el6 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-ruby24-ruby-0:2.4.3-90.el6 | Fixed | RHSA-2018:0584 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS | rh-ruby22-ruby-0:2.2.9-19.el6 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS | rh-ruby23-ruby-0:2.3.6-67.el6 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS | rh-ruby24-ruby-0:2.4.3-90.el6 | Fixed | RHSA-2018:0584 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-ruby22-ruby-0:2.2.9-19.el7 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-ruby23-ruby-0:2.3.6-67.el7 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-ruby24-ruby-0:2.4.3-90.el7 | Fixed | RHSA-2018:0584 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS | rh-ruby22-ruby-0:2.2.9-19.el7 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS | rh-ruby23-ruby-0:2.3.6-67.el7 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS | rh-ruby24-ruby-0:2.4.3-90.el7 | Fixed | RHSA-2018:0584 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-ruby22-ruby-0:2.2.9-19.el7 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-ruby23-ruby-0:2.3.6-67.el7 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-ruby24-ruby-0:2.4.3-90.el7 | Fixed | RHSA-2018:0584 |
| CloudForms Management Engine 5 | rh-ruby22-ruby | Will not fix | n/a |
| CloudForms Management Engine 5 | ruby200-ruby | Will not fix | n/a |
| Red Hat Enterprise Linux 5 | ruby | Will not fix | n/a |
| Red Hat Enterprise Linux 6 | ruby | Will not fix | n/a |
| Red Hat Subscription Asset Manager | ruby193-ruby | Will not fix | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This issue affects the versions of ruby as shipped with Red Hat Enterprise Linux 5, 6 and 7. Red Hat Product Security has rated this issue as having Low security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
1 other source (Red Hat) ▾
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
AV:N/AC:L/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (20 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 5.91% (0.05913) | 93.01th | v5 (v2026.06.15) |
| Jun 15, 2026 | 5.91% (0.05913) | 92.27th | v5 (v2026.06.15) |
| Dec 4, 2025 | 4.75% (0.04754) | 89.02th | v4 (v2025.03.14) |
| Jun 19, 2025 | 8.37% (0.08371) | 91.84th | v4 (v2025.03.14) |
| Jun 6, 2025 | 3.67% (0.03672) | 87.31th | v4 (v2025.03.14) |
| Apr 13, 2025 | 0.97% (0.00971) | 74.71th | v4 (v2025.03.14) |
| Apr 12, 2025 | 3.33% (0.03334) | 86.22th | v4 (v2025.03.14) |
| Mar 30, 2025 | 7.65% (0.07646) | 91.06th | v4 (v2025.03.14) |
| Mar 29, 2025 | 24.35% (0.24346) | 93.69th | v4 (v2025.03.14) |
| Mar 17, 2025 | 7.65% (0.07646) | 91.26th | v4 (v2025.03.14) |
| Jul 20, 2024 | 2.80% (0.02800) | 90.76th | v3 (v2023.03.01) |
| May 8, 2023 | 2.80% (0.02800) | 89.08th | v3 (v2023.03.01) |
| Mar 7, 2023 | 3.08% (0.03084) | 89.49th | v3 (v2023.03.01) |
| Mar 6, 2023 | 3.54% (0.03535) | 84.88th | v2 (v2022.01.01) |
| Apr 1, 2022 | 3.54% (0.03535) | 83.33th | v2 (v2022.01.01) |
| Feb 4, 2022 | 3.54% (0.03535) | 66.49th | v2 (v2022.01.01) |
| Feb 3, 2022 | 2.07% (0.02069) | 50.36th | v1 |
| Jan 6, 2022 | 2.07% (0.02069) | 49.86th | v1 |
| Sep 1, 2021 | 2.07% (0.02069) | 77.27th | v1 |
| Apr 14, 2021 | 2.07% (0.02069) | 0.00th | v1 |
References (13)
- https://access.redhat.com/errata/RHSA-2018:0378 vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2018:0583 vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2018:0584 vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2018:0585 vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2017-17790 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1528218 Issue Tracking
- https://github.com/ruby/ruby/pull/1777 x_refsource_CONFIRMExploitIssue TrackingThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2017/12/msg00024.html mailing-listx_refsource_MLIST
- https://lists.debian.org/debian-lts-announce/2017/12/msg00025.html mailing-listx_refsource_MLIST
- https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html mailing-listx_refsource_MLIST
- https://nvd.nist.gov/vuln/detail/CVE-2017-17790
- https://www.cve.org/CVERecord?id=CVE-2017-17790
- https://www.debian.org/security/2018/dsa-4259 vendor-advisoryx_refsource_DEBIAN
Change history (0)
No recorded changes yet.