CVEfocus › CVE database › CVE-2026-11526

CVE-2026-11526GD versions before 2.86 for Perl allow OS command injection and file overwrite via a…

CVSS 9.8 CriticalEPSS 2.6% (higher than 86% of CVEs)Published 2026-06-14Updated 2026-06-21Assigner: CPANSec

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.

CWE-73CWE-78

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

11Fixed
3Fix pending
1Will not fix

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04libgd-perlFixed2.84-2ubuntu0.1UBUNTU-CVE-2026-11526
Ubuntu 25.10libgd-perlFixed2.78-1ubuntu0.25.10.1UBUNTU-CVE-2026-11526
Ubuntu 24.04libgd-perlFixed2.78-1ubuntu0.24.04.1UBUNTU-CVE-2026-11526
Ubuntu 22.04libgd-perlFixed2.76-2ubuntu0.1UBUNTU-CVE-2026-11526
Ubuntu 20.04libgd-perlFix pendingUBUNTU-CVE-2026-11526
Ubuntu 18.04libgd-perlFix pendingUBUNTU-CVE-2026-11526
Ubuntu 16.04libgd-perlFix pendingUBUNTU-CVE-2026-11526
Debian 14libgd-perlFixed2.84-3DEBIAN-CVE-2026-11526
Debian 13libgd-perlFixed2.78-1+deb13u1DEBIAN-CVE-2026-11526
Debian 12libgd-perlFixed2.76-4+deb12u1DEBIAN-CVE-2026-11526
Red Hat Enterprise Linux 6perl-GDWill not fix
Out of support scope
Alpine Linux 3.24perl-gdFixed2.86-r0ALPINE-CVE-2026-11526
Alpine Linux 3.23perl-gdFixed2.86-r0ALPINE-CVE-2026-11526
Alpine Linux 3.22perl-gdFixed2.86-r0ALPINE-CVE-2026-11526
Alpine Linux 3.21perl-gdFixed2.86-r0ALPINE-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.

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:

References

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.