FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

ruby -- Command injection vulnerability in Net::FTP

Affected packages
2.2.0,1 <= ruby < 2.2.9,1
2.3.0,1 <= ruby < 2.3.6,1
2.4.0,1 <= ruby < 2.4.3,1

Details

VuXML ID dd644964-e10e-11e7-8097-0800271d4b9c
Discovery 2017-12-14
Entry 2017-12-14

Etienne Stalmans from the Heroku product security team reports:

There is a command injection vulnerability in Net::FTP bundled with Ruby.

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.

References

CVE Name CVE-2017-17405
URL https://www.ruby-lang.org/en/news/2017/12/14/net-ftp-command-injection-cve-2017-17405/