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.1th percentile), scored .

Moderate probability of exploitation in the next 30 days — watch for active exploitation reports. 97th percentile — 97.1% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2014-9427: rose from 0.173 to 0.183.

EPSS over last 30 days · oldest: 0.173 · newest: 0.183 · change: +0.009

Affected products

  • PHP — versions 1.0, 2.0, 2.0b10

Weakness classification (CWE)

References