CVE Catalog

CVE-2017-17405

High
Published: Translated: NVD NIST

Summary

Ruby before 2.4.3 allows command injection in Net::FTP. Functions like get, getbinaryfile, gettextfile, put, putbinaryfile, and puttextfile use Kernel#open to open local files, which can lead to arbitrary command execution if the localfile argument starts with the '|' character.

Risk Assessment

Malicious FTP servers could exploit this vulnerability to execute arbitrary commands on the server, posing a serious security threat.

Recommendation

It is recommended to upgrade Ruby to version 2.4.3 or later to mitigate the risks associated with this vulnerability.

Other vulnerabilities in Ruby

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS