PHP 5.6.x < 5.6.25 Multiple Vulnerabilities

critical Web Application Scanning Plugin ID 98815
New! Plugin Severity Now Using CVSS v3

The calculated severity for Plugins has been updated to use CVSS v3 by default. Plugins that do not have a CVSS v3 score will fall back to CVSS v2 for calculating severity. Severity display preferences can be toggled in the settings dropdown.

Synopsis

PHP 5.6.x < 5.6.25 Multiple Vulnerabilities

Description

According to its banner, the version of PHP running on the remote web server is 5.6.x prior to 5.6.25. It is, therefore, affected by multiple vulnerabilities :

- An unspecified flaw exists in the object_common2() function in var_unserializer.c that occurs when handling objects during deserializaiton. An unauthenticated, remote attacker can exploit this to execute arbitrary code.

- An integer overflow condition exists in the php_snmp_parse_oid() function in snmp.c. An unauthenticated, remote attacker can exploit this to cause a heap-based buffer overflow, resulting in the execution of arbitrary code.

- An integer truncation flaw exists in the select_colors() function in gd_topal.c that is triggered when handling the number of colors. An unauthenticated, remote attacker can exploit to cause a heap-based buffer overflow, resulting in the execution of arbitrary code.

- An overflow condition exists in the sql_regcase() function in ereg.c due to improper handling of overly long strings. An unauthenticated, remote attacker can exploit this to corrupt memory, resulting in the execution of arbitrary code.

- A NULL pointer dereference flaw exists in the php_wddx_pop_element() function in wddx.c that is triggered during the handling of Base64 binary values. An unauthenticated, remote attacker can exploit this to cause a denial of service condition.

- An unspecified NULL pointer dereference flaw exists in the php_wddx_pop_element() function in wddx.c. An unauthenticated, remote attacker can exploit this to cause a denial of service condition.

- An integer overflow condition exists in the php_base64_encode() function in base64.c that occurs when handling overly long strings. An unauthenticated, remote attacker can exploit this to execute arbitrary code.

- A NULL pointer dereference flaw exists in the php_wddx_deserialize_ex() function in wddx.c that occurs during the handling of invalid XML content. An unauthenticated, remote attacker can exploit this to cause a denial of service condition.

- An integer overflow condition exists in the php_quot_print_encode() function in quot_print.c that occurs when handling overly long strings. An unauthenticated, remote attacker can exploit this to cause a heap-based buffer overflow condition, resulting in the execution of arbitrary code.

- A use-after-free error exists in the unserialize() function in var.c. An unauthenticated, remote attacker can exploit this to dereference already freed memory, resulting in the execution of arbitrary code.

- A flaw exists in the php_ftp_fopen_connect() function in ftp_fopen_wrapper.c that allows a man-in-the-middle attacker to silently downgrade to regular FTP even if a secure method has been requested.

- A flaw exists in the php_wddx_process_data() function in wddx.c that occurs when deserializing invalid dateTime values. An unauthenticated, remote attacker can exploit this to cause a denial of service condition.

- A flaw exists in the exif_process_IFD_in_TIFF() function in exif.c that occurs when handling TIFF image content. An unauthenticated, remote attacker can exploit this to disclose memory contents.

- An integer overflow condition exists in the php_url_encode() function in url.c that occurs when handling overly long strings. An unauthenticated, remote attacker can exploit this to corrupt memory, resulting in the execution of arbitrary code.

- An integer overflow condition exists in the php_uuencode() function in uuencode.c. An unauthenticated, remote attacker can exploit this to corrupt memory, resulting in the execution of arbitrary code.

- An integer overflow condition exists in the bzdecompress() function in bz2.c. An unauthenticated, remote attacker can exploit this to corrupt memory, resulting in the execution of arbitrary code.

- An indexing flaw exists in the imagegammacorrect() function in gd.c that occurs when handling negative gamma values. An unauthenticated, remote attacker can exploit this to write a NULL to an arbitrary memory location, resulting in a denial of service condition or the execution of arbitrary code.

- An integer overflow condition exists in the curl_escape() function in interface.c that occurs when handling overly long escaped strings. An unauthenticated, remote attacker can exploit this to corrupt memory, resulting in the execution of arbitrary code.

- An unspecified flaw exists in session.c that occurs when handling session names. An unauthenticated, remote attacker can exploit this to inject arbitrary data into sessions.

Note that the scanner has not attempted to exploit this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to PHP version 5.6.25 or later.

See Also

http://php.net/ChangeLog-5.php#5.6.25

Plugin Details

Severity: Critical

ID: 98815

Type: remote

Published: 1/9/2019

Updated: 9/7/2021

Scan Template: api, scan, pci

Risk Information

CVSS Score Source: CVE-2016-7124

CVSS v2

Risk Factor: High

Base Score: 7.5

Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Vulnerability Information

CPE: cpe:2.3:a:php:php:*:*:*:*:*:*:*:*

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 9/12/2016

Vulnerability Publication Date: 9/12/2016

Reference Information

CVE: CVE-2016-7124, CVE-2016-7125, CVE-2016-7126, CVE-2016-7127, CVE-2016-7128, CVE-2016-7129, CVE-2016-7130, CVE-2016-7131, CVE-2016-7132

CWE: 502, 74, 787, 200, 20, 476, 190, 119

WASC: Buffer Overflow, Improper Input Handling, Information Leakage, Integer Overflows

HIPAA: 164.306(a)(1), 164.306(a)(2)

CAPEC: 10, 100, 101, 104, 108, 109, 110, 116, 120, 123, 13, 135, 136, 14, 153, 169, 182, 209, 22, 224, 23, 230, 231, 24, 250, 261, 267, 273, 28, 285, 287, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 312, 313, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 34, 42, 43, 44, 45, 46, 47, 472, 473, 497, 508, 51, 52, 53, 573, 574, 575, 576, 577, 586, 588, 59, 6, 60, 616, 63, 64, 643, 646, 651, 67, 7, 71, 72, 73, 76, 78, 79, 8, 80, 81, 83, 84, 85, 88, 9, 92

DISA STIG: APSC-DV-000460, APSC-DV-002560, APSC-DV-002590, APSC-DV-002630

OWASP: 2010-A1, 2010-A4, 2010-A6, 2013-A1, 2013-A4, 2013-A5, 2013-A9, 2017-A1, 2017-A5, 2017-A6, 2017-A8, 2017-A9, 2021-A1, 2021-A3, 2021-A6, 2021-A8

OWASP API: 2019-API7, 2019-API8

OWASP ASVS: 4.0.2-14.2.1, 4.0.2-5.1.3, 4.0.2-5.2.5, 4.0.2-5.5.1, 4.0.2-8.3.4

PCI-DSS: 3.2-6.2, 3.2-6.3, 3.2-6.4, 3.2-6.5, 3.2-6.5.1, 3.2-6.5.2, 3.2-6.5.8, 3.2-6.6, 3.2-6.7

ISO: 27001-A.12.6.1, 27001-A.14.2.5