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.
2017-12-15T09:29:00.203
2025-04-20T01:37:25.860
Deferred
CVSSv3.0: 8.8 (HIGH)
AV:N/AC:M/Au:N/C:C/I:C/A:C
8.6
10.0
Type | Vendor | Product | Version/Range | Vulnerable? |
---|---|---|---|---|
Application | ruby-lang | ruby | ≤ 2.2.8 | Yes |
Application | ruby-lang | ruby | ≤ 2.3.5 | Yes |
Application | ruby-lang | ruby | ≤ 2.4.2 | Yes |
Application | ruby-lang | ruby | 2.5.0 | Yes |
Operating System | debian | debian_linux | 7.0 | Yes |
Operating System | debian | debian_linux | 8.0 | Yes |
Operating System | debian | debian_linux | 9.0 | Yes |
Operating System | redhat | enterprise_linux_desktop | 7.0 | Yes |
Operating System | redhat | enterprise_linux_server | 7.0 | Yes |
Operating System | redhat | enterprise_linux_server_aus | 7.4 | Yes |
Operating System | redhat | enterprise_linux_server_aus | 7.6 | Yes |
Operating System | redhat | enterprise_linux_server_eus | 7.4 | Yes |
Operating System | redhat | enterprise_linux_server_eus | 7.5 | Yes |
Operating System | redhat | enterprise_linux_server_eus | 7.6 | Yes |
Operating System | redhat | enterprise_linux_server_tus | 7.4 | Yes |
Operating System | redhat | enterprise_linux_server_tus | 7.6 | Yes |
Operating System | redhat | enterprise_linux_workstation | 7.0 | Yes |