CVE-2017-17405

NameCVE-2017-17405
DescriptionRuby 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
ReferencesDLA-1221-1, DLA-1222-1
NVD severityhigh (attack range: remote)
Debian Bugs884437, 884438

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
ruby1.8 (PTS)wheezy1.8.7.358-7.1+deb7u3vulnerable
wheezy (security)1.8.7.358-7.1+deb7u6fixed
ruby1.9.1 (PTS)wheezy1.9.3.194-8.1+deb7u5vulnerable
wheezy (security)1.9.3.194-8.1+deb7u8fixed
ruby2.1 (PTS)jessie2.1.5-2+deb8u3vulnerable
jessie (security)2.1.5-2+deb8u1vulnerable
ruby2.3 (PTS)stretch (security), stretch2.3.3-1+deb9u2vulnerable
buster, sid2.3.6-2fixed
ruby2.5 (PTS)buster, sid2.5.1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
ruby1.8source(unstable)(unfixed)high
ruby1.8sourcewheezy1.8.7.358-7.1+deb7u5highDLA-1222-1
ruby1.9.1source(unstable)(unfixed)high
ruby1.9.1sourcewheezy1.9.3.194-8.1+deb7u7highDLA-1221-1
ruby2.1source(unstable)(unfixed)high
ruby2.3source(unstable)2.3.6-1high884438
ruby2.5source(unstable)2.5.0~rc1-1high884437

Notes

[stretch] - ruby2.3 <postponed> (Minor issue, can be fixed along in a future update)
https://www.ruby-lang.org/en/news/2017/12/14/net-ftp-command-injection-cve-2017-17405/
https://github.com/ruby/ruby/commit/6d3f72e5be2312be312f2acbf3465b05293c1431
ruby2.3: https://github.com/ruby/ruby/commit/1cfe43fd85c66a9e2b5068480b3e043c31e6b8ca
ruby2.3: https://github.com/ruby/ruby/commit/3ec034c597e6d40543bb844dc8f96645bef4bed2

Search for package or bug name: Reporting problems