Ruby up to 2.2.7/2.3.4/2.4.1 Net::FTP Argument os command injection

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.7$0-$5k0.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.

Productinfo

Type

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB CVSS-B Score: 🔍
VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 8.0
VulDB 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: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Os command injection
CWE: 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-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

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 Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍

Upgrade: Ruby 2.2.8/2.3.5/2.4.2/2.5.0-preview1

Timelineinfo

12/02/2017 🔍
12/02/2017 +0 days 🔍
12/05/2017 +3 days 🔍
12/14/2017 +9 days 🔍
12/14/2017 +0 days 🔍
12/15/2017 +1 days 🔍
12/15/2017 +0 days 🔍
12/16/2017 +1 days 🔍
12/25/2017 +9 days 🔍
12/26/2017 +1 days 🔍
01/18/2023 +1849 days 🔍

Sourcesinfo

Advisory: RHSA-2018:0378
Researcher: 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: 🔍

Entryinfo

Created: 12/16/2017 16:26
Updated: 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: 🔍

Discussion

No comments yet. Languages: en.

Please log in to comment.

Might our Artificial Intelligence support you?

Check our Alexa App!