{"id":"CVE-2017-17405","published":"2017-12-15T09:00:00Z","modified":"2024-08-05T20:51:31Z","title":"Ruby before 2.4.3 allows Net::FTP command injection","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"Ruby versions before 2.4.3 contain a command injection flaw in the Net::FTP library, where the get, getbinaryfile, gettextfile, put, putbinaryfile, and puttextfile methods pass the localfile argument to Kernel#open, so a localfile value beginning with a pipe character causes the following text to run as a shell command. An attacker operating a malicious FTP server can trigger arbitrary command execution on a client that uses these methods with default arguments, because the default localfile is derived from the remote file name the server supplies.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:19:07Z"},"cvss":null,"epss":{"score":0.73829,"percentile":0.99475,"date":"2026-10-28","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[],"references":[{"url":"https://access.redhat.com/errata/RHSA-2018:0585","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://lists.debian.org/debian-lts-announce/2017/12/msg00024.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://access.redhat.com/errata/RHSA-2018:0378","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"http://www.securityfocus.com/bid/102204","tags":["vdb-entry","x_refsource_BID"]},{"url":"http://www.securitytracker.com/id/1042004","tags":["vdb-entry","x_refsource_SECTRACK"]},{"url":"https://www.ruby-lang.org/en/news/2017/12/14/net-ftp-command-injection-cve-2017-17405/","tags":["x_refsource_CONFIRM"]},{"url":"https://www.exploit-db.com/exploits/43381/","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"https://access.redhat.com/errata/RHSA-2018:0584","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://www.ruby-lang.org/en/news/2017/12/14/ruby-2-4-3-released/","tags":["x_refsource_CONFIRM"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://access.redhat.com/errata/RHSA-2018:0583","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://lists.debian.org/debian-lts-announce/2017/12/msg00025.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://www.debian.org/security/2018/dsa-4259","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://access.redhat.com/errata/RHSA-2019:2806","tags":["vendor-advisory","x_refsource_REDHAT"]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2017-8570","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2017-8570","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":43381,"url":"https://www.exploit-db.com/exploits/43381","title":"Ruby < 2.2.8 / < 2.3.5 / < 2.4.2 / < 2.5.0-preview1 - 'NET::Ftp' Command Injection","type":"local","platform":"ruby","date":"2017-12-02","verified":false,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":1,"earliest":"2017-12-02"},"first":{"date":"2017-12-02","source":"Exploit-DB","url":"https://www.exploit-db.com/exploits/43381"},"provenance":"source"},"exploitRefs":["https://www.exploit-db.com/exploits/43381/"],"flow":[],"timeline":[{"date":"2017-12-02","kind":"exploit-public","label":"First public exploit: Exploit-DB (EDB-43381)","url":"https://www.exploit-db.com/exploits/43381","provenance":"source"},{"date":"2017-12-15","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2017-17405","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"Exploit-DB","daysToKev":null},"priority":{"score":24.9,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.89,"detail":"percentile 0.9948"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 NVD reference tagged Exploit; 1 Exploit-DB entry"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}