CVE-2026-11526GD versions before 2.86 for Perl allow OS command injection and file overwrite via a…
GD versions before 2.86 for Perl allow OS command injection and file overwrite via a 2-arg open() of filename arguments in _make_filehandle. GD::Image::_make_filehandle opens a filename argument with Perl's 2-arg open(), so a filename that begins or ends with a pipe ("| cmd", "cmd |") or begins with a redirect ("> path", ">> path") is run as a command or redirect rather than opened as a file. _make_filehandle is the single open path behind every filename-accepting constructor (new, newFromPng, newFromJpeg, and the rest); the in-memory *Data variants do not open a path and are unaffected. Any caller that forwards untrusted input to one of these constructors as a pathname can run an arbitrary command or truncate a file under the process UID.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | libgd-perl | Fixed | 2.84-2ubuntu0.1 | UBUNTU-CVE-2026-11526 |
| Ubuntu 25.10 | libgd-perl | Fixed | 2.78-1ubuntu0.25.10.1 | UBUNTU-CVE-2026-11526 |
| Ubuntu 24.04 | libgd-perl | Fixed | 2.78-1ubuntu0.24.04.1 | UBUNTU-CVE-2026-11526 |
| Ubuntu 22.04 | libgd-perl | Fixed | 2.76-2ubuntu0.1 | UBUNTU-CVE-2026-11526 |
| Ubuntu 20.04 | libgd-perl | Fix pending | UBUNTU-CVE-2026-11526 | |
| Ubuntu 18.04 | libgd-perl | Fix pending | UBUNTU-CVE-2026-11526 | |
| Ubuntu 16.04 | libgd-perl | Fix pending | UBUNTU-CVE-2026-11526 | |
| Debian 14 | libgd-perl | Fixed | 2.84-3 | DEBIAN-CVE-2026-11526 |
| Debian 13 | libgd-perl | Fixed | 2.78-1+deb13u1 | DEBIAN-CVE-2026-11526 |
| Debian 12 | libgd-perl | Fixed | 2.76-4+deb12u1 | DEBIAN-CVE-2026-11526 |
| Red Hat Enterprise Linux 6 | perl-GD | Will not fix Out of support scope | ||
| Alpine Linux 3.24 | perl-gd | Fixed | 2.86-r0 | ALPINE-CVE-2026-11526 |
| Alpine Linux 3.23 | perl-gd | Fixed | 2.86-r0 | ALPINE-CVE-2026-11526 |
| Alpine Linux 3.22 | perl-gd | Fixed | 2.86-r0 | ALPINE-CVE-2026-11526 |
| Alpine Linux 3.21 | perl-gd | Fixed | 2.86-r0 | ALPINE-CVE-2026-11526 |
What the vendor says
As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- RURBAN GD: affected: before 2.86; fixed in
2.86
Solution: Upgrade to GD 2.86 or later, which opens filename arguments with a 3-arg read open so the filename is never interpreted as a command or redirect.
Workaround: For deployments that cannot upgrade to 2.86, do not pass untrusted input as a pathname to GD::Image constructors. Callers can open the file themselves and pass the resulting filehandle, which bypasses the affected string path.
Vendor advisories:
- https://github.com/lstein/Perl-GD/commit/67b163713c6c78dfeb693da0978ae934e5cd8210.patch (patch)
- https://metacpan.org/release/RURBAN/GD-2.86/changes (release-notes)
References
- https://github.com/lstein/Perl-GD/commit/67b163713c6c78dfeb693da0978ae934e5cd8210.patch
- https://metacpan.org/release/RURBAN/GD-2.86/changes
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.