Quantum Secular Labs / Blog / Advisories
CVE-2016-5114: PHP: Buffer overflow
CVE-2016-5114 is rated critical with a CVSS v3.0 base score of 9.1 and affects PHP. Per its scoring, it can be exploited over the network, without authentication, without any user interaction.
Vulnerability description
sapi/fpm/fpm/fpm_log.c in PHP before 5.5.31, 5.6.x before 5.6.17, and 7.x before 7.0.2 misinterprets the semantics of the snprintf return value, which allows attackers to obtain sensitive information from process memory or cause a denial of service (out-of-bounds read and buffer overflow) via a long string, as demonstrated by a long URI in a configuration with custom REQUEST_URI logging.
Severity breakdown
CVSS v3.0 9.1: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
- Attack vector: Network. Exploitable remotely over the network, with no need for local or physical access.
- Attack complexity: Low. No special conditions; the attack can be repeated reliably.
- Privileges required: None. No account or prior access is needed.
- User interaction: None. No action from any user is needed.
- Scope: Unchanged. Impact stays within the vulnerable component.
- Confidentiality impact: High. Total loss of confidentiality; sensitive data can be fully disclosed.
- Integrity impact: None. No loss of integrity.
- Availability impact: High. Total loss of availability; the component can be shut down.
Underlying weakness
CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary.
CWE-125: Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Affected products
- PHP: up to and including 5.5.30; 5.6.0 alpha1; 5.6.0 alpha2; 5.6.0 alpha3; 5.6.0 alpha4; 5.6.0 alpha5; 5.6.0 beta1; 5.6.0 beta2; 5.6.0 beta3; 5.6.0 beta4; 5.6.1; 5.6.2
References
- http://php.net/ChangeLog-5.php
- http://php.net/ChangeLog-7.php
- http://www.search-lab.hu/about-us/news/111-some-unusual-vulnerabilities-in-the-php-engine
- http://www.openwall.com/lists/oss-security/2016/05/29/1
- https://bugs.php.net/bug.php?id=70755
- http://github.com/php/php-src/commit/2721a0148649e07ed74468f097a28899741eb58f?w=1
- http://rhn.redhat.com/errata/RHSA-2016-2750.html
- https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05240731