Every CVE Search/ Get API key

CVE-2016-5095

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before...

8.6 HighFix available

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before 5.5.36 and 5.6.x before 5.6.22 allows remote attackers to cause a denial of service or possibly have unspecified other impact by triggering a large output string from a FILTER_SANITIZE_FULL_SPECIAL_CHARS filter_var call. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-5094.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
High

Exploit likelihood

2.64%Up 1.3 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 8.6

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before 5.5.36 and 5.6.x before 5.6.22 allows remote attackers to cause a denial of service or possibly have unspecified other impact by triggering a large output string from a FILTER_SANITIZE_FULL_SPECIAL_CHARS filter_var call. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-5094.

Record
CVE-2016-5095
CVSS 3.0
8.6 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-190
Updated
2026-11-02
CVE List No score

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before 5.5.36 and 5.6.x before 5.6.22 allows remote attackers to cause a denial of service or possibly have unspecified other impact by triggering a large output string from a FILTER_SANITIZE_FULL_SPECIAL_CHARS filter_var call. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-5094.

Record
CVE-2016-5095
Updated
2026-11-02
EUVDEUVD-2016-6047 No score

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before 5.5.36 and 5.6.x before 5.6.22 allows remote attackers to cause a denial of service or possibly have unspecified other impact by triggering a large output string from a FILTER_SANITIZE_FULL_SPECIAL_CHARS filter_var call. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-5094.

Record
EUVD-2016-6047
Updated
2026-11-03
GitHub AdvisoriesGHSA-93jw-q774-wqcf 8.6

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before...

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before 5.5.36 and 5.6.x before 5.6.22 allows remote attackers to cause a denial of service or possibly have unspecified other impact by triggering a large output string from a FILTER_SANITIZE_FULL_SPECIAL_CHARS filter_var call. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-5094.

Record
GHSA-93jw-q774-wqcf
CVSS 3.0
8.6 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
Weakness
CWE-190
Updated
2026-11-02
OSV 8.6

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before 5.5.36 and 5.6.x before 5.6.22 allows remote attackers to cause a denial of service or possibly have unspecified other impact by triggering a large output string from a FILTER_SANITIZE_FULL_SPECIAL_CHARS filter_var call. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-5094.

Record
CVE-2016-5095
CVSS 3.0
8.6 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2016-5095 8.6

Integer overflow in the php_escape_html_entities_ex function in ext/standard/html.c in PHP before 5.5.36 and 5.6.x before 5.6.22 allows remote attackers to cause a denial of service or possibly have unspecified other impact by triggering a large output string from a FILTER_SANITIZE_FULL_SPECIAL_CHARS filter_var call. NOTE: this vulnerability exists because of an incomplete fix for CVE-2016-5094.

Record
UBUNTU-CVE-2016-5095
CVSS 3.0
8.6 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVSUSE-SU-2016:1581-1 No score

Security update for php53

