CVE-2017-7890: Infoleak

Published Jul 6, 2017
·
Updated

A flaw was found in php. The GIF decoding function gdImageCreateFromGifCtx in gdgifin.c (which can be reached with a call to the imagecreatefromstring() function) uses constant-sized color tables of size 3 256, but does not zero-out these arrays before use. This flaw could lead to a information leak through a specially crafted image with bogus color table.

Upstream bug:

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

Upstream patch:

http://git.php.net/?p=php-src.git;a=commit;h=018092125538782b25d3ab6b036f0c8d5968f757 http://git.php.net/?p=php-src.git;a=commit;h=8dc4f4dc9e44d1cbfe4654aa6e0dc27c94913938 https://bugs.php.net/patch-display.php?bug=74435&patch=fix-74435-php-7.0&revision=1497970038

References:

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

Other sources

Fixed bug (Buffer over-read into uninitialized memory). (CVE-2017-7890)

— PHP

The GIF decoding function gdImageCreateFromGifCtx in gdgifin.c in the GD Graphics Library (aka libgd), as used in PHP before 5.6.31 and 7.x before 7.1.7, does not zero colorMap arrays before use. A specially crafted GIF image could use the uninitialized tables to read ~700 bytes from the top of the stack, potentially disclosing sensitive information.

— MITRE

Affected Software

37 affected componentsFixes available
PHP PHP<=5.6.30
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.12
PHP PHP=7.0.13
PHP PHP=7.0.14
PHP PHP=7.0.15
PHP PHP=7.0.16
PHP PHP=7.0.17
PHP PHP=7.0.18
PHP PHP=7.0.19
PHP PHP=7.0.20
PHP PHP=7.1.0
PHP PHP=7.1.1
PHP PHP=7.1.2
PHP PHP=7.1.3
PHP PHP=7.1.4
PHP PHP=7.1.5
PHP PHP=7.1.6
PHP PHP<7.0.21
7.0.21
redhat/php<5.6.31
5.6.31
redhat/php<7.0.21
7.0.21
redhat/php<7.1.7
7.1.7
alpine/gd<2.2.5-r0
2.2.5-r0
alpine/gd<2.2.5-r0
2.2.5-r0
alpine/gd<2.2.5-r0
2.2.5-r0
alpine/php7<7.1.7-r0
7.1.7-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 7.0.21
  2. Upgrade

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

    Fixed in 5.6.31
  3. Upgrade

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

    Fixed in 7.0.21
  4. Upgrade

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

    Fixed in 7.1.7
  5. Upgrade

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

    Fixed in 2.2.5-r0
  6. Upgrade

    Upgrade alpine/php7 to a version that resolves this vulnerability.

    Fixed in 7.1.7-r0
  7. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 5.6.31
  8. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 7.1.7

Event History

Jul 6, 2017
CVE Published
12:00 AM
Data Sourced
12:00 AM
DescriptionAffected Software
Updated
12:00 AM
Affected Software
Jul 21, 2017
Data Sourced
07:15 PM
Severity
Aug 2, 2017
CVE Published
via MITRE·07:00 PM
Data Sourced
via MITRE·07:00 PM
Description
Data Sourced
via OSV·07:29 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:29 PM
RemedyDescriptionSeverityWeaknessAffected Software
May 4, 2018
Data Sourced
01:29 AM
RemedyWeakness
Feb 17, 2021
Data Sourced
via Red Hat·01:51 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2017-7890?

CVE-2017-7890 is classified as a medium severity vulnerability due to the potential for information disclosure.

2

How do I fix CVE-2017-7890?

To fix CVE-2017-7890, upgrade to PHP version 5.6.31 or 7.0.21 or later.

3

What versions of PHP are affected by CVE-2017-7890?

CVE-2017-7890 affects PHP versions prior to 5.6.31, 7.0.20, and 7.1.6.

4

What types of attacks can be executed using CVE-2017-7890?

An attacker can exploit CVE-2017-7890 to retrieve sensitive information from server memory by providing a crafted GIF image.

5

Is CVE-2017-7890 a remote or local vulnerability?

CVE-2017-7890 can be exploited remotely by an attacker through the upload and processing of a malicious GIF file.

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