Ruby before 2.4.3 allows Net::FTP command injection
No fixed version listed yet.Check the vendor advisory. References ↓
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.
- Exploited
- Not confirmed
- Reports
- 0
- Tactics
- 0/15
Exploitation timelineDated milestones for a CVE: when it was disclosed, when exploit code became public, when exploitation was confirmed, and when threat reports named it.
Public exploit code (Exploit-DB) was available 13 days before disclosure.
- Public exploit codeExploit-DB13 days before
- Disclosedday 0