PHP up to 4.2.2 Safe Mode mail privileges management

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.

A vulnerability classified as very critical has been found in PHP up to 4.2.2 (Programming Language Software). Affected is the function mail of the component Safe Mode. The manipulation with an unknown input leads to a privilege escalation vulnerability. CWE is classifying the issue as CWE-269. This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:

Argument injection vulnerability in the mail function for PHP 4.x to 4.2.2 may allow attackers to bypass safe mode restrictions and modify command line arguments to the MTA (e.g. sendmail) in the 5th argument to mail(), altering MTA behavior and possibly executing commands.

The bug was discovered 08/23/2002. The weakness was disclosed 07/30/2003 by Wojciech Purczynski with (Website). The advisory is shared for download at This vulnerability is traded as CVE-2002-0985. The exploitability is told to be easy. It is possible to launch the attack remotely. The exploitation doesn't require any form of authentication. Technical details and a exploit are known. The current price for an exploit might be approx. USD $25k-$100k (estimation calculated on 11/06/2018).

After immediately, there has been an exploit disclosed. It is declared as proof-of-concept. The vulnerability was handled as a non-public zero-day exploit for at least 26 days. During that time the estimated underground price was around $25k-$100k. The vulnerability scanner Nessus provides a plugin with the ID 15005 (Debian DSA-168-1 : php - bypassing safe_mode, CRLF injection), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Debian Local Security Checks and running in the context local. The Nessus plugin is testing the existence of the vulnerability with the following NASL code:

if (deb_check(release:"2.2", prefix:"php3", reference:"3.0.18-0potato1.2")) flag++;
if (deb_check(release:"2.2", prefix:"php3-cgi", reference:"3.0.18-0potato1.2")) flag++;
if (deb_check(release:"2.2", prefix:"php3-cgi-gd", reference:"3.0.18-0potato1.2")) flag++;
The commercial vulnerability scanner Qualys is able to test this issue with plugin 38375 (PHP Mail Function ASCII Control Character Header Spoofing Vulnerability).

Upgrading eliminates this vulnerability. A possible mitigation has been published even before and not after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at SecurityFocus (BID 5562), X-Force (9966), Vulnerability Center (SBV-1324) and Tenable (15005). The entries 18793 and 19426 are pretty similar.




CPE 2.3infoedit

CPE 2.2infoedit


VulDB Meta Base Score: 7.3
VulDB Meta Temp Score: 6.6

VulDB Base Score: 7.3
VulDB Temp Score: 6.6
VulDB Vector: 🔍
VulDB Reliability: 🔍



VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍


Class: Privilege escalation
CWE: CWE-269
ATT&CK: Unknown

Local: No
Remote: Yes

Availability: 🔍
Status: Proof-of-Concept

Price Prediction: 🔍
Current Price Estimation: 🔍


Nessus ID: 15005
Nessus Name: Debian DSA-168-1 : php - bypassing safe_mode, CRLF injection
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
Nessus Port: 🔍

OpenVAS ID: 53732
OpenVAS Name: Debian Security Advisory DSA 168-1 (PHP3, PHP4)
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfoedit

Threat: 🔍
Adversaries: 🔍
Geopolitics: 🔍
Economy: 🔍
Predictions: 🔍
Remediation: 🔍


Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍


08/23/2002 🔍
08/23/2002 +0 days 🔍
09/18/2002 +26 days 🔍
09/24/2002 +6 days 🔍
09/24/2002 +0 days 🔍
06/26/2003 +275 days 🔍
07/30/2003 +34 days 🔍
07/30/2003 +0 days 🔍
07/30/2003 +0 days 🔍
09/29/2004 +426 days 🔍
07/23/2014 +3584 days 🔍
11/02/2014 +102 days 🔍
11/06/2018 +1465 days 🔍



Researcher: Wojciech Purczynski
Status: Not defined

CVE: CVE-2002-0985 (🔍)
SecurityFocus: 5562 - PHP Mail Function ASCII Control Character Header Spoofing Vulnerability
X-Force: 9966
Vulnerability Center: 1324 - PHP Mail Function Allows Bypassing of Safe Mode and Command Execution, High
OSVDB: 2111 - PHP Mail Function ASCII Control Character Header Spoofing

scip Labs:
See also: 🔍


Created: 07/23/2014 11:14 AM
Updated: 11/06/2018 08:02 AM
Changes: (7) advisory_person_name advisory_company_name countermeasure_name countermeasure_date source_securityfocus source_securityfocus_date source_securityfocus_class
Complete: 🔍


No comments yet. Please log in to comment.

Might our Artificial Intelligence support you?

Check our Alexa App!