Buffer overflow in PHP
CVE-2014-9427
sapi/cgi/cgi_main.c in the CGI component in PHP through 5.4.36, 5.5.x through 5.5.20, and 5.6.x through 5.6.4, when mmap is used to read a .php file, does not properly consider the mapping's length during processing of an invalid file that begins with a # character and lacks a newline character, which causes an out-of-bounds read and might (1) allow remote attackers to obtain sensitive information from php-cgi process memory by leveraging the ability to upload a .php file or (2) trigger unexpected code execution if a valid PHP script is present in memory locations adjacent to the mapping.
Vulnerability class: Buffer Overflow
Published · last modified .
CVSS v2 metric
CVSS v2 base score 7.5 (High). Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P. This CVE predates CVSS v3 and has no v3 score from NVD.
EPSS exploit prediction
EPSS 0.183, 97.3th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- PHP — versions 1.0, 2.0, 2.0b10
Weakness classification (CWE)
References
- bugs.php.net/bug.php (Exploit)
- MDVSA-2015:032 (vendor-advisory)
- HPSBMU03409 (vendor-advisory)
- SUSE-SU-2015:0365 (vendor-advisory)
- APPLE-SA-2015-09-30-3 (vendor-advisory)
- [oss-security] 20150103 Re: CVE Request: PHP: out of bounds read crashes php-cgi (mailing-list)
- HPSBMU03380 (vendor-advisory)
- www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html
- [oss-security] 20141231 Re: CVE Request: PHP: out of bounds read crashes php-cgi (mailing-list)
- git.php.net/