SkipNavigation
US-CERT
American Flag
  Vulnerability
Notes
Database

Search Vulnerability Notes

Vulnerability Notes Help Information


 
 View Notes By
  Name

ID Number

CVE Name

Date Public

Date Published

Date Updated

Severity Metric



 Other Documents
  Technical Alerts

Technical Bulletins

Alerts

Security Tips

 

Vulnerability Note VU#258721

Various FTP clients fail to account for pipe (|) characters in default file names

Overview

Various FTP client implementations do not correctly handle files whose name begins with the "|" (pipe) character.

I. Description

Most FTP clients include a feature in which the remote filename is used as the local filename in a GET (RETR) operation. For example, many FTP clients support syntax similar to the following:

    ftp> get file.name local.name

which causes the remote file file.name to be retrieved to the local client and named local.name. In a typical FTP client, if you specify
    ftp> get file.name
the client will assume a local name of file.name. Furthermore, many FTP clients support an often undocumented feature that allows the contents of a remote file to be piped through a local command. For example,
    ftp> get README | more
will often cause the contents of the remote file README to be piped through the local more command. This is a very widely known and often used feature, but is not well documented. Note specifically that the presence of the pipe character (|) means that the second argument to the get command is not a filename, but rather an indication to pass the contents of the remote filename through a command. Similar undocumented behavior is often present for the dash character (-), which causes the contents of the remote file to be sent to standard output.

Some FTP clients with both features present a security risk. If the name of the remote file begins with a pipe character (|), and an FTP client relies on the default local filename, the contents of the file will be piped through a command based on the name of the remote file. Specifically, the command will be the name of the remote file without the leading pipe (|) character. For example, if the remote file is named |logger, with the contents
    hello, how are you
an FTP command such as
    ftp> get |logger
will, on a vulnerable FTP client, cause the contents of the file (hello, how are you) to be logged to your local system log, rather than creating a local file named |logger.

In October of 1997, IBM's Emergency Response Service published a security advisory (ERS-SVA-E01-1997:009.1) detailing a vulnerability in the AIX FTP client. Quoting from ERS-SVA-E01-1997:009.1:
    The ftp client can be tricked into running arbitrary commands supplied by the remote server. When the remote file begins with a pipe symbol, the ftp client will process the contents of the remote file as a shell script.
After IBM's Emergency Response Service published their bulletin, it was discovered that other vendors client FTP implementations were vulnerable as well. However, it appears not all implementations were actually fixed. Some discussion about this problem is available at

http://online.securityfocus.com/bid/396/discussion/

In 2003, this problem was discovered to have affected FTP clients that weren't fixed when the problem was originally discovered, most notably including the FTP client from MIT, which is redistributed by some operating system vendors such as Red Hat. The list of vendors below includes as "vulnerable" vendors who fixed their FTP clients in the 1997 time frame. Follow the links to individual vendor records for more detailed information.

II. Impact

A malicious server can execute arbitrary code on a victim FTP client.

III. Solution

Apply a vendor-supplied patch.

Systems Affected

VendorStatusDate Updated
AlcatelUnknown16-Jan-2003
Apple Computer Inc.Not Vulnerable20-Jan-2003
AT&TUnknown16-Jan-2003
AvayaUnknown16-Jan-2003
BSDIUnknown16-Jan-2003
Cisco Systems Inc.Not Vulnerable24-Jan-2003
Compaq Computer CorporationUnknown16-Jan-2003
Computer AssociatesUnknown16-Jan-2003
ConectivaUnknown16-Jan-2003
Cray Inc.Not Vulnerable16-Jan-2003
Data GeneralUnknown16-Jan-2003
DebianUnknown16-Jan-2003
EngardeUnknown16-Jan-2003
F5 NetworksUnknown16-Jan-2003
FreeBSDNot Vulnerable21-Jan-2003
FujitsuUnknown16-Jan-2003
Hewlett-Packard CompanyNot Vulnerable28-Jan-2003
HitachiNot Vulnerable24-Jan-2003
IBMNot Vulnerable16-Jan-2003
Ingrian NetworksNot Vulnerable17-Jan-2003
IntelUnknown16-Jan-2003
Juniper NetworksNot Vulnerable20-Jan-2003
LachmanUnknown16-Jan-2003
Lotus SoftwareUnknown16-Jan-2003
Lucent TechnologiesUnknown16-Jan-2003
MandrakeSoftUnknown16-Jan-2003
Microsoft CorporationUnknown16-Jan-2003
MIT Kerberos Development TeamVulnerable24-Jan-2003
MontaVista SoftwareNot Vulnerable20-Jan-2003
Multi-Tech Systems Inc.Unknown16-Jan-2003
MultinetUnknown16-Jan-2003
NEC CorporationUnknown16-Jan-2003
NetBSDNot Vulnerable24-Jan-2003
NetscreenNot Vulnerable24-Jan-2003
Network ApplianceNot Vulnerable20-Jan-2003
NeXTUnknown16-Jan-2003
NokiaNot Vulnerable24-Jan-2003
Nortel NetworksUnknown16-Jan-2003
OpenBSDUnknown16-Jan-2003
Openwall GNU/*/LinuxNot Vulnerable20-Jan-2003
Oracle CorporationUnknown16-Jan-2003
Red Hat Inc.Vulnerable3-Feb-2003
Redback Networks Inc.Unknown16-Jan-2003
Riverstone NetworksNot Vulnerable17-Jan-2003
SequentUnknown16-Jan-2003
SGIUnknown16-Jan-2003
Sony CorporationUnknown16-Jan-2003
Sun Microsystems Inc.Vulnerable24-Jan-2003
SuSE Inc.Unknown16-Jan-2003
The SCO Group (SCO Linux)Unknown16-Jan-2003
The SCO Group (SCO UnixWare)Unknown16-Jan-2003
UnisysUnknown16-Jan-2003
Wind River Systems Inc.Unknown16-Jan-2003
WirexUnknown16-Jan-2003
Xerox CorporationVulnerable30-May-2003

References


http://online.securityfocus.com/bid/396
http://www.iss.net/security_center/static/605.php
http://online.securityfocus.com/advisories/1448

Credit

Thanks to Fozzy of The Hackademy Audit Project for bringing this issue to our attention.

This document was written by Ian A. Finlay & Shawn V. Hernan.

Other Information

Date Public10/27/97
Date First Published01/24/2003 02:08:28 PM
Date Last Updated02/05/2003
CERT Advisory 
CVE NameCVE-1999-0097
US-CERT Technical Alerts 
Metric17.69
Document Revision49

If you have feedback, comments, or additional information about this vulnerability, please send us email.
 

 
Page Corner Image
Copyright 2003 Carnegie Mellon University
Disclaimers and copyright information
Get Adobe Reader Get Adobe Reader