Ruby before 2.4.3 allows Net::FTP command injection.
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 23 fixed, 4 without a fix
Attack profile from CVSS 3.0 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-78.
Summary
Ruby before 2.4.3 allows Net::FTP command injection. Net::FTP#get, getbinaryfile, gettextfile, put, putbinaryfile, and puttextfile use Kernel#open to open a local file. If the localfile argument starts with the "|" pipe character, the command following the pipe character is executed. The default value of localfile is File.basename(remotefile), so malicious FTP servers could cause arbitrary command execution.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
CPE configurations NVD · 15
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* | 2.2 – 2.2.8; 2.3 – 2.3.5; 2.4 – 2.4.2 | Vulnerable | ruby |
| cpe:2.3:a:ruby-lang:ruby:2.5.0:preview1:*:*:*:*:*:* | 2.5.0 preview1 | Vulnerable | ruby |
| cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Debian |
| cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:* | 7.4 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:* | 7.6 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:* | 7.4 | Vulnerable | Red Hat |
- cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* Versions 2.2 – 2.2.8; 2.3 – 2.3.5; 2.4 – 2.4.2 Vulnerable ·ruby
- cpe:2.3:a:ruby-lang:ruby:2.5.0:preview1:*:*:*:*:*:* Versions 2.5.0 preview1 Vulnerable ·ruby
- cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
- cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:* Versions 7.4 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:* Versions 7.6 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:* Versions 7.4 Vulnerable ·Red Hat
Show 5 more CPE
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:* | 7.5 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:* | 7.6 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:* | 7.4 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:* | 7.6 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:* | 7.0 | Vulnerable | Red Hat |
- cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:* Versions 7.5 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:* Versions 7.6 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:* Versions 7.4 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:* Versions 7.6 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:* Versions 7.0 Vulnerable ·Red Hat
Remediation
Red Hat 5 advisories
- RHSA-2019:2806 Released 2019-09-19 · Red Hat rating Importantruby security update
- Red Hat Enterprise Linux Server AUS (v. 7.3) ruby-2.0.0.648-30.el7_3, ruby-irb-2.0.0.648-30.el7_3, ruby-libs-2.0.0.648-30.el7_3 +6
- Red Hat Enterprise Linux Server E4S (v. 7.3) ruby-2.0.0.648-30.el7_3, ruby-irb-2.0.0.648-30.el7_3, ruby-libs-2.0.0.648-30.el7_3 +6
- Red Hat Enterprise Linux Server Optional AUS (v. 7.3) ruby-devel-2.0.0.648-30.el7_3, ruby-doc-2.0.0.648-30.el7_3, ruby-tcltk-2.0.0.648-30.el7_3 +3
- Red Hat Enterprise Linux Server Optional E4S (v. 7.3) ruby-devel-2.0.0.648-30.el7_3, ruby-doc-2.0.0.648-30.el7_3, ruby-tcltk-2.0.0.648-30.el7_3 +3
- Red Hat Enterprise Linux Server Optional TUS (v. 7.3) ruby-devel-2.0.0.648-30.el7_3, ruby-doc-2.0.0.648-30.el7_3, ruby-tcltk-2.0.0.648-30.el7_3 +3
- Red Hat Enterprise Linux Server TUS (v. 7.3) ruby-2.0.0.648-30.el7_3, ruby-irb-2.0.0.648-30.el7_3, ruby-libs-2.0.0.648-30.el7_3 +6
- RHSA-2018:0585 Released 2018-03-26 · Red Hat rating Importantrh-ruby23-ruby security, bug fix, and enhancement update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-ruby23-ruby-2.3.6-67.el6, rh-ruby23-ruby-devel-2.3.6-67.el6, rh-ruby23-ruby-doc-2.3.6-67.el6 +16
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby23-ruby-2.3.6-67.el7, rh-ruby23-ruby-devel-2.3.6-67.el7, rh-ruby23-ruby-doc-2.3.6-67.el7 +16
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) rh-ruby23-ruby-2.3.6-67.el6, rh-ruby23-ruby-devel-2.3.6-67.el6, rh-ruby23-ruby-doc-2.3.6-67.el6 +16
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.3) rh-ruby23-ruby-2.3.6-67.el7, rh-ruby23-ruby-devel-2.3.6-67.el7, rh-ruby23-ruby-doc-2.3.6-67.el7 +16
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-ruby23-ruby-2.3.6-67.el7, rh-ruby23-ruby-devel-2.3.6-67.el7, rh-ruby23-ruby-doc-2.3.6-67.el7 +16
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-ruby23-ruby-2.3.6-67.el6, rh-ruby23-ruby-devel-2.3.6-67.el6, rh-ruby23-ruby-doc-2.3.6-67.el6 +16
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby23-ruby-2.3.6-67.el7, rh-ruby23-ruby-devel-2.3.6-67.el7, rh-ruby23-ruby-doc-2.3.6-67.el7 +16
- RHSA-2018:0584 Released 2018-03-26 · Red Hat rating Importantrh-ruby24-ruby security, bug fix, and enhancement update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-ruby24-ruby-2.4.3-90.el6, rh-ruby24-ruby-devel-2.4.3-90.el6, rh-ruby24-ruby-doc-2.4.3-90.el6 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby24-ruby-2.4.3-90.el7, rh-ruby24-ruby-devel-2.4.3-90.el7, rh-ruby24-ruby-doc-2.4.3-90.el7 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) rh-ruby24-ruby-2.4.3-90.el6, rh-ruby24-ruby-devel-2.4.3-90.el6, rh-ruby24-ruby-doc-2.4.3-90.el6 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.3) rh-ruby24-ruby-2.4.3-90.el7, rh-ruby24-ruby-devel-2.4.3-90.el7, rh-ruby24-ruby-doc-2.4.3-90.el7 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-ruby24-ruby-2.4.3-90.el7, rh-ruby24-ruby-devel-2.4.3-90.el7, rh-ruby24-ruby-doc-2.4.3-90.el7 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-ruby24-ruby-2.4.3-90.el6, rh-ruby24-ruby-devel-2.4.3-90.el6, rh-ruby24-ruby-doc-2.4.3-90.el6 +17
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby24-ruby-2.4.3-90.el7, rh-ruby24-ruby-devel-2.4.3-90.el7, rh-ruby24-ruby-doc-2.4.3-90.el7 +17
Show 2 more Red Hat advisories
- RHSA-2018:0583 Released 2018-03-26 · Red Hat rating Importantrh-ruby22-ruby security, bug fix, and enhancement update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-ruby22-ruby-2.2.9-19.el6, rh-ruby22-ruby-devel-2.2.9-19.el6, rh-ruby22-ruby-doc-2.2.9-19.el6 +14
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-ruby22-ruby-2.2.9-19.el7, rh-ruby22-ruby-devel-2.2.9-19.el7, rh-ruby22-ruby-doc-2.2.9-19.el7 +14
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) rh-ruby22-ruby-2.2.9-19.el6, rh-ruby22-ruby-devel-2.2.9-19.el6, rh-ruby22-ruby-doc-2.2.9-19.el6 +14
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.3) rh-ruby22-ruby-2.2.9-19.el7, rh-ruby22-ruby-devel-2.2.9-19.el7, rh-ruby22-ruby-doc-2.2.9-19.el7 +14
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-ruby22-ruby-2.2.9-19.el7, rh-ruby22-ruby-devel-2.2.9-19.el7, rh-ruby22-ruby-doc-2.2.9-19.el7 +14
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-ruby22-ruby-2.2.9-19.el6, rh-ruby22-ruby-devel-2.2.9-19.el6, rh-ruby22-ruby-doc-2.2.9-19.el6 +14
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-ruby22-ruby-2.2.9-19.el7, rh-ruby22-ruby-devel-2.2.9-19.el7, rh-ruby22-ruby-doc-2.2.9-19.el7 +14
- RHSA-2018:0378 Released 2018-02-28 · Red Hat rating Importantruby security update
- Red Hat Enterprise Linux Client (v. 7) ruby-2.0.0.648-33.el7_4, ruby-irb-2.0.0.648-33.el7_4, ruby-libs-2.0.0.648-33.el7_4 +6
- Red Hat Enterprise Linux Client Optional (v. 7) ruby-devel-2.0.0.648-33.el7_4, ruby-doc-2.0.0.648-33.el7_4, ruby-tcltk-2.0.0.648-33.el7_4 +3
- Red Hat Enterprise Linux ComputeNode (v. 7) ruby-2.0.0.648-33.el7_4, ruby-irb-2.0.0.648-33.el7_4, ruby-libs-2.0.0.648-33.el7_4 +6
- Red Hat Enterprise Linux ComputeNode Optional (v. 7) ruby-devel-2.0.0.648-33.el7_4, ruby-doc-2.0.0.648-33.el7_4, ruby-tcltk-2.0.0.648-33.el7_4 +3
- Red Hat Enterprise Linux Server (v. 7) ruby-2.0.0.648-33.el7_4, ruby-irb-2.0.0.648-33.el7_4, ruby-libs-2.0.0.648-33.el7_4 +7
- Red Hat Enterprise Linux Server Optional (v. 7) ruby-devel-2.0.0.648-33.el7_4, ruby-doc-2.0.0.648-33.el7_4, ruby-tcltk-2.0.0.648-33.el7_4 +3
- Red Hat Enterprise Linux Workstation (v. 7) ruby-2.0.0.648-33.el7_4, ruby-irb-2.0.0.648-33.el7_4, ruby-libs-2.0.0.648-33.el7_4 +6
- Red Hat Enterprise Linux Workstation Optional (v. 7) ruby-devel-2.0.0.648-33.el7_4, ruby-doc-2.0.0.648-33.el7_4, ruby-tcltk-2.0.0.648-33.el7_4 +3
- Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server (v. 7) ruby-2.0.0.648-33.el7_4, ruby-irb-2.0.0.648-33.el7_4, ruby-libs-2.0.0.648-33.el7_4 +6
- Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server Optional (v. 7) ruby-devel-2.0.0.648-33.el7_4, ruby-doc-2.0.0.648-33.el7_4, ruby-tcltk-2.0.0.648-33.el7_4 +3
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| CloudForms Management Engine 5 | Affected | No fix yet |
| Red Hat Enterprise Linux 5 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Will not fix |
| Red Hat Subscription Asset Manager | Affected | No fix yet |
| Red Hat Enterprise Linux Client (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux Client Optional (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux ComputeNode (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux ComputeNode Optional (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux Server AUS (v. 7.3) | Fixed | RHSA-2019:2806 |
| Red Hat Enterprise Linux Server E4S (v. 7.3) | Fixed | RHSA-2019:2806 |
| Red Hat Enterprise Linux Server Optional (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux Server Optional AUS (v. 7.3) | Fixed | RHSA-2019:2806 |
| Red Hat Enterprise Linux Server Optional E4S (v. 7.3) | Fixed | RHSA-2019:2806 |
| Red Hat Enterprise Linux Server Optional TUS (v. 7.3) | Fixed | RHSA-2019:2806 |
| Red Hat Enterprise Linux Server TUS (v. 7.3) | Fixed | RHSA-2019:2806 |
| Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux Workstation Optional (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server Optional (v. 7) | Fixed | RHSA-2018:0378 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) | Fixed | RHSA-2018:0583, RHSA-2018:0584, RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2018:0583, RHSA-2018:0584, RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) | Fixed | RHSA-2018:0583, RHSA-2018:0584, RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.3) | Fixed | RHSA-2018:0583, RHSA-2018:0584, RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) | Fixed | RHSA-2018:0583, RHSA-2018:0584, RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) | Fixed | RHSA-2018:0583, RHSA-2018:0584, RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2018:0583, RHSA-2018:0584, RHSA-2018:0585 |
Timeline
- 2026-10-02 Threatist record created from CVE-2017-17405
- 2026-10-03 Alias added: GHSA-q23r-c9rf-97q3
References
Exploit 1
Advisory 10
- RHSA-2018:0585
- [debian-lts-announce] 20171225 [SECURITY] [DLA 1222-1] ruby1.8 security update
- RHSA-2018:0378
- https://www.ruby-lang.org/en/news/2017/12/14/net-ftp-command-injection-cve-2017-17405/
- RHSA-2018:0584
- [debian-lts-announce] 20180714 [SECURITY] [DLA 1421-1] ruby2.1 security update
- RHSA-2018:0583
- [debian-lts-announce] 20171225 [SECURITY] [DLA 1221-1] ruby1.9.1 security update
- DSA-4259
- RHSA-2019:2806
Sources
- CVE-2017-17405 · CVE Program
- CVE-2017-17405 · NVD
- FIRST EPSS
- GHSA-q23r-c9rf-97q3 · GitHub Advisory Database · CC BY 4.0
- CVE-2017-17405 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences