Patchfirst
CVE-2017-17405 Public exploit EPSS 73.8%

Ruby before 2.4.3 allows Net::FTP command injection

No fixed version listed yet.Check the vendor advisory. References ↓

Summary

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.

Official description · CVE.org

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.

Breakdown
24.9 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Public exploit code (Exploit-DB) was available 13 days before disclosure.

  1. Public exploit codeExploit-DB13 days before
  2. Disclosedday 0
↑ ↓ chooseEnter openEsc close