CVE-2016-9933: Buffer Overflow

Published Nov 10, 2016
·
Updated

Fixed bug (imagefilltoborder stackoverflow on truecolor images). (CVE-2016-9933)

Other sources

Stack consumption vulnerability in the gdImageFillToBorder function in gd.c in the GD Graphics Library (aka libgd) before 2.2.2, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (segmentation violation) via a crafted imagefilltoborder call that triggers use of a negative color value.

— MITRE

When negative color values are passed to gdImageFillToBorder(), it can lead to infinite recursion, since the recursion termination condition will not necessarily be met.

Upstream bug:

https://bugs.php.net/bug.php?id=72696

PHP patch:

https://github.com/php/php-src/commit/863d37ea66d5c960db08d6f4a2cbd2518f0f80d1

libgd patch:

https://github.com/libgd/libgd/commit/77f619d48259383628c3ec4654b1ad578e9eb40e

CVE assignment:

http://seclists.org/oss-sec/2016/q4/658

— Red Hat

Affected Software

33 affected componentsFixes available
redhat/php<5.6.28
5.6.28
redhat/php<7.0.13
7.0.13
redhat/php<7.1.0
7.1.0
redhat/gd<2.2.2
2.2.2
Libgd Libgd=2.2.1
PHP PHP<=5.6.27
PHP PHP=7.0.0
PHP PHP=7.0.1
PHP PHP=7.0.2
PHP PHP=7.0.3
PHP PHP=7.0.4
PHP PHP=7.0.5
PHP PHP=7.0.6
PHP PHP=7.0.7
PHP PHP=7.0.8
PHP PHP=7.0.9
PHP PHP=7.0.10
PHP PHP=7.0.11
PHP PHP<7.0.13
7.0.13
All of the following
Libgd Libgd=2.2.1
Any of the following
PHP PHP<=5.6.27
PHP PHP=7.0.0
PHP PHP=7.0.1
PHP PHP=7.0.2
PHP PHP=7.0.3
PHP PHP=7.0.4
PHP PHP=7.0.5
PHP PHP=7.0.6
PHP PHP=7.0.7
PHP PHP=7.0.8
PHP PHP=7.0.9
PHP PHP=7.0.10
PHP PHP=7.0.11

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 5.6.28
  2. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 7.0.13
  3. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 7.1.0
  4. Upgrade

    Upgrade redhat/gd to a version that resolves this vulnerability.

    Fixed in 2.2.2
  5. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 7.0.13
  6. Upgrade

    Upgrade libgd to a version that resolves this vulnerability.

    Fixed in 2.2.2
  7. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 5.6.28

Event History

Nov 10, 2016
Updated
12:00 AM
Affected Software
Dec 1, 2016
CVE Published
12:00 AM
Data Sourced
12:00 AM
DescriptionAffected Software
Dec 14, 2016
Data Sourced
01:46 PM
Severity
Jan 4, 2017
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
Description
Data Sourced
via NVD·08:59 PM
RemedyDescriptionSeverityWeaknessAffected Software
May 4, 2018
Data Sourced
01:29 AM
RemedyWeakness
Feb 17, 2021
Data Sourced
via Red Hat·02:52 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2016-9933?

CVE-2016-9933 has a severity level that could lead to denial of service due to stack consumption.

2

How do I fix CVE-2016-9933?

To fix CVE-2016-9933, upgrade to PHP version 5.6.28 or 7.0.13, or GD version 2.2.2 or later.

3

What software is affected by CVE-2016-9933?

CVE-2016-9933 affects PHP versions prior to 5.6.28 and 7.0.13, as well as GD versions prior to 2.2.2.

4

Can CVE-2016-9933 be exploited remotely?

Yes, CVE-2016-9933 can be exploited remotely through crafted imagefilltoborder calls.

5

What type of vulnerability is CVE-2016-9933?

CVE-2016-9933 is classified as a stack consumption vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203