Uninitialized read in gdImageCreateFromXbm
When using the gdImageCreateFromXbm() function in the GD Graphics Library (aka LibGD) 2.2.5, as used in the PHP GD extension in PHP versions 7.1.x below 7.1.30, 7.2.x below 7.2.19 and 7.3.x below 7.3.6, it is possible to supply data that will cause the function to use the value of uninitialized variable. This may lead to disclosing contents of the stack that has been left there by previous code.
- Published
- Jun 18, 2019
- Updated
- Jun 16, 2026
- EPSS
- 4.3% · 91th percentile
- CWE
- CWE-457
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
22
Monitor
Low priority for now.
- CVSS
- 21 / 40 · 5.3 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 4.3%
CNA vs NVD score
- NVD
- 5.3
- CNA · php
- 3.1
- 2.2 point gap
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| libgd | libgd | cpe:2.3:a:libgd:libgd |
| php | php | cpe:2.3:a:php:php |
| canonical | ubuntu linux | cpe:2.3:o:canonical:ubuntu_linux |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| suse | linux enterprise debuginfo | cpe:2.3:a:suse:linux_enterprise_debuginfo |
| opensuse | leap | cpe:2.3:o:opensuse:leap |
| suse | linux enterprise desktop | cpe:2.3:o:suse:linux_enterprise_desktop |
| suse | linux enterprise server | cpe:2.3:o:suse:linux_enterprise_server |
| suse | linux enterprise software development kit | cpe:2.3:o:suse:linux_enterprise_software_development_kit |
| suse | linux enterprise workstation extension | cpe:2.3:o:suse:linux_enterprise_workstation_extension |
| redhat | software collections | cpe:2.3:a:redhat:software_collections |
and 1 more
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- php php7.1.0 and later · before 7.1.30
- php php7.2.0 and later · before 7.2.19
- php php7.3.0 and later · before 7.3.6
Versions reported by the vendor
Affected version ranges reported by the assigning authority (php). Independent of NVD's CPE analysis and usually ahead of it.
PHP Group PHP
- 7.1.x < 7.1.30, 7.2.x < 7.2.19, 7.3.x < 7.3.6affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.10 | gd | before 2.2.5-r3 | 2.2.5-r3 |
| Alpine:v3.12 | gd | before 2.3.0-r0 | 2.3.0-r0 |
| Debian:12 | libgd2 | before 2.2.5-5.2 | 2.2.5-5.2 |
| Debian:8 | libgd2 | before 2.1.0-5+deb8u13 | 2.1.0-5+deb8u13 |
| Debian:9 | php7.0 | before 7.0.33-0+deb9u5 | 7.0.33-0+deb9u5 |
| openSUSE:Leap 15.1 | gd | before 2.2.5-lp151.6.6.1 | 2.2.5-lp151.6.6.1 |
| openSUSE:Tumbleweed | gd | before 2.3.3-1.1 | 2.3.3-1.1 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-bcmath | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-cli | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-common | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-dba | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-dbg | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-debuginfo | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-devel | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-embedded | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-enchant | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-fpm | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-gd | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-gmp | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-intl | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-json | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-ldap | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php72-php-mbstring | before 0:7.2.24-1.el7 | 0:7.2.24-1.el7 |
+17
Same product
libgd: all recordsOther highest-scoring records for the same primary product.
- CVE-2019-6977gdImageColorMatch in gd_color_match.c in the GD Graphics Library (aka LibGD) 2.2.5, as used in the imagecolormatch function in PHP before 5.56Plan
- CVE-2016-3074Integer signedness error in GD Graphics Library 2.1.1 (aka libgd or libgd2) allows remote attackers to cause a denial of service (crash) or 50Plan
- CVE-2016-10166Integer underflow in the _gdContributionsAlloc function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.4 allows rem42Plan
- CVE-2016-7568Integer overflow in the gdImageWebpCtx function in gd_webp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP through 7.41Plan
- CVE-2019-6978The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd_jpeg.c, and gd_wbmp.c.40Plan
- CVE-2016-6912Double free vulnerability in the gdImageWebPtr function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to have 40Plan
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-r3 · Alpine:v3.10 | Package registry (OSV) |
| debian:libgd2 | 2.2.5-5.2 · Debian:12 | Package registry (OSV) |
| debian:php7.0 | 7.0.33-0+deb9u5 · Debian:9 | Package registry (OSV) |
| opensuse:gd | 2.2.5-lp151.6.6.1 · openSUSE:Leap 15.1 | Package registry (OSV) |
| red hat:rh-php72-php | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-bcmath | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-cli | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-common | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-dba | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-dbg | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-debuginfo | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-devel | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-embedded | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-enchant | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-fpm | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php72-php-gd | 0:7.2.24-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| suse:gd | 2.2.5-4.14.1 · SUSE:Linux Enterprise Module for Basesystem 15 SP1 | Package registry (OSV) |
| suse:php53 | 5.3.17-112.71.1 · SUSE:Linux Enterprise Point of Sale 11 SP3 | Package registry (OSV) |
| suse:php7 | 7.0.7-50.85.1 · 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.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- By chamal dot desilvagmail dot com
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- low · data can be read
- Integrity
- none
- Availability
- none
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- Low
- Integrity impact
- None
- Availability impact
- None
Weakness class (CWE)
CWE-457 · Use of Uninitialized VariableCVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- lists.opensuse.org/opensuse-security-announce/2020-03/msg00020.html
- access.redhat.com/errata/RHSA-2019:2519
- access.redhat.com/errata/RHSA-2019:3299
- bugs.debian.org/cgi-bin/bugreport.cgi?bug=929821
- bugs.php.net/bug.php?id=77973
- lists.debian.org/debian-lts-announce/2019/06/msg00003.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PKSSWFR2WPMUOIB5EN5ZM252NNEPYUTG/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WAZBVK6XNYEIN7RDQXESSD63QHXPLKWL/
- seclists.org/bugtraq/2019/Sep/38
- usn.ubuntu.com/4316-1/
- usn.ubuntu.com/4316-2/
- www.debian.org/security/2019/dsa-4529
Vendor advisories and official records. Exploit/PoC links are deliberately left out.