Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2017-17405

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2017-17405
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 05:01 UTC · Revision 1

Source evidence

CVE-2017-17405

core-osv · Original source

Published 15 Dec 2017, 09:29 UTC

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.

osv:CVE-2017-17405
Complete source record
{
  "id": "d1cd198df50e48096446287dbff4f05f3dc609bf0e643b604fd2d7d118cfc9e1",
  "url": "https://osv.dev/vulnerability/CVE-2017-17405",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2017-17405",
    "summary": "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.",
    "evidence": "osv:CVE-2017-17405",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2017-17405",
      "aliases": [
        "CVE-2017-17405"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ruby/ruby",
              "type": "GIT",
              "events": [
                {
                  "introduced": "7393bf6a5cfff63683f36535e293caaa0d4c5be0"
                },
                {
                  "last_affected": "f3c3c788aa458ec9d57035c8f3091093bfcb9fa7"
                },
                {
                  "introduced": "d40ea2afa6ff5a6e5befcf342fb7b6dc58796b20"
                },
                {
                  "last_affected": "e07613e27ee9445abad9c6981e8d721a0df39f1c"
                },
                {
                  "introduced": "d4bb726b713658f56e630b6cf817a0155b6f390e"
                },
                {
                  "last_affected": "595af866bb46db24274dc26fb9b4d3af84fd0af5"
                },
                {
                  "introduced": "f11fbd79fd7000550188cfe19d04cce9f472d26b"
                },
                {
                  "last_affected": "f11fbd79fd7000550188cfe19d04cce9f472d26b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.2"
                      },
                      {
                        "last_affected": "2.2.8"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.3"
                      },
                      {
                        "last_affected": "2.3.5"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.4"
                      },
                      {
                        "last_affected": "2.4.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:ruby-lang:ruby:2.5.0:preview1:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.5.0-preview1"
                      },
                      {
                        "last_affected": "2.5.0-preview1"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.5.0-preview1",
            "v2_5_0_preview1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-17405.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:23.932582130Z",
      "provider": "osv",
      "references": [
        "https://access.redhat.com/errata/RHSA-2018:0378",
        "https://access.redhat.com/errata/RHSA-2018:0583",
        "https://access.redhat.com/errata/RHSA-2018:0584",
        "https://access.redhat.com/errata/RHSA-2018:0585",
        "https://access.redhat.com/errata/RHSA-2019:2806",
        "https://lists.debian.org/debian-lts-announce/2017/12/msg00024.html",
        "https://lists.debian.org/debian-lts-announce/2017/12/msg00025.html",
        "https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html",
        "https://www.debian.org/security/2018/dsa-4259",
        "https://www.ruby-lang.org/en/news/2017/12/14/net-ftp-command-injection-cve-2017-17405/",
        "https://www.ruby-lang.org/en/news/2017/12/14/ruby-2-4-3-released/",
        "https://www.exploit-db.com/exploits/43381/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.0"
                  },
                  {
                    "last_affected": "7.0"
                  },
                  {
                    "introduced": "8.0"
                  },
                  {
                    "last_affected": "8.0"
                  },
                  {
                    "introduced": "9.0"
                  },
                  {
                    "last_affected": "9.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_desktop",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.0"
                  },
                  {
                    "last_affected": "7.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_server",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.0"
                  },
                  {
                    "last_affected": "7.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_server_aus:7.4:*:*:*:*:*:*:*",
              "cpe:2.3:o:redhat:enterprise_linux_server_aus:7.6:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_server_aus",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.4"
                  },
                  {
                    "last_affected": "7.4"
                  },
                  {
                    "introduced": "7.6"
                  },
                  {
                    "last_affected": "7.6"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_server_eus:7.4:*:*:*:*:*:*:*",
              "cpe:2.3:o:redhat:enterprise_linux_server_eus:7.5:*:*:*:*:*:*:*",
              "cpe:2.3:o:redhat:enterprise_linux_server_eus:7.6:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_server_eus",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.4"
                  },
                  {
                    "last_affected": "7.4"
                  },
                  {
                    "introduced": "7.5"
                  },
                  {
                    "last_affected": "7.5"
                  },
                  {
                    "introduced": "7.6"
                  },
                  {
                    "last_affected": "7.6"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_server_tus:7.4:*:*:*:*:*:*:*",
              "cpe:2.3:o:redhat:enterprise_linux_server_tus:7.6:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_server_tus",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.4"
                  },
                  {
                    "last_affected": "7.4"
                  },
                  {
                    "introduced": "7.6"
                  },
                  {
                    "last_affected": "7.6"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_workstation",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.0"
                  },
                  {
                    "last_affected": "7.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2017-17405",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 431040,
  "published_at": "2017-12-15T09:29:00.203+00:00"
}