CVE-2017-7890: The GIF decoding function gdImageCreateFromGifCtx in gd_gif_in.c in the GD Graphics Library (aka libgd), as used in PHP before 5.6.31 and…
Noroxi assessment
Priority: Monitor (action score 27/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 3.4% (FIRST EPSS); higher than 89% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: gd (Alpine:v3.4) 2.2.5-r0; php7 (Alpine:v3.7) 7.1.7-r0; libgd2 (Debian:12) 2.2.5-1.
Low priority for now. Upgrade to gd (Alpine:v3.4) 2.2.5-r0; php7 (Alpine:v3.7) 7.1.7-r0; libgd2 (Debian:12) 2.2.5-1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
The GIF decoding function gdImageCreateFromGifCtx in gd_gif_in.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.
- Published
- Aug 2, 2017
- Updated
- Jun 16, 2026
- EPSS
- 3.4% · 89th percentile
- CWE
- CWE-200
Report tools
Action score
27
Low priority for now.
- CVSS
- 26 / 40 · 6.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 3.4%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| php | php | cpe:2.3:a:php:php |
Using php? Add it to your stack and be the first to know about CVEs like this one. (PHP)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- php phpup to 5.6.30 inclusive
- php php7.0.0
- php php7.0.1
- php php7.0.10
- php php7.0.11
- php php7.0.12
- php php7.0.13
- php php7.0.14
+12 more rows
- php php7.0.15
- php php7.0.16
- php php7.0.17
- php php7.0.18
- php php7.0.19
- php php7.0.2
- php php7.0.20
- php php7.0.3
- php php7.0.4
- php php7.0.5
- php php7.0.6
- php php7.0.7
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.4 | gd | before 2.2.5-r0 | 2.2.5-r0 |
| Alpine:v3.7 | php7 | before 7.1.7-r0 | 7.1.7-r0 |
| Debian:12 | libgd2 | before 2.2.5-1 | 2.2.5-1 |
| Debian:7 | libgd2 | before 2.0.36~rc1~dfsg-6.1+deb7u9 | 2.0.36~rc1~dfsg-6.1+deb7u9 |
| Debian:8 | libgd2 | before 2.1.0-5+deb8u10 | 2.1.0-5+deb8u10 |
| Debian:9 | libgd2 | before 2.2.4-2+deb9u1 | 2.2.4-2+deb9u1 |
| openSUSE:Tumbleweed | gd | before 2.3.3-1.1 | 2.3.3-1.1 |
| Red Hat:enterprise_linux:7::client | php | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-bcmath | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-cli | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-common | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-dba | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-debuginfo | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-devel | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-embedded | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-enchant | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-fpm | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-gd | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-intl | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-ldap | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-mbstring | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-mysql | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-mysqlnd | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
| Red Hat:enterprise_linux:7::client | php-odbc | before 0:5.4.16-43.el7_4.1 | 0:5.4.16-43.el7_4.1 |
+13
Same product
php: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-4577Argument Injection in PHP-CGIKEV99Now
- CVE-2019-11043Underflow in PHP-FPM can lead to RCEKEV99Now
- CVE-2012-1823sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle…KEV99Now
Published before and after this one in the same product
- ← EarlierCVE-2017-11362Jul 17, 2017 · In PHP 7.x before 7.0.21 and 7.1.x before 7.1.7, ext/intl/msgformat/msgformat_parse.c does not restrict the locale length, which allows…40Plan
- ← EarlierCVE-2017-11628Jul 25, 2017 · In PHP before 5.6.31, 7.x before 7.0.21, and 7.1.x before 7.1.7, a stack-based buffer overflow in the zend_ini_do_op() function in…32Monitor
- Later →CVE-2017-12932Aug 17, 2017 · ext/standard/var_unserializer.re in PHP 7.0.x through 7.0.22 and 7.1.x through 7.1.8 is prone to a heap use after free while unserializing…41Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:gd | 2.2.5-r0 · Alpine:v3.4 | Package registry (OSV) |
| alpine:php7 | 7.1.7-r0 · Alpine:v3.7 | Package registry (OSV) |
| debian:libgd2 | 2.2.5-1 · Debian:12 | Package registry (OSV) |
| opensuse:gd | 2.3.3-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:php | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-bcmath | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-cli | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-common | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-dba | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-debuginfo | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-devel | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-embedded | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-enchant | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-fpm | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-gd | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:php-intl | 0:5.4.16-43.el7_4.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| suse:gd | 2.1.0-24.17.1 · SUSE:Linux Enterprise Desktop 12 SP4 | Package registry (OSV) |
| suse:php5 | 5.5.14-109.5.1 · SUSE:Linux Enterprise Module for Web and Scripting 12 | Package registry (OSV) |
| suse:php53 | 5.3.17-112.5.1 · SUSE:Linux Enterprise Software Development Kit 11 SP4 | Package registry (OSV) |
| suse:php7 | 7.0.7-50.9.2 · SUSE:Linux Enterprise Module for Web and Scripting 12 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- none
- Availability
- none
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- None
- Availability impact
- None
Weakness class (CWE)
CWE-200 · Exposure of Sensitive Information to an Unauthorized ActorCVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
nvd-primary
Root cause
The extension requests broader permissions than its function needs and sends the data it collects out for purposes beyond its stated function.
The bug in code
The whole CWE-200 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
{
"permissions": ["tabs", "<all_urls>"],
"background": { "service_worker": "analytics.js" }
}Fixed
{
"permissions": ["activeTab"],
"host_permissions": ["https://yildiz.example/*"]
}Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- ExcavationCAPEC-116likelihood: High · Medium
- Subverting Environment Variable ValuesCAPEC-13likelihood: High · Very High
- FootprintingCAPEC-169likelihood: High · Very Low
- Exploiting Trust in ClientCAPEC-22likelihood: High · High
- FingerprintingCAPEC-224likelihood: High · Very Low
- ICMP Echo Request PingCAPEC-285likelihood: Medium · Low
- TCP SYN ScanCAPEC-287Low
- Enumerate Mail Exchange (MX) RecordsCAPEC-290Low
ATT&CK techniques
- System Service DiscoveryT1007
- System Network Configuration DiscoveryT1016
- Remote System DiscoveryT1018
- System Owner/User DiscoveryT1033
- Masquerading: Match Legitimate Name or LocationT1036.005
- Network Service ScanningT1046
- System Network Connections DiscoveryT1049
- Process DiscoveryT1057
- Permission Groups DiscoveryT1069
- System Information DiscoveryT1082
- File and Directory DiscoveryT1083
- Account DiscoveryT1087
- Multi-Factor Authentication InterceptionT1111
- Peripheral Device DiscoveryT1120
- System Time DiscoveryT1124
- Access Token Manipulation:Token Impersonation/TheftT1134.001
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (9 more)Show less
- php.net/ChangeLog-7.php
- www.debian.org/security/2017/dsa-3938
- www.securityfocus.com/bid/99492
- access.redhat.com/errata/RHSA-2018:0406
- access.redhat.com/errata/RHSA-2018:1296
- bugs.php.net/bug.php?id=74435
- bugs.php.net/patch-display.php?bug=74435&patch=fix-74435-php-7.0&revision=1497970038
- security.netapp.com/advisory/ntap-20180112-0001/
- www.tenable.com/security/tns-2017-12
Vendor advisories and official records. Exploit/PoC links are deliberately left out.