Cyber Resilience

CVE-2017-17405

RCE in Ruby-Lang Ruby 2.2 – 2.2.8

Public PoCHigh EPSSRCECommand Injection
Published
15 December 2017
Modified
13 May 2026
Patch / advisory
CVSS Score v3 8.8
Click a component to see what it means
Raw vectorCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Score 0.74 99.4th percentile
Risk Priority 87 floored blend · peak EPSS

Summary

CVE-2017-17405 is a high-severity OS Command Injection (CWE-78) vulnerability in Ruby-Lang Ruby. Its CVSS base score is 8.8 (High).

Operationally, ranked in the top 0.6% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

default value of localfile is File.basename(remotefile), so malicious FTP servers could cause arbitrary command execution.

CWE(s)

Related Threats

Likely ATT&CK TechniquesAI

Techniques this vulnerability likely enables, inferred from its description, weakness type, and attributed-actor tradecraft. Confidence is per-technique.

T1059.004 Unix Shell Executionconfidence: HIGH
The vulnerability allows arbitrary Unix shell command execution via a malicious FTP server returning a filename starting with a pipe character.
inferred from description + CWE · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2017-8291Same product: Debian Debian Linux
CVE-2018-17456Same product: Debian Debian Linux
CVE-2018-17480Same product: Debian Debian Linux
CVE-2018-17463Same product: Debian Debian Linux
CVE-2023-51385Same product: Debian Debian Linux
CVE-2024-10224Same product: Debian Debian Linux
CVE-2018-7187Same product: Debian Debian Linux
CVE-2011-2523Same product: Debian Debian Linux
CVE-2025-63261Same product: Debian Debian Linux
CVE-2016-6662Same product: Debian Debian Linux

Affected Assets

ruby-lang
ruby
2.5.0 · 2.2 — 2.2.8 · 2.3 — 2.3.5 · 2.4 — 2.4.2
debian
debian linux
7.0, 8.0, 9.0
redhat
enterprise linux desktop
7.0
redhat
enterprise linux server
7.0
redhat
enterprise linux server aus
7.4, 7.6
redhat
enterprise linux server eus
7.4, 7.5, 7.6
redhat
enterprise linux server tus
7.4, 7.6
redhat
enterprise linux workstation
7.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.2.5
  • V1.2.8
  • V15.2.5

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-78

Platform-independent apps typically execute inside a managed runtime or sandbox that restricts direct OS command execution, reducing the ability to exploit OS command injection.

addresses: CWE-78

Validates inputs to block special elements that would alter OS command execution.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly require secure coding and input handling that blocks command-injection defects, yet the single broad outcome leaves many specific neutralization vectors and verification gaps unaddressed.

PR.PS-02 partial match
prevents

Routine patching/maintenance can remediate known command-injection CVEs in dependencies (partial forward) but does nothing to stop developers from introducing improper neutralization in custom code (none reverse).

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

detects

Security testing and code review target insecure use of operating-system command interfaces, catching command-injection flaws introduced during development.

References