Public exploit available
Public proof-of-concept or exploit code exists (ExploitDB / Metasploit / Nuclei).

CVE-2017-17405OS Command Injection in Ruby

Severity
8.8HIGHNVD
EPSS
88.6%
top 0.49%
CISA KEV
Not in KEV
Exploit
PoC available
Public exploit / PoC exists
Timeline
PublishedDec 15
Latest updateMay 13

Description

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.

CVSS vector

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HExploitability: 2.8 | Impact: 5.9

Affected Packages5 packages

Also affects: Debian Linux 7.0, 8.0, 9.0, Enterprise Linux 7.4, 7.6, 7.5

Patches

🔴Vulnerability Details

3
GHSA
GHSA-q23r-c9rf-97q3: Ruby before 22022-05-13
CVEList
CVE-2017-17405: Ruby before 22017-12-15
OSV
CVE-2017-17405: Ruby before 22017-12-15

💥Exploits & PoCs

1
Exploit-DB
Ruby < 2.2.8 / < 2.3.5 / < 2.4.2 / < 2.5.0-preview1 - 'NET::Ftp' Command Injection2017-12-02

📋Vendor Advisories

5
Apple
CVE-2017-17405: macOS Mojave 10.14.1, Security Update 2018-002 High Sierra, Security Update 2018-005 Sierra2018-10-30
Apple
CVE-2017-17405: macOS High Sierra 10.13.6, Security Update 2018-004 Sierra, Security Update 2018-004 El Capitan2018-07-09
Ubuntu
Ruby vulnerability2018-01-04
Red Hat
ruby: Command injection in lib/resolv.rb:lazy_initialize() allows arbitrary code execution2017-12-19
Red Hat
ruby: Command injection vulnerability in Net::FTP2017-12-14

💬Community

2
Bugzilla
CVE-2017-17790 ruby: Command injection in lib/resolv.rb:lazy_initialize() allows arbitrary code execution2017-12-21
Bugzilla
CVE-2017-17405 ruby: Command injection vulnerability in Net::FTP2017-12-14
CVE-2017-17405 — OS Command Injection in Ruby-lang Ruby | cvebase