Vulnerabilities > CVE-2017-17405 - OS Command Injection vulnerability in multiple products
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
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.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Command Line Execution through SQL Injection An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
- Command Delimiters An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
- Exploiting Multiple Input Interpretation Layers An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
- Argument Injection An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
- OS Command Injection In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.
Exploit-Db
description | Ruby < 2.2.8 / < 2.3.5 / < 2.4.2 / < 2.5.0-preview1 - 'NET::Ftp' Command Injection. CVE-2017-17405. Local exploit for Ruby platform |
file | exploits/ruby/local/43381.md |
id | EDB-ID:43381 |
last seen | 2017-12-30 |
modified | 2017-12-02 |
platform | ruby |
port | |
published | 2017-12-02 |
reporter | Exploit-DB |
source | https://www.exploit-db.com/download/43381/ |
title | Ruby < 2.2.8 / < 2.3.5 / < 2.4.2 / < 2.5.0-preview1 - 'NET::Ftp' Command Injection |
type | local |
Nessus
NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1029.NASL description According to the version of the ruby packages installed, the EulerOS installation on the remote host is affected by the following vulnerability : - The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injection attacks, as demonstrated by a Resolv::Hosts::new argument beginning with a last seen 2020-05-06 modified 2018-01-29 plugin id 106404 published 2018-01-29 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/106404 title EulerOS 2.0 SP1 : ruby (EulerOS-SA-2018-1029) code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(106404); script_version("3.10"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/04"); script_cve_id( "CVE-2017-17790" ); script_name(english:"EulerOS 2.0 SP1 : ruby (EulerOS-SA-2018-1029)"); script_summary(english:"Checks the rpm output for the updated package."); script_set_attribute(attribute:"synopsis", value: "The remote EulerOS host is missing a security update."); script_set_attribute(attribute:"description", value: "According to the version of the ruby packages installed, the EulerOS installation on the remote host is affected by the following vulnerability : - The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injection attacks, as demonstrated by a Resolv::Hosts::new argument beginning with a '|' character, a different vulnerability than CVE-2017-17405. NOTE: situations with untrusted input may be highly unlikely.(CVE-2017-17790) Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues."); # https://developer.huaweicloud.com/ict/en/site-euleros/euleros/security-advisories/EulerOS-SA-2018-1029 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?59836119"); script_set_attribute(attribute:"solution", value: "Update the affected ruby package."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C"); script_set_attribute(attribute:"patch_publication_date", value:"2018/01/25"); script_set_attribute(attribute:"plugin_publication_date", value:"2018/01/29"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby-irb"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby-libs"); script_set_attribute(attribute:"cpe", value:"cpe:/o:huawei:euleros:2.0"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"Huawei Local Security Checks"); script_copyright(english:"This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/EulerOS/release", "Host/EulerOS/rpm-list", "Host/EulerOS/sp"); script_exclude_keys("Host/EulerOS/uvp_version"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("rpm.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); release = get_kb_item("Host/EulerOS/release"); if (isnull(release) || release !~ "^EulerOS") audit(AUDIT_OS_NOT, "EulerOS"); if (release !~ "^EulerOS release 2\.0(\D|$)") audit(AUDIT_OS_NOT, "EulerOS 2.0"); sp = get_kb_item("Host/EulerOS/sp"); if (isnull(sp) || sp !~ "^(1)$") audit(AUDIT_OS_NOT, "EulerOS 2.0 SP1"); uvp = get_kb_item("Host/EulerOS/uvp_version"); if (!empty_or_null(uvp)) audit(AUDIT_OS_NOT, "EulerOS 2.0 SP1", "EulerOS UVP " + uvp); if (!get_kb_item("Host/EulerOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); cpu = get_kb_item("Host/cpu"); if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH); if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "aarch64" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "EulerOS", cpu); if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_ARCH_NOT, "i686 / x86_64", cpu); flag = 0; pkgs = ["ruby-2.0.0.353-23.h5", "ruby-irb-2.0.0.353-23.h5", "ruby-libs-2.0.0.353-23.h5"]; foreach (pkg in pkgs) if (rpm_check(release:"EulerOS-2.0", sp:"1", reference:pkg)) flag++; if (flag) { security_report_v4( port : 0, severity : SECURITY_HOLE, extra : rpm_report_get() ); exit(0); } else { tested = pkg_tests_get(); if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested); else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ruby"); }
NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2018-2_0-0011-A.NASL description An update of {'ruby', 'glibc'} packages of Photon OS has been released. last seen 2019-02-21 modified 2019-02-07 plugin id 111281 published 2018-07-24 reporter Tenable source https://www.tenable.com/plugins/index.php?view=single&id=111281 title Photon OS 2.0 : ruby / glibc (PhotonOS-PHSA-2018-2.0-0011-(a)) (deprecated) NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2018-1_0-0098-A.NASL description An update of 'ruby', 'glibc' packages of Photon OS has been released. last seen 2019-02-08 modified 2019-02-07 plugin id 111910 published 2018-08-17 reporter Tenable source https://www.tenable.com/plugins/index.php?view=single&id=111910 title Photon OS 1.0: Glibc / Ruby PHSA-2018-1.0-0098-(a) (deprecated) NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1248.NASL description According to the versions of the ruby packages installed, the EulerOS Virtualization installation on the remote host is affected by the following vulnerabilities : - The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injection attacks, as demonstrated by a Resolv::Hosts::new argument beginning with a last seen 2020-06-01 modified 2020-06-02 plugin id 117557 published 2018-09-18 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/117557 title EulerOS Virtualization 2.5.0 : ruby (EulerOS-SA-2018-1248) NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2018-0378.NASL description An update for ruby is now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to perform system management tasks. Security Fix(es) : * It was discovered that the Net::FTP module did not properly process filenames in combination with certain operations. A remote attacker could exploit this flaw to execute arbitrary commands by setting up a malicious FTP server and tricking a user or Ruby application into downloading files with specially crafted names using the Net::FTP module. (CVE-2017-17405) * A buffer underflow was found in ruby last seen 2020-06-01 modified 2020-06-02 plugin id 107082 published 2018-03-01 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/107082 title RHEL 7 : ruby (RHSA-2018:0378) NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2018-2_0-0011-A_RUBY.NASL description An update of the ruby package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121908 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121908 title Photon OS 2.0: Ruby PHSA-2018-2.0-0011-(a) NASL family Huawei Local Security Checks NASL id EULEROS_SA-2019-1407.NASL description According to the versions of the ruby packages installed, the EulerOS Virtualization for ARM 64 installation on the remote host is affected by the following vulnerabilities : - It was discovered that the Net::FTP module did not properly process filenames in combination with certain operations. A remote attacker could exploit this flaw to execute arbitrary commands by setting up a malicious FTP server and tricking a user or Ruby application into downloading files with specially crafted names using the Net::FTP module.(CVE-2017-17405) - The last seen 2020-06-01 modified 2020-06-02 plugin id 124910 published 2019-05-14 reporter This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/124910 title EulerOS Virtualization for ARM 64 3.0.1.0 : ruby (EulerOS-SA-2019-1407) NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1067.NASL description According to the versions of the ruby packages installed, the EulerOS installation on the remote host is affected by the following vulnerabilities : - It was discovered that the Net::FTP module did not properly process filenames in combination with certain operations. A remote attacker could exploit this flaw to execute arbitrary commands by setting up a malicious FTP server and tricking a user or Ruby application into downloading files with specially crafted names using the Net::FTP module. (CVE-2017-17405) - A buffer underflow was found in ruby last seen 2020-05-06 modified 2018-03-20 plugin id 108471 published 2018-03-20 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/108471 title EulerOS 2.0 SP2 : ruby (EulerOS-SA-2018-1067) NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_DD644964E10E11E780970800271D4B9C.NASL description 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 last seen 2020-06-01 modified 2020-06-02 plugin id 105363 published 2017-12-19 reporter This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/105363 title FreeBSD : ruby -- Command injection vulnerability in Net::FTP (dd644964-e10e-11e7-8097-0800271d4b9c) NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2019-2806.NASL description An update for ruby is now available for Red Hat Enterprise Linux 7.3 Advanced Update Support, Red Hat Enterprise Linux 7.3 Telco Extended Update Support, and Red Hat Enterprise Linux 7.3 Update Services for SAP Solutions. Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to perform system management tasks. Security Fix(es) : * ruby: Command injection vulnerability in Net::FTP (CVE-2017-17405) For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section. last seen 2020-06-01 modified 2020-06-02 plugin id 129040 published 2019-09-19 reporter This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/129040 title RHEL 7 : ruby (RHSA-2019:2806) NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1030.NASL description According to the version of the ruby packages installed, the EulerOS installation on the remote host is affected by the following vulnerability : - The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injection attacks, as demonstrated by a Resolv::Hosts::new argument beginning with a last seen 2020-05-06 modified 2018-01-29 plugin id 106405 published 2018-01-29 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/106405 title EulerOS 2.0 SP2 : ruby (EulerOS-SA-2018-1030) NASL family Ubuntu Local Security Checks NASL id UBUNTU_USN-3515-1.NASL description It was discovered that Ruby allows FTP command injection. An attacker could use this to cause arbitrary command execution. Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 105583 published 2018-01-04 reporter Ubuntu Security Notice (C) 2018-2019 Canonical, Inc. / NASL script (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/105583 title Ubuntu 14.04 LTS / 16.04 LTS / 17.04 / 17.10 : ruby1.9.1, ruby2.0, ruby2.3 vulnerability (USN-3515-1) NASL family Debian Local Security Checks NASL id DEBIAN_DLA-1221.NASL description Several vulnerabilities have been discovered in the interpreter for the Ruby language. The Common Vulnerabilities and Exposures project identifies the following problems : CVE-2017-17405 A command injection vulnerability in Net::FTP might allow a malicious FTP server the execution of arbitrary commands. CVE-2017-17790 A command injection vulnerability in lib/resolv.rb last seen 2020-03-17 modified 2017-12-26 plugin id 105428 published 2017-12-26 reporter This script is Copyright (C) 2017-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/105428 title Debian DLA-1221-1 : ruby1.9.1 security update NASL family MacOS X Local Security Checks NASL id MACOSX_SECUPD2018-004.NASL description The remote host is running Mac OS X 10.11.6 or Mac OS X 10.12.6 and is missing a security update. It is therefore, affected by multiple vulnerabilities. last seen 2020-06-01 modified 2020-06-02 plugin id 111136 published 2018-07-17 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/111136 title macOS and Mac OS X Multiple Vulnerabilities (Security Update 2018-004) NASL family NewStart CGSL Local Security Checks NASL id NEWSTART_CGSL_NS-SA-2019-0013_RUBY.NASL description The remote NewStart CGSL host, running version MAIN 5.04, has ruby packages installed that are affected by multiple vulnerabilities: - A buffer overflow vulnerability was found in the JSON extension of ruby. An attacker with the ability to pass a specially crafted JSON input to the extension could use this flaw to expose the interpreter last seen 2020-06-01 modified 2020-06-02 plugin id 127164 published 2019-08-12 reporter This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/127164 title NewStart CGSL MAIN 5.04 : ruby Multiple Vulnerabilities (NS-SA-2019-0013) NASL family Scientific Linux Local Security Checks NASL id SL_20180228_RUBY_ON_SL7_X.NASL description Security Fix(es) : - It was discovered that the Net::FTP module did not properly process filenames in combination with certain operations. A remote attacker could exploit this flaw to execute arbitrary commands by setting up a malicious FTP server and tricking a user or Ruby application into downloading files with specially crafted names using the Net::FTP module. (CVE-2017-17405) - A buffer underflow was found in ruby last seen 2020-03-18 modified 2018-03-01 plugin id 107084 published 2018-03-01 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/107084 title Scientific Linux Security Update : ruby on SL7.x x86_64 (20180228) NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-201802-05.NASL description The remote host is affected by the vulnerability described in GLSA-201802-05 (Ruby: Command injection) A command injection flaw was discovered in Net::FTP which impacts Ruby. Impact : A remote attacker, by enticing a user to download and open a crafted file from a malicious FTP server, could execute arbitrary commands with the privileges of the process. Workaround : There is no known workaround at this time. last seen 2020-06-01 modified 2020-06-02 plugin id 106886 published 2018-02-20 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/106886 title GLSA-201802-05 : Ruby: Command injection NASL family Debian Local Security Checks NASL id DEBIAN_DLA-1421.NASL description Multiple vulnerabilities were found in the interpreter for the Ruby language. The Common Vulnerabilities and Exposures project identifies the following issues : CVE-2015-9096 SMTP command injection in Net::SMTP via CRLF sequences in a RCPT TO or MAIL FROM command. CVE-2016-2339 Exploitable heap overflow in Fiddle::Function.new. CVE-2016-7798 Incorrect handling of initialization vector in the GCM mode in the OpenSSL extension. CVE-2017-0898 Buffer underrun vulnerability in Kernel.sprintf. CVE-2017-0899 ANSI escape sequence vulnerability in RubyGems. CVE-2017-0900 DoS vulnerability in the RubyGems query command. CVE-2017-0901 gem installer allowed a malicious gem to overwrite arbitrary files. CVE-2017-0902 RubyGems DNS request hijacking vulnerability. CVE-2017-0903 Max Justicz reported that RubyGems is prone to an unsafe object deserialization vulnerability. When parsed by an application which processes gems, a specially crafted YAML formatted gem specification can lead to remote code execution. CVE-2017-10784 Yusuke Endoh discovered an escape sequence injection vulnerability in the Basic authentication of WEBrick. An attacker can take advantage of this flaw to inject malicious escape sequences to the WEBrick log and potentially execute control characters on the victim last seen 2020-06-01 modified 2020-06-02 plugin id 111081 published 2018-07-16 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/111081 title Debian DLA-1421-1 : ruby2.1 security update NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1066.NASL description According to the versions of the ruby packages installed, the EulerOS installation on the remote host is affected by the following vulnerabilities : - It was discovered that the Net::FTP module did not properly process filenames in combination with certain operations. A remote attacker could exploit this flaw to execute arbitrary commands by setting up a malicious FTP server and tricking a user or Ruby application into downloading files with specially crafted names using the Net::FTP module. (CVE-2017-17405) - A buffer underflow was found in ruby last seen 2020-05-06 modified 2018-03-20 plugin id 108470 published 2018-03-20 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/108470 title EulerOS 2.0 SP1 : ruby (EulerOS-SA-2018-1066) NASL family CentOS Local Security Checks NASL id CENTOS_RHSA-2018-0378.NASL description An update for ruby is now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to perform system management tasks. Security Fix(es) : * It was discovered that the Net::FTP module did not properly process filenames in combination with certain operations. A remote attacker could exploit this flaw to execute arbitrary commands by setting up a malicious FTP server and tricking a user or Ruby application into downloading files with specially crafted names using the Net::FTP module. (CVE-2017-17405) * A buffer underflow was found in ruby last seen 2020-06-01 modified 2020-06-02 plugin id 107270 published 2018-03-12 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/107270 title CentOS 7 : ruby (CESA-2018:0378) NASL family Debian Local Security Checks NASL id DEBIAN_DLA-1222.NASL description Several vulnerabilities have been discovered in the interpreter for the Ruby language. The Common Vulnerabilities and Exposures project identifies the following problems : CVE-2017-17405 A command injection vulnerability in Net::FTP might allow a malicious FTP server the execution of arbitrary commands. CVE-2017-17790 A command injection vulnerability in lib/resolv.rb last seen 2020-03-17 modified 2017-12-26 plugin id 105429 published 2017-12-26 reporter This script is Copyright (C) 2017-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/105429 title Debian DLA-1222-1 : ruby1.8 security update NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2018-1_0-0098-A_RUBY.NASL description An update of the ruby package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121799 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121799 title Photon OS 1.0: Ruby PHSA-2018-1.0-0098-(a) NASL family Debian Local Security Checks NASL id DEBIAN_DSA-4259.NASL description Several vulnerabilities have been discovered in the interpreter for the Ruby language, which may result in incorrect processing of HTTP/FTP, directory traversal, command injection, unintended socket creation or information disclosure. This update also fixes several issues in RubyGems which could allow an attacker to use specially crafted gem files to mount cross-site scripting attacks, cause denial of service through an infinite loop, write arbitrary files, or run malicious code. last seen 2020-06-01 modified 2020-06-02 plugin id 111468 published 2018-08-02 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/111468 title Debian DSA-4259-1 : ruby2.3 - security update NASL family MacOS X Local Security Checks NASL id MACOS_10_13_6.NASL description The remote host is running a version of macOS / Mac OS X that is 10.13.x prior to 10.13.6. It is, therefore, affected by multiple vulnerabilities. Note that successful exploitation of the most serious issues can result in arbitrary code execution. last seen 2020-06-01 modified 2020-06-02 plugin id 111137 published 2018-07-17 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/111137 title macOS 10.13.x < 10.13.6 Multiple Vulnerabilities NASL family MacOS X Local Security Checks NASL id MACOSX_SECUPD2018-005.NASL description The remote host is running Mac OS X 10.12.6 and is missing a security update. It is therefore, affected by multiple vulnerabilities affecting the following components : - afpserver - AppleGraphicsControl - APR - ATS - CFNetwork - CoreAnimation - CoreCrypto - CoreFoundation - CUPS - Dictionary - dyld - Foundation - Heimdal - Hypervisor - ICU - Intel Graphics Driver - IOGraphics - IOHIDFamily - IOKit - IOUserEthernet - IPSec - Kernel - Login Window - mDNSOffloadUserClient - MediaRemote - Microcode - Perl - Ruby - Security - Spotlight - Symptom Framework - WiFi last seen 2020-06-01 modified 2020-06-02 plugin id 118573 published 2018-10-31 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/118573 title macOS and Mac OS X Multiple Vulnerabilities (Security Update 2018-005) NASL family Oracle Linux Local Security Checks NASL id ORACLELINUX_ELSA-2018-0378.NASL description From Red Hat Security Advisory 2018:0378 : An update for ruby is now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to perform system management tasks. Security Fix(es) : * It was discovered that the Net::FTP module did not properly process filenames in combination with certain operations. A remote attacker could exploit this flaw to execute arbitrary commands by setting up a malicious FTP server and tricking a user or Ruby application into downloading files with specially crafted names using the Net::FTP module. (CVE-2017-17405) * A buffer underflow was found in ruby last seen 2020-06-01 modified 2020-06-02 plugin id 107080 published 2018-03-01 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/107080 title Oracle Linux 7 : ruby (ELSA-2018-0378) NASL family Slackware Local Security Checks NASL id SLACKWARE_SSA_2017-353-01.NASL description New ruby packages are available for Slackware 14.2 and -current to fix a security issue. last seen 2020-06-01 modified 2020-06-02 plugin id 105377 published 2017-12-20 reporter This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/105377 title Slackware 14.2 / current : ruby (SSA:2017-353-01)
Redhat
advisories |
| ||||||||||||||||||||
rpms |
|
Seebug
bulletinFamily | exploit |
description | There is a command injection vulnerability in Net::FTP bundled with Ruby. This vulnerability has been assigned the CVE identifier [CVE-2017-17405](http://cve.mitre.org/cgi-bin/cvename.cgi?name=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 |
id | SSV:96996 |
last seen | 2017-12-25 |
modified | 2017-12-18 |
published | 2017-12-18 |
reporter | Root |
title | Command injection vulnerability in Net::FTP(CVE-2017-17405) |
References
- http://www.securityfocus.com/bid/102204
- http://www.securityfocus.com/bid/102204
- http://www.securitytracker.com/id/1042004
- http://www.securitytracker.com/id/1042004
- https://access.redhat.com/errata/RHSA-2018:0378
- https://access.redhat.com/errata/RHSA-2018:0378
- https://access.redhat.com/errata/RHSA-2018:0583
- https://access.redhat.com/errata/RHSA-2018:0583
- https://access.redhat.com/errata/RHSA-2018:0584
- https://access.redhat.com/errata/RHSA-2018:0584
- https://access.redhat.com/errata/RHSA-2018:0585
- https://access.redhat.com/errata/RHSA-2018:0585
- https://access.redhat.com/errata/RHSA-2019:2806
- https://access.redhat.com/errata/RHSA-2019:2806
- https://lists.debian.org/debian-lts-announce/2017/12/msg00024.html
- https://lists.debian.org/debian-lts-announce/2017/12/msg00024.html
- https://lists.debian.org/debian-lts-announce/2017/12/msg00025.html
- https://lists.debian.org/debian-lts-announce/2017/12/msg00025.html
- https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
- https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
- https://www.debian.org/security/2018/dsa-4259
- https://www.debian.org/security/2018/dsa-4259
- https://www.exploit-db.com/exploits/43381/
- https://www.exploit-db.com/exploits/43381/
- https://www.ruby-lang.org/en/news/2017/12/14/net-ftp-command-injection-cve-2017-17405/
- https://www.ruby-lang.org/en/news/2017/12/14/net-ftp-command-injection-cve-2017-17405/
- https://www.ruby-lang.org/en/news/2017/12/14/ruby-2-4-3-released/
- https://www.ruby-lang.org/en/news/2017/12/14/ruby-2-4-3-released/