Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641090 (CVE-2017-17405) - <dev-lang/ruby-2.2.9: Command injection vulnerability in Net::FTP (CVE-2017-17405)
Summary: <dev-lang/ruby-2.2.9: Command injection vulnerability in Net::FTP (CVE-2017-1...
Alias: CVE-2017-17405
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
Whiteboard: B2 [glsa+ cve]
Depends on:
Reported: 2017-12-15 07:29 UTC by Hans de Graaff
Modified: 2018-02-20 01:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---
stable-bot: sanity-check+


Note You need to log in before you can comment on or make changes to this bug.
Description Hans de Graaff gentoo-dev 2017-12-15 07:29:07 UTC
There is a command injection vulnerability in Net::FTP bundled with Ruby. This vulnerability has been assigned the CVE identifier CVE-2017-17405.

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.

All users running an affected release should upgrade immediately.

Affected Versions

    Ruby 2.2 series: 2.2.8 and earlier
    Ruby 2.3 series: 2.3.5 and earlier
    Ruby 2.4 series: 2.4.2 and earlier
Comment 1 Hans de Graaff gentoo-dev 2017-12-15 07:35:52 UTC
Fixed versions are available:

Comment 2 Hans de Graaff gentoo-dev 2017-12-15 07:37:53 UTC
Since 2.2.9 only contains the single fix to Net::FTP we can proceed with stabling right away.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-17 09:23:18 UTC
hppa stable
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-19 22:21:03 UTC
sparc stable (thanks to Rolf Eike Beer)
Comment 5 Agostino Sarubbo gentoo-dev 2017-12-20 13:09:52 UTC
amd64 stable
Comment 6 Markus Meier gentoo-dev 2017-12-21 19:28:28 UTC
arm stable
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-23 20:24:47 UTC
ia64 stable
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-24 13:44:53 UTC
ppc/ppc64 stable
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2018-01-17 05:10:59 UTC
x86 stable
Comment 10 Hans de Graaff gentoo-dev 2018-01-29 08:42:38 UTC
alpha stable
Comment 11 Hans de Graaff gentoo-dev 2018-01-29 08:48:05 UTC
vulnerable versions have been removed
Comment 12 Aaron Bauman (RETIRED) gentoo-dev 2018-01-29 21:07:59 UTC
GLSA request filed.
Comment 13 GLSAMaker/CVETool Bot gentoo-dev 2018-02-20 01:00:42 UTC
This issue was resolved and addressed in
 GLSA 201802-05 at
by GLSA coordinator Thomas Deutschmann (whissi).