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#410609

PHP fails to filter ASCII control characters from string arguments of mail() function

Overview

PHP does not properly filter parameters to its mail() function.

I. Description

PHP is a scripting language widely used in web application development. PHP includes a function called mail() that takes message parameters such as recipient address and sends mail using sendmail. PHP does not filter these parameters for inappropriate characters, such as ASCII control characters. When such characters are passed to sendmail, the mail message may be altered and mail headers may be forged.

Documentation of the mail() function does not explain this risk to the developer and does not establish any responsibility on the script developer to filter message parameters before passing them to the mail() function. PHP should filter these characters or document script developers' responsibility to filter these parameters before calling mail().

II. Impact

Through a PHP script that passes user input to the mail() function, attackers may be able to alter message headers and content.

III. Solution

The CERT/CC is currently unaware of a practical solution to this problem.

Filter parameters to mail() function

In email addresses, remove any characters not explicitly valid for email addresses. In other fields, use a similar technique based on valid characters for those parameters.

Systems Affected

VendorStatusDate NotifiedDate Updated
The PHP GroupUnknown26-Aug-2002

References


http://www.php.net/
http://www.securityfocus.com/bid/5562

Credit

Thanks to Wojciech Purczynski for reporting this vulnerability.

This document was written by Shawn Van Ittersum.

Other Information

Date Public:2002-08-23
Date First Published:2002-09-16
Date Last Updated:2002-09-16
CERT Advisory: 
CVE-ID(s): 
NVD-ID(s): 
US-CERT Technical Alerts: 
Metric:5.52
Document Revision:7

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

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