This update for php53 fixes the following issues:

  • CVE-2016-5093: A get_icu_value_internal out-of-bounds read could crash the php interpreter (bsc#982010)
  • CVE-2016-5094,CVE-2016-5095: Don't allow creating strings with lengths outside int range, avoids overflows (bsc#982011,bsc#982012)
  • CVE-2016-5096: A int/size_t confusion in fread could corrupt memory (bsc#982013)
  • CVE-2016-5114: A fpm_log.c memory leak and buffer overflow could leak information out of the php process or overwrite a buffer by 1 byte (bsc#982162)
  • CVE-2016-4346: A heap overflow was fixed in ext/standard/string.c (bsc#977994)
  • CVE-2016-4342: A heap corruption was fixed in tar/zip/phar parser (bsc#977991)
  • CVE-2016-4537, CVE-2016-4538: bcpowmod accepted negative scale causing heap buffer overflow corrupting one definition (bsc#978827)
  • CVE-2016-4539: Malformed input causes segmentation fault in xml_parse_into_struct() function (bsc#978828)
  • CVE-2016-4540, CVE-2016-4541: Out-of-bounds memory read in zif_grapheme_stripos when given negative offset (bsc#978829)
  • CVE-2016-4542, CVE-2016-4543, CVE-2016-4544: Out-of-bounds heap memory read in exif_read_data() caused by malformed input (bsc#978830)
  • CVE-2015-4116: Use-after-free vulnerability in the spl_ptr_heap_insert function (bsc#980366)
  • CVE-2015-8873: Stack consumption vulnerability in Zend/zend_exceptions.c (bsc#980373)
  • CVE-2015-8874: Stack consumption vulnerability in GD (bsc#980375)
  • CVE-2015-8879: odbc_bindcols function in ext/odbc/php_odbc.c mishandles driver behavior for SQL_WVARCHAR (bsc#981050)

Also fixed previously on SUSE Linux Enterprise 11 SP4, but not yet shipped to SUSE Linux Enterprise Server 11 SP3 LTSS:

  • CVE-2015-8838: mysqlnd was vulnerable to BACKRONYM (bnc#973792).
  • CVE-2015-8835: SoapClient s_call method suffered from a type confusion issue that could have lead to crashes [bsc#973351]
  • CVE-2016-2554: A NULL pointer dereference in phar_get_fp_offset could lead to crashes. [bsc#968284]
  • CVE-2015-7803: A Stack overflow vulnerability when decompressing tar phar archives could potentially lead to code execution. [bsc#949961]
  • CVE-2016-3141: A use-after-free / double-free in the WDDX deserialization could lead to crashes or potential code execution. [bsc#969821]
  • CVE-2016-3142: An Out-of-bounds read in phar_parse_zipfile() could lead to crashes. [bsc#971912]
  • CVE-2014-9767: A directory traversal when extracting zip files was fixed that could lead to overwritten files. [bsc#971612]
  • CVE-2016-3185: A type confusion vulnerability in make_http_soap_request() could lead to crashes or potentially code execution. [bsc#971611]
  • CVE-2016-4073: A remote attacker could have caused denial of service, or possibly execute arbitrary code, due to incorrect handling of string length calculations in mb_strcut() (bsc#977003)
  • CVE-2015-8867: The PHP function openssl_random_pseudo_bytes() did not return cryptographically secure random bytes (bsc#977005)
  • CVE-2016-4070: The libxml_disable_entity_loader() setting was shared between threads, which could have resulted in XML external entity injection and entity expansion issues (bsc#976997)
  • CVE-2015-8866: A remote attacker could have caused denial of service due to incorrect handling of large strings in php_raw_url_encode() (bsc#976996)
Record
SUSE-SU-2016:1581-1
Updated
2026-11-02
OSVSUSE-SU-2016:1633-1 No score

Security update for php5

This update for php5 fixes the following issues:

  • CVE-2013-7456: imagescale out-of-bounds read (bnc#982009).
  • CVE-2016-5093: get_icu_value_internal out-of-bounds read (bnc#982010).
  • CVE-2016-5094: Don't create strings with lengths outside of valid range (bnc#982011).
  • CVE-2016-5095: Don't create strings with lengths outside of valid range (bnc#982012).
  • CVE-2016-5096: int/size_t confusion in fread (bsc#982013).
  • CVE-2015-8877: The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) as used in PHP used inconsistent allocate and free approaches, which allowed remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function (bsc#981061).
  • CVE-2015-8876: Zend/zend_exceptions.c in PHP did not validate certain Exception objects, which allowed remote attackers to cause a denial of service (NULL pointer dereference and application crash) or trigger unintended method execution via crafted serialized data (bsc#981049).
  • CVE-2015-8879: The odbc_bindcols function in ext/odbc/php_odbc.c in PHP mishandles driver behavior for SQL_WVARCHAR columns, which allowed remote attackers to cause a denial of service (application crash) in opportunistic circumstances by leveraging use of the odbc_fetch_array function to access a certain type of Microsoft SQL Server table (bsc#981050).
Record
SUSE-SU-2016:1633-1
Updated
2026-11-02
OSVSUSE-SU-2016:1638-1 No score

Security update for php53

This update for php53 to version 5.3.17 fixes the following issues:

These security issues were fixed:

  • CVE-2016-5093: get_icu_value_internal out-of-bounds read (bnc#982010).
  • CVE-2016-5094: Don't create strings with lengths outside int range (bnc#982011).
  • CVE-2016-5095: Don't create strings with lengths outside int range (bnc#982012).
  • CVE-2016-5096: int/size_t confusion in fread (bsc#982013).
  • CVE-2016-5114: fpm_log.c memory leak and buffer overflow (bnc#982162).
  • CVE-2015-8879: The odbc_bindcols function in ext/odbc/php_odbc.c in PHP mishandles driver behavior for SQL_WVARCHAR columns, which allowed remote attackers to cause a denial of service (application crash) in opportunistic circumstances by leveraging use of the odbc_fetch_array function to access a certain type of Microsoft SQL Server table (bsc#981050).
  • CVE-2015-4116: Use-after-free vulnerability in the spl_ptr_heap_insert function in ext/spl/spl_heap.c in PHP allowed remote attackers to execute arbitrary code by triggering a failed SplMinHeap::compare operation (bsc#980366).
  • CVE-2015-8874: Stack consumption vulnerability in GD in PHP allowed remote attackers to cause a denial of service via a crafted imagefilltoborder call (bsc#980375).
  • CVE-2015-8873: Stack consumption vulnerability in Zend/zend_exceptions.c in PHP allowed remote attackers to cause a denial of service (segmentation fault) via recursive method calls (bsc#980373).
  • CVE-2016-4540: The grapheme_stripos function in ext/intl/grapheme/grapheme_string.c in PHP allowed remote attackers to cause a denial of service (out-of-bounds read) or possibly have unspecified other impact via a negative offset (bsc#978829).
  • CVE-2016-4541: The grapheme_strpos function in ext/intl/grapheme/grapheme_string.c in PHP allowed remote attackers to cause a denial of service (out-of-bounds read) or possibly have unspecified other impact via a negative offset (bsc#978829.
  • CVE-2016-4542: The exif_process_IFD_TAG function in ext/exif/exif.c in PHP did not properly construct spprintf arguments, which allowed remote attackers to cause a denial of service (out-of-bounds read) or possibly have unspecified other impact via crafted header data (bsc#978830).
  • CVE-2016-4543: The exif_process_IFD_in_JPEG function in ext/exif/exif.c in PHP did not validate IFD sizes, which allowed remote attackers to cause a denial of service (out-of-bounds read) or possibly have unspecified other impact via crafted header data (bsc#978830.
  • CVE-2016-4544: The exif_process_TIFF_in_JPEG function in ext/exif/exif.c in PHP did not validate TIFF start data, which allowed remote attackers to cause a denial of service (out-of-bounds read) or possibly have unspecified other impact via crafted header data (bsc#978830.
  • CVE-2016-4537: The bcpowmod function in ext/bcmath/bcmath.c in PHP accepted a negative integer for the scale argument, which allowed remote attackers to cause a denial of service or possibly have unspecified other impact via a crafted call (bsc#978827).
  • CVE-2016-4538: The bcpowmod function in ext/bcmath/bcmath.c in PHP modified certain data structures without considering whether they are copies of the zero, one, or two global variable, which allowed remote attackers to cause a denial of service or possibly have unspecified other impact via a crafted call (bsc#978827).
  • CVE-2016-4539: The xml_parse_into_struct function in ext/xml/xml.c in PHP allowed remote attackers to cause a denial of service (buffer under-read and segmentation fault) or possibly have unspecified other impact via crafted XML data in the second argument, leading to a parser level of zero (bsc#978828).
  • CVE-2016-4342: ext/phar/phar_object.c in PHP mishandles zero-length uncompressed data, which allowed remote attackers to cause a denial of service (heap memory corruption) or possibly have unspecified other impact via a crafted (1) TAR, (2) ZIP, or (3) PHAR archive (bsc#977991).
  • CVE-2016-4346: Integer overflow in the str_pad function in…
Record
SUSE-SU-2016:1638-1
Updated
2026-11-02
OSVUSN-3045-1 No score

php5, php7.0 vulnerabilities

It was discovered that PHP incorrectly handled certain SplMinHeap::compare operations. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2015-4116)

It was discovered that PHP incorrectly handled recursive method calls. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2015-8873)

It was discovered that PHP incorrectly validated certain Exception objects when unserializing data. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2015-8876)

It was discovered that PHP header() function performed insufficient filtering for Internet Explorer. A remote attacker could possibly use this issue to perform a XSS attack. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2015-8935)

It was discovered that PHP incorrectly handled certain locale operations. An attacker could use this issue to cause PHP to crash, resulting in a denial of service. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2016-5093)

It was discovered that the PHP php_html_entities() function incorrectly handled certain string lengths. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2016-5094, CVE-2016-5095)

It was discovered that the PHP fread() function incorrectly handled certain lengths. An attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2016-5096)

It was discovered that the PHP FastCGI Process Manager (FPM) SAPI incorrectly handled memory in the access logging feature. An attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly expose sensitive information. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2016-5114)

It was discovered that PHP would not protect applications from contents of the HTTP_PROXY environment variable when based on the contents of the Proxy header from HTTP requests. A remote attacker could possibly use this issue in combination with scripts that honour the HTTP_PROXY variable to redirect outgoing HTTP requests. (CVE-2016-5385)

Hans Jerry Illikainen discovered that the PHP bzread() function incorrectly performed error handling. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2016-5399)

It was discovered that certain PHP multibyte string functions incorrectly handled memory. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2016-5768)

It was discovered that the PHP Mcrypt extension incorrectly handled memory. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2016-5769)

It was discovered that the PHP garbage collector incorrectly handled certain objects when unserializing malicious data. A remote attacker could use this issue to cause PHP to crash, resulting in a denial of service, or possibly execute arbitrary code. This issue was only addressed in Ubuntu Ubuntu 14.04 LTS. (CVE-2016-5771, CVE-2016-5773)

It was discovered that PHP incorrectly handled memory when unserializing malicious xml data. A remote attacker could use this issue to cause PHP to crash, resulting in a…

Record
USN-3045-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
php5
Debian:7
before 5.4.45-0+deb7u4, plus listed versions
5.4.11-15.4.15-15.4.34-0+deb7u15.4.35-0+deb7u15.4.35-0+deb7u2
Show 33 moreShow less
5.4.36-0+deb7u15.4.36-0+deb7u35.4.38-0+deb7u15.4.39-0+deb7u15.4.39-0+deb7u25.4.4-145.4.4-14+deb7u15.4.4-14+deb7u105.4.4-14+deb7u115.4.4-14+deb7u125.4.4-14+deb7u135.4.4-14+deb7u145.4.4-14+deb7u25.4.4-14+deb7u35.4.4-14+deb7u45.4.4-14+deb7u55.4.4-14+deb7u75.4.4-14+deb7u85.4.4-14+deb7u95.4.4-155.4.4-15.15.4.41-0+deb7u15.4.44-0+deb7u15.4.45-0+deb7u15.4.45-0+deb7u25.4.45-0+deb7u35.4.6-15.4.6-25.4.8-15.4.9-15.4.9-25.4.9-35.4.9-4
5.4.45-0+deb7u4
php5
Debian:8
before 5.6.22+dfsg-0+deb8u1, plus listed versions
5.6.11+dfsg-15.6.12+dfsg-0+deb8u15.6.12+dfsg-15.6.13+dfsg-0+deb8u15.6.13+dfsg-1
Show 22 moreShow less
5.6.13+dfsg-25.6.14+dfsg-0+deb8u15.6.14+dfsg-15.6.15+dfsg-15.6.16+dfsg-15.6.16+dfsg-25.6.16+dfsg-35.6.16+dfsg-45.6.17+dfsg-0+deb8u15.6.17+dfsg-15.6.17+dfsg-35.6.18+dfsg-15.6.19+dfsg-0+deb8u15.6.19+dfsg-15.6.19+dfsg-25.6.20+dfsg-0+deb8u15.6.20+dfsg-15.6.21+dfsg-15.6.21+dfsg-25.6.7+dfsg-15.6.9+dfsg-0+deb8u15.6.9+dfsg-1
5.6.22+dfsg-0+deb8u1
php53
SUSE:Linux Enterprise Software Development Kit 11 SP4
before 5.3.17-71.1
5.3.17-71.1
php53
SUSE:OpenStack Cloud 5
before 5.3.17-71.1
5.3.17-71.1
php53
SUSE:Manager 2.1
before 5.3.17-71.1
5.3.17-71.1
php53
SUSE:Manager Proxy 2.1
before 5.3.17-71.1
5.3.17-71.1
php53
SUSE:Linux Enterprise Server 11 SP3-LTSS
before 5.3.17-71.1
5.3.17-71.1
php53
SUSE:Linux Enterprise Server 11 SP3-TERADATA
before 5.3.17-71.1
5.3.17-71.1
php53
SUSE:Linux Enterprise Server 11 SP4
before 5.3.17-71.1
5.3.17-71.1
php53
SUSE:Linux Enterprise Server for SAP Applications 11 SP4
before 5.3.17-71.1
5.3.17-71.1
Show 13 moreShow less
Affected packages
PackageAffectedFixed
imap
SUSE:Linux Enterprise Desktop 12
before 2007e_suse-19.1
2007e_suse-19.1
imap
SUSE:Linux Enterprise Desktop 12 SP1
before 2007e_suse-19.1
2007e_suse-19.1
imap
SUSE:Linux Enterprise Module for Web and Scripting 12
before 2007e_suse-19.1
2007e_suse-19.1
php5
SUSE:Linux Enterprise Module for Web and Scripting 12
before 5.5.14-64.5
5.5.14-64.5
imap
SUSE:Linux Enterprise Software Development Kit 12
before 2007e_suse-19.1
2007e_suse-19.1
php5
SUSE:Linux Enterprise Software Development Kit 12
before 5.5.14-64.5
5.5.14-64.5
imap
SUSE:Linux Enterprise Software Development Kit 12 SP1
before 2007e_suse-19.1
2007e_suse-19.1
php5
SUSE:Linux Enterprise Software Development Kit 12 SP1
before 5.5.14-64.5
5.5.14-64.5
imap
SUSE:Linux Enterprise Workstation Extension 12
before 2007e_suse-19.1
2007e_suse-19.1
imap
SUSE:Linux Enterprise Workstation Extension 12 SP1
before 2007e_suse-19.1
2007e_suse-19.1
php53
SUSE:Linux Enterprise Server 11 SP2-LTSS
before 5.3.17-47.1
5.3.17-47.1
php5
Ubuntu:14.04:LTS
before 5.5.9+dfsg-1ubuntu4.19, plus listed versions
5.5.3+dfsg-1ubuntu25.5.3+dfsg-1ubuntu35.5.6+dfsg-1ubuntu15.5.6+dfsg-1ubuntu25.5.8+dfsg-2ubuntu1
Show 18 moreShow less
5.5.9+dfsg-1ubuntu15.5.9+dfsg-1ubuntu25.5.9+dfsg-1ubuntu35.5.9+dfsg-1ubuntu45.5.9+dfsg-1ubuntu4.15.5.9+dfsg-1ubuntu4.25.5.9+dfsg-1ubuntu4.35.5.9+dfsg-1ubuntu4.45.5.9+dfsg-1ubuntu4.55.5.9+dfsg-1ubuntu4.65.5.9+dfsg-1ubuntu4.75.5.9+dfsg-1ubuntu4.95.5.9+dfsg-1ubuntu4.115.5.9+dfsg-1ubuntu4.125.5.9+dfsg-1ubuntu4.135.5.9+dfsg-1ubuntu4.145.5.9+dfsg-1ubuntu4.165.5.9+dfsg-1ubuntu4.17
5.5.9+dfsg-1ubuntu4.19
php7.0
Ubuntu:16.04:LTS
before 7.0.8-0ubuntu0.16.04.2, plus listed versions
7.0.1-57.0.1-67.0.2-17.0.2-37.0.2-4
Show 10 moreShow less
7.0.2-57.0.3-27.0.3-37.0.3-9ubuntu17.0.4-5ubuntu17.0.4-5ubuntu27.0.4-7ubuntu17.0.4-7ubuntu27.0.4-7ubuntu2.17.0.8-0ubuntu0.16.04.1
7.0.8-0ubuntu0.16.04.2

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2016-5095 is a high vulnerability (CVSS 8.6) in Php, published May 30, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.64%, the 85th percentile. Fixed in php5 5.4.45-0+deb7u4.

References

Show 194 moreShow less
This page doesn't list everything

Left out here: 4 references and the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open