CVE-2017-17405Ruby-lang Ruby
High 8.8 No auth neededHigh EPSS
Follow: this CVE · Ruby-lang · Ruby-lang Ruby We alert you by email or Slack (account required).
- Priority
- 75
- CVSS 3.0
- 8.8
- EPSS
- 73.8% probability of exploitation in 30 days · percentile 100
- Auth required
- No
- Published
- Dec 15, 2017
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-78
- Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Ruby.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| ruby-lang | ruby | ≥ 2.2 ≤ 2.2.8 |
| ruby-lang | ruby | ≥ 2.3 ≤ 2.3.5 |
| ruby-lang | ruby | ≥ 2.4 ≤ 2.4.2 |
| ruby-lang | ruby | 2.5.0 |
| debian | debian_linux | 7.0 |
| debian | debian_linux | 8.0 |
| debian | debian_linux | 9.0 |
| 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 |
Official sources
References
Links published by the sources. Open them with care.
- www.securityfocus.com Third Party Advisory VDB Entry
- www.securitytracker.com Third Party Advisory VDB Entry
- access.redhat.com Third Party Advisory
- access.redhat.com Third Party Advisory
- access.redhat.com Third Party Advisory
- access.redhat.com Third Party Advisory
- access.redhat.com
- lists.debian.org Mailing List Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- www.debian.org Third Party Advisory
- www.exploit-db.com Exploit Third Party Advisory VDB Entry
- www.ruby-lang.org Vendor Advisory
- www.ruby-lang.org Patch Release Notes Vendor Advisory