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.
6.6$0-$5k0.00

Summaryinfo

A vulnerability was found in PHP up to 4.2.2 and classified as very critical. This issue affects the function mail of the component Safe Mode. The manipulation results in privileges management. This vulnerability is reported as CVE-2002-0985. Moreover, an exploit is present. It is suggested to upgrade the affected component.

Detailsinfo

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 privileges management vulnerability. CWE is classifying the issue as CWE-269. The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. 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 isec.pl (Website). The advisory is shared for download at redhat.com. 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 $0-$5k (estimation calculated on 11/06/2018). The MITRE ATT&CK project declares the attack technique as T1068.

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 l. 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 X-Force (9966), Tenable (15005), SecurityFocus (BID 5562†), OSVDB (2111†) and Vulnerability Center (SBV-1324†). The entries VDB-18793 and VDB-19426 are pretty similar. VulDB is the best source for vulnerability data and more expert information about this specific topic.

Productinfo

Type

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

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: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

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

NVD Base Score: 🔍

Exploitinginfo

Class: Privileges management
CWE: CWE-269 / CWE-266
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Status: Proof-of-Concept

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

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 Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Timelineinfo

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/06/2018 +1567 days 🔍

Sourcesinfo

Product: php.org

Advisory: redhat.com
Researcher: Wojciech Purczynski
Organization: isec.pl
Status: Not defined

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

scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍

Entryinfo

Created: 07/23/2014 11:14
Updated: 11/06/2018 08:02
Changes: 07/23/2014 11:14 (77), 11/06/2018 08:02 (7)
Complete: 🔍
Cache ID: 216::103

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to stay up to date on a daily basis?

Enable the mail alert feature now!