Ruby up to 2.2.7/2.3.4/2.4.1 Net::FTP Argument os command injection
CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
---|---|---|
7.7 | $0-$5k | 0.00 |
A vulnerability, which was classified as critical, has been found in Ruby up to 2.2.7/2.3.4/2.4.1 (Programming Language Software). Affected by this issue is an unknown functionality of the component Net::FTP. The manipulation with the input value |
leads to a os command injection vulnerability. Using CWE to declare the problem leads to CWE-78. The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. Impacted is confidentiality, integrity, and availability. CVE summarizes:
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.
The bug was discovered 12/14/2017. The weakness was published 12/15/2017 by Security Team (Website). The advisory is shared for download at ruby-lang.org. This vulnerability is handled as CVE-2017-17405 since 12/05/2017. The attack may be launched remotely. No form of authentication is required for exploitation. Technical details as well as a public exploit are known. The MITRE ATT&CK project declares the attack technique as T1202.
A public exploit has been developed by Etienne Stalmans and been published even before and not after the advisory. The exploit is available at exploit-db.com. It is declared as proof-of-concept. The vulnerability was handled as a non-public zero-day exploit for at least 13 days. During that time the estimated underground price was around $0-$5k. The vulnerability scanner Nessus provides a plugin with the ID 105428 (Debian DLA-1221-1 : ruby1.9.1 security update), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Debian Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 236653 (Red Hat Update for ruby (RHSA-2018:0378)).
Upgrading to version 2.2.8, 2.3.5, 2.4.2 or 2.5.0-preview1 eliminates this vulnerability. A possible mitigation has been published 2 weeks after the disclosure of the vulnerability.
The vulnerability is also documented in the databases at Tenable (105428) and Exploit-DB (43381). Similar entries are available at 110831 and 126330.
Product
Type
Name
Version
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB CVSS-B Score: 🔍VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.0VulDB Meta Temp Score: 7.7
VulDB Base Score: 7.3
VulDB Temp Score: 6.6
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 8.8
NVD Vector: 🔍
CVSSv2
AV | AC | Au | C | I | A |
---|---|---|---|---|---|
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
---|---|---|---|---|---|
unlock | unlock | unlock | unlock | unlock | unlock |
unlock | unlock | unlock | unlock | unlock | unlock |
unlock | unlock | unlock | unlock | unlock | unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Os command injectionCWE: CWE-78 / CWE-74 / CWE-707
ATT&CK: T1202
Local: No
Remote: Yes
Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Etienne Stalmans
Download: 🔍
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
0-Day | unlock | unlock | unlock | unlock |
---|---|---|---|---|
Today | unlock | unlock | unlock | unlock |
Nessus ID: 105428
Nessus Name: Debian DLA-1221-1 : ruby1.9.1 security update
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
OpenVAS ID: 53204
OpenVAS Name: CentOS Update for ruby CESA-2018:0378 centos7
OpenVAS File: 🔍
OpenVAS Family: 🔍
Qualys ID: 🔍
Qualys Name: 🔍
Exploit-DB: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Upgrade: Ruby 2.2.8/2.3.5/2.4.2/2.5.0-preview1
Timeline
12/02/2017 🔍12/02/2017 🔍
12/05/2017 🔍
12/14/2017 🔍
12/14/2017 🔍
12/15/2017 🔍
12/15/2017 🔍
12/16/2017 🔍
12/25/2017 🔍
12/26/2017 🔍
01/18/2023 🔍
Sources
Advisory: RHSA-2018:0378Researcher: Security Team
Status: Confirmed
Confirmation: 🔍
CVE: CVE-2017-17405 (🔍)
OVAL: 🔍
SecurityTracker: 1042004
SecurityFocus: 102204 - Ruby CVE-2017-17405 Multiple Command Execution Vulnerabilities
scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍
Entry
Created: 12/16/2017 16:26Updated: 01/18/2023 09:36
Changes: 12/16/2017 16:26 (81), 12/17/2019 13:34 (11), 01/27/2021 12:21 (2), 01/18/2023 09:36 (3)
Complete: 🔍
No comments yet. Languages: en.
Please log in to comment.