CVE-2001-1246

PHP 4.0.5-4.1.0 - Command Injection via mail() Function 5th Parameter

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2001-1246. PoCs published by Wojciech Purczynski.

AI-analyzed exploit summary This exploit leverages a vulnerability in PHP's mail function to execute arbitrary commands by manipulating sendmail configuration files. It bypasses safe_mode restrictions by passing command-line arguments to sendmail, allowing local privilege escalation to the HTTP process UID.

Description

PHP 4.0.5 through 4.1.0 in safe mode does not properly cleanse the 5th parameter to the mail() function, which allows local users and possibly remote attackers to execute arbitrary commands via shell metacharacters.

Exploits (1)

exploitdb WORKING POC VERIFIED
by Wojciech Purczynski · phplocalphp
https://www.exploit-db.com/exploits/20985

This exploit leverages a vulnerability in PHP's mail function to execute arbitrary commands by manipulating sendmail configuration files. It bypasses safe_mode restrictions by passing command-line arguments to sendmail, allowing local privilege escalation to the HTTP process UID.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHP (versions affected by CVE-2001-1246)
No auth needed
Prerequisites: Local access to the system · PHP with safe_mode enabled · Write permissions to /tmp directory
devstral-2 · analyzed Feb 16, 2026 Full analysis →

References (7)

Core 7
Core References
Broken Link vendor-advisory x_refsource_redhat
http://www.redhat.com/support/errata/RHSA-2003-159.html
Broken Link vendor-advisory x_refsource_redhat
http://www.redhat.com/support/errata/RHSA-2002-129.html
Broken Link, Patch, Vendor Advisory vdb-entry x_refsource_xf
http://www.iss.net/security_center/static/6787.php
Broken Link, Third Party Advisory, VDB Entry vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/2954
Broken Link, Third Party Advisory, VDB Entry mailing-list x_refsource_bugtraq
http://online.securityfocus.com/archive/1/194425
Broken Link vendor-advisory x_refsource_redhat
http://www.redhat.com/support/errata/RHSA-2002-102.html

Scores

EPSS 0.0849
EPSS Percentile 94.3%

Details

CWE
CWE-88
Status published
Products (1)
php/php 4.0.5 - 4.1.0
Published Jun 30, 2001
Tracked Since Feb 18, 2026