Executive Summary

Summary
Title New PHP packages fix several vulnerabilities
Informations
Name DSA-168 First vendor Publication 2002-09-18
Vendor Debian Last vendor Modification 2002-09-18
Severity (Vendor) N/A Revision 1

Security-Database Scoring CVSS v3

Cvss vector : N/A
Overall CVSS Score NA
Base Score NA Environmental Score NA
impact SubScore NA Temporal Score NA
Exploitabality Sub Score NA
 
Calculate full CVSS 3.0 Vectors scores

Security-Database Scoring CVSS v2

Cvss vector : (AV:N/AC:L/Au:N/C:P/I:P/A:P)
Cvss Base Score 7.5 Attack Range Network
Cvss Impact Score 6.4 Attack Complexity Low
Cvss Expoit Score 10 Authentication None Required
Calculate full CVSS 2.0 Vectors scores

Detail

Wojciech Purczynski found out that it is possible for scripts to pass arbitrary text to sendmail as commandline extension when sending a mail through PHP even when safe_mode is turned on. Passing 5th argument should be disabled if PHP is configured in safe_mode, which is the case for newer PHP versions and for the versions below. This does not affect PHP3, though.

Wojciech Purczynski also found out that arbitrary ASCII control characters may be injected into string arguments of mail() function. If mail() arguments are taken from user's input it may give the user ability to alter message content including mail headers.

Ulf Harnhammar discovered that file() and fopen() are vulnerable to CRLF injection. An attacker could use it to escape certain restrictions and add arbitrary text to alleged HTTP requests that are passed through.

However this only happens if something is passed to these functions which is neither a valid file name nor a valid url. Any string that contains control chars cannot be a valid url. Before you pass a string that should be an url to any function you must use urlencode() to encode it.

Three problems have been identified in PHP:

1. The mail() function can allow arbitrary email headers to be specified if a recipient address or subject contains CR/LF characters.

2. The mail() function does not properly disable the passing of arbitrary command-line options to sendmail when running in Safe Mode.

3. The fopen() function, when retrieving a URL, can allow manipulation of the request for the resource through a URL containing CR/LF characters. For example, headers could be added to an HTTP request.

These problems have been fixed in version 3.0.18-23.1woody1 for PHP3 and 4.1.2-5 for PHP4 for the current stable distribution (woody), in version 3.0.18-0potato1.2 for PHP3 and 4.0.3pl1-0potato4 for PHP4 in the old stable distribution (potato) and in version 3.0.18-23.2 for PHP3 and 4.2.3-3 for PHP4 for the unstable distribution (sid).

We recommend that you upgrade your PHP packages.

wget url will fetch the file for you dpkg -i file.deb will install the referenced file.

If you are using the apt-get package manager, use the line for sources.list as given below:

apt-get update will update the internal database apt-get upgrade will install corrected packages

You may use an automated update by adding the resources from the footer to the proper configuration.

Debian GNU/Linux 2.2 alias potato

Original Source

Url : http://www.debian.org/security/2002/dsa-168

CAPEC : Common Attack Pattern Enumeration & Classification

Id Name
CAPEC-15 Command Delimiters
CAPEC-34 HTTP Response Splitting
CAPEC-41 Using Meta-characters in E-mail Headers to Inject Malicious Payloads
CAPEC-81 Web Logs Tampering
CAPEC-88 OS Command Injection
CAPEC-93 Log Injection-Tampering-Forging
CAPEC-133 Try All Common Application Switches and Options

CWE : Common Weakness Enumeration

% Id Name
100 % CWE-88 Argument Injection or Modification

CPE : Common Platform Enumeration

TypeDescriptionCount
Application 2
Application 152

OpenVAS Exploits

Date Description
2008-01-17 Name : Debian Security Advisory DSA 168-1 (PHP3, PHP4)
File : nvt/deb_168_1.nasl
2005-11-03 Name : PHP Mail Function Header Spoofing Vulnerability
File : nvt/php_mail_func_header_spoof.nasl

Open Source Vulnerability Database (OSVDB)

Id Description
59760 PHP fopen / file Functions CRLF Injection

2160 PHP mail Function CRLF Injection

A flaw exists in PHP which may allow an attacker to add arbitrary data to headers constructed by PHP when remote resources are referenced using these functions. In this way, a PHP script which uses the vulnerable function with the allow_url_fopen() directive enabled may be turned into a proxy, since the attacker is able to construct an arbitrary header to be sent with the request. This may be accomplished by building an arbitrary header using CRLF injection.
2111 PHP Mail Function ASCII Control Character Header Spoofing

PHP 4.x to 4.2.2 contains a flaw that exist in the mail() function that does not properly sanitize user input. It is possible for a user may pass ASCII control characters to the mail() function that could alter the headers of email. This could result in spoofed mail headers.

Snort® IPS/IDS

Date Description
2014-01-10 PHP function CRLF injection attempt
RuleID : 12360 - Revision : 11 - Type : SERVER-WEBAPP

Nessus® Vulnerability Scanner

Date Description
2004-09-29 Name : The remote Debian host is missing a security-related update.
File : debian_DSA-168.nasl - Type : ACT_GATHER_INFO
2004-07-31 Name : The remote Mandrake Linux host is missing one or more security updates.
File : mandrake_MDKSA-2003-082.nasl - Type : ACT_GATHER_INFO
2004-07-25 Name : The remote host is missing a vendor-supplied security patch
File : suse_SA_2002_036.nasl - Type : ACT_GATHER_INFO
2004-07-06 Name : The remote Red Hat host is missing one or more security updates.
File : redhat-RHSA-2002-214.nasl - Type : ACT_GATHER_INFO
2003-03-23 Name : A remote web application can be used to forge data.
File : php_mail_func_header_spoof.nasl - Type : ACT_GATHER_INFO
2002-07-22 Name : Arbitrary code may be run on the remote host.
File : php_4_2_x_malformed_POST.nasl - Type : ACT_DENIAL

Alert History

If you want to see full details history, please login or register.
0
Date Informations
2014-02-17 11:28:02
  • Multiple Updates