ESB-2017.3205 - [Win][UNIX/Linux] Ruby: Execute arbitrary code/commands - Remote with user interaction 2017-12-15

Printable version
PGP/GPG verifiable version

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                               ESB-2017.3205
                   Command injection patched in Net::FTP
                             15 December 2017

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           Ruby
Publisher:         Ruby
Operating System:  UNIX variants (UNIX, Linux, OSX)
                   Windows
Impact/Access:     Execute Arbitrary Code/Commands -- Remote with User Interaction
Resolution:        Patch/Upgrade
CVE Names:         CVE-2017-17405  

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

- --------------------------BEGIN INCLUDED TEXT--------------------

CVE-2017-17405: Command injection vulnerability in Net::FTP

Posted by nagachika on 14 Dec 2017

There is a command injection vulnerability in Net::FTP bundled with Ruby. This
vulnerability has been assigned the CVE identifier CVE-2017-17405.

Details

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
  * Ruby 2.5 series: 2.5.0-preview1
  * prior to trunk revision r61242

Credit

Thanks to Etienne Stalmans from the Heroku product security team for reporting
the issue.

History

  * Originally published at 2017-12-14 16:00:00 (UTC)

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        https://www.auscert.org.au/bulletins/

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQIVAwUBWjM7nox+lLeg9Ub1AQjSSw/9FWbRO31FCGlHHTQWAOr0Kxg622qGbFEt
+ZslK5W7n/WkBg/kMTuhhDqdlcjVh/aPAwEZdib60ByAjAp7YY2S4lOYAGitY5Wd
Brs/EVPsiQilZ7IIdqm7hs4C2660frf5bTh4ZKLKPxF+HQawtfWonRh09INSlM9i
ATIIqnxR3RO9oKMAYinZ4cPNS84TP+AbxDkFrK2D+gNWv0x74AQQjsZ4OfQwDlsi
b/5Dbo7e21sqvD1NCE4cdTFXVlyKiDsSnxUz5lLKeRKgnP1vg6wLIrbwIn30zQBL
hA4sYfRF5cGi09XTEiUXF/pcrpK5bxnYc6ESK3YbLVVFdA1QENlIB34snswy9ntk
bO9y1XD4z3pVMd+Tq0VSajPYJ1wDebplwcdTWGT3gqi5wKvwEZhunXisSGbDmH3x
gbYgmkPGc0GAgVLMeZc3Q0sSC9LQjlVx/Zw1mILp6XN3gzJDdcp4weOkk+Uwn+rr
h/KBUAaqvLMEM0eJFbEjLk94XDWLpWMMW0LOsPm3liMtfIJZ/xm9Qt8/vIkSM6qP
DfZC65quN8Rg4EAq3hX9ri+5T8kX2y/IFRzHi9dKXVgJIEIHtaaaqRZMXYA+rdYA
XeNp7vJsIjj8qZgUOoJI8xcIQ0KT0PnkerJx+sj+pzcEPspHteAK4e3pYYOOiIQp
MXL1ozgOJCs=
=aQvM
-----END PGP SIGNATURE-----

« Back to bulletins