Every CVE Search/ Get API key

CVE-2015-8877

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd)...

7.5 HighFix available

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.

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
None
Integrity
None
Availability
High

Exploit likelihood

3.65%Up 2.3 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 7.5

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.

Record
CVE-2015-8877
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-399
Updated
2026-11-02
CVE List No score

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.

Record
CVE-2015-8877
Updated
2026-11-02
EUVDEUVD-2015-8733 No score

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.

Record
EUVD-2015-8733
Updated
2026-11-03
GitHub AdvisoriesGHSA-pw83-9cfw-pfm6 7.5

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd)...

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.

Record
GHSA-pw83-9cfw-pfm6
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSV 7.5

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.

Record
CVE-2015-8877
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2015-8877 7.5

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.

Record
DEBIAN-CVE-2015-8877
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVRHSA-2016:2750 8.1

Red Hat Security Advisory: rh-php56 security, bug fix, and enhancement update

Record
RHSA-2016:2750
CVSS 3.0
8.1 HighCVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2015-8877 7.5

The gdImageScaleTwoPass function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.0, as used in PHP before 5.6.12, uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function.

Record
UBUNTU-CVE-2015-8877
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVMGASA-2016-0215 No score

Updated libgd packages fix security vulnerabilities

Updated libgd packages fix security vulnerabilities:

The gdImageScaleTwoPass function in gd_interpolation.c in libgd before 2.2.0 uses inconsistent allocate and free approaches, which allows remote attackers to cause a denial of service (memory consumption) via a crafted call, as demonstrated by a call to the PHP imagescale function (CVE-2015-8877).

While creating an XBM image (imagexbm) with an user supplied name, libgd before 2.2.0 did not check the vsnprintf return value, so an application might trust this length and read more memory than it should, causing a read-out-of boundaries, leaking stack memory (CVE-2016-5116).

Record
MGASA-2016-0215
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
OSVUSN-2987-1 No score

libgd2 vulnerabilities

It was discovered that the GD library incorrectly handled certain color tables in XPM images. If a user or automated system were tricked into processing a specially crafted XPM image, an attacker could cause a denial of service. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2014-2497)

It was discovered that the GD library incorrectly handled certain malformed GIF images. If a user or automated system were tricked into processing a specially crafted GIF image, an attacker could cause a denial of service. This issue only affected Ubuntu 12.04 LTS and Ubuntu 14.04 LTS. (CVE-2014-9709)

It was discovered that the GD library incorrectly handled memory when using gdImageFillToBorder(). A remote attacker could possibly use this issue to cause a denial of service. (CVE-2015-8874)

It was discovered that the GD library incorrectly handled memory when using gdImageScaleTwoPass(). A remote attacker could possibly use this issue to cause a denial of service. This issue only applied to Ubuntu 14.04 LTS, Ubuntu 15.10 and Ubuntu 16.04 LTS. (CVE-2015-8877)

Hans Jerry Illikainen discovered that the GD library incorrectly handled certain malformed GD images. If a user or automated system were tricked into processing a specially crafted GD image, an attacker could cause a denial of service or possibly execute arbitrary code. (CVE-2016-3074)

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

Affected products

Affected packages

