CVE-2017-17405
HIGH 8.8CVSS 3.0Ruby 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.
- Published
- 15 Dec 2017
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-78
- Sources
- NVDJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.0 | HIGH 8.8 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 9.3 | AV:N/AC:M/Au:N/C:C/I:C/A:C |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
>= 2.2, <= 2.2.8 | |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
>= 2.3, <= 2.3.5 | |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:* |
>= 2.4, <= 2.4.2 | |
| NVD | ruby-lang | rubycpe:2.3:a:ruby-lang:ruby:2.5.0:preview1:*:*:*:*:*:* |
= 2.5.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* |
= 8.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| NVD | redhat | enterprise_linux_desktopcpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | redhat | enterprise_linux_servercpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:* |
= 7.0 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:* |
= 7.4 | |
| NVD | redhat | enterprise_linux_server_auscpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:* |
= 7.4 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:* |
= 7.5 | |
| NVD | redhat | enterprise_linux_server_euscpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_server_tuscpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:* |
= 7.4 | |
| NVD | redhat | enterprise_linux_server_tuscpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:* |
= 7.6 | |
| NVD | redhat | enterprise_linux_workstationcpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:* |
= 7.0 |
References
- http://www.securityfocus.com/bid/102204 · Third Party Advisory, VDB Entry
- http://www.securitytracker.com/id/1042004 · Third Party Advisory, VDB Entry
- https://access.redhat.com/errata/RHSA-2018:0378 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:0583 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:0584 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2018:0585 · Third Party Advisory
- https://access.redhat.com/errata/RHSA-2019:2806
- https://lists.debian.org/debian-lts-announce/2017/12/msg00024.html · Mailing List, Third Party Advisory
- https://lists.debian.org/debian-lts-announce/2017/12/msg00025.html · Mailing List, Third Party Advisory
- https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html · Mailing List, Third Party Advisory
- https://www.debian.org/security/2018/dsa-4259 · Third Party Advisory
- https://www.exploit-db.com/exploits/43381/ · Exploit, Third Party Advisory, VDB Entry
- https://www.ruby-lang.org/en/news/2017/12/14/net-ftp-command-injection-cve-2017-17405/ · Vendor Advisory
- https://www.ruby-lang.org/en/news/2017/12/14/ruby-2-4-3-released/ · Patch, Release Notes, Vendor Advisory
History
- 25 Nov 2026 20:20 UTC · NVD: first stored (published 15 Dec 2017)