Affected packages
PackageAffectedFixed
libgd2
Debian:12
before 2.2.1-1
2.2.1-1
libgd2
Debian:13
before 2.2.1-1
2.2.1-1
libgd2
Debian:14
before 2.2.1-1
2.2.1-1
libgd2
Debian:8
From an advisory covering 3 CVEs
before 2.1.0-5+deb8u3, plus listed versions
2.1.0-52.1.0-5+deb8u12.1.0-5+deb8u2
2.1.0-5+deb8u3
libgd
Mageia:5
From an advisory covering 2 CVEs
before 2.2.1-1.2.mga5
2.2.1-1.2.mga5
rh-php56
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:2.3-1.el6
0:2.3-1.el6
rh-php56-php
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-bcmath
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-cli
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-common
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
Show 75 moreShow less
Affected packages
PackageAffectedFixed
rh-php56-php-dba
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-dbg
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-debuginfo
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-devel
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-embedded
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-enchant
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-fpm
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-gd
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-gmp
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-imap
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-intl
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-ldap
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-mbstring
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-mysqlnd
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-odbc
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-opcache
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-pdo
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-pear
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 1:1.9.5-4.el6
1:1.9.5-4.el6
rh-php56-php-pgsql
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-process
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-pspell
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-recode
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-snmp
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-soap
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-tidy
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-xml
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-php-xmlrpc
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:5.6.25-1.el6
0:5.6.25-1.el6
rh-php56-runtime
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:2.3-1.el6
0:2.3-1.el6
rh-php56-scldevel
Red Hat:rhel_software_collections:2::el6
From an advisory covering 80 CVEs
before 0:2.3-1.el6
0:2.3-1.el6
rh-php56
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:2.3-1.el7
0:2.3-1.el7
rh-php56-php
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-bcmath
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-cli
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-common
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-dba
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-dbg
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-debuginfo
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-devel
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-embedded
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-enchant
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-fpm
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-gd
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-gmp
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-intl
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-ldap
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-mbstring
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-mysqlnd
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-odbc
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-opcache
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-pdo
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-pear
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 1:1.9.5-4.el7
1:1.9.5-4.el7
rh-php56-php-pgsql
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-process
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-pspell
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-recode
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-snmp
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-soap
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-xml
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-php-xmlrpc
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:5.6.25-1.el7
0:5.6.25-1.el7
rh-php56-runtime
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:2.3-1.el7
0:2.3-1.el7
rh-php56-scldevel
Red Hat:rhel_software_collections:2::el7
From an advisory covering 80 CVEs
before 0:2.3-1.el7
0:2.3-1.el7
imap
SUSE:Linux Enterprise Desktop 12
From an advisory covering 8 CVEs
before 2007e_suse-19.1
2007e_suse-19.1
imap
SUSE:Linux Enterprise Desktop 12 SP1
From an advisory covering 8 CVEs
before 2007e_suse-19.1
2007e_suse-19.1
imap
SUSE:Linux Enterprise Module for Web and Scripting 12
From an advisory covering 8 CVEs
before 2007e_suse-19.1
2007e_suse-19.1
php5
SUSE:Linux Enterprise Module for Web and Scripting 12
From an advisory covering 8 CVEs
before 5.5.14-64.5
5.5.14-64.5
imap
SUSE:Linux Enterprise Software Development Kit 12
From an advisory covering 8 CVEs
before 2007e_suse-19.1
2007e_suse-19.1
php5
SUSE:Linux Enterprise Software Development Kit 12
From an advisory covering 8 CVEs
before 5.5.14-64.5
5.5.14-64.5
imap
SUSE:Linux Enterprise Software Development Kit 12 SP1
From an advisory covering 8 CVEs
before 2007e_suse-19.1
2007e_suse-19.1
php5
SUSE:Linux Enterprise Software Development Kit 12 SP1
From an advisory covering 8 CVEs
before 5.5.14-64.5
5.5.14-64.5
imap
SUSE:Linux Enterprise Workstation Extension 12
From an advisory covering 8 CVEs
before 2007e_suse-19.1
2007e_suse-19.1
imap
SUSE:Linux Enterprise Workstation Extension 12 SP1
From an advisory covering 8 CVEs
before 2007e_suse-19.1
2007e_suse-19.1
libgd2
Ubuntu:14.04:LTS
before 2.1.0-3ubuntu0.1, plus listed versions
2.1.0-22.1.0-3
2.1.0-3ubuntu0.1
libgd2
Ubuntu:16.04:LTS
before 2.1.1-4ubuntu0.16.04.1, plus listed versions
2.1.1-4build12.1.1-4build2
2.1.1-4ubuntu0.16.04.1
libgd2
Ubuntu:14.04:LTS
From an advisory covering 5 CVEs
before 2.1.0-3ubuntu0.1, plus listed versions
2.1.0-22.1.0-3
2.1.0-3ubuntu0.1
libgd2
Ubuntu:16.04:LTS
From an advisory covering 5 CVEs
before 2.1.1-4ubuntu0.16.04.1, plus listed versions
2.1.1-4build12.1.1-4build2
2.1.1-4ubuntu0.16.04.1

History

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

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

In short

CVE-2015-8877 is a high vulnerability (CVSS 7.5) in Libgd, published May 21, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.65%, the 89th percentile. Fixed in libgd2 2.2.1-1.

References

Show 194 moreShow less
This page doesn't list everything

Left out here: 151 references. The JSON record has them.

MoveEnter Open