Skip to content
OpenAdvisories
Critical · 9.8 CVE-2026-11526 EUVD-2026-36659GHSA-hx22-9fx3-xg77

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

Published Jun 14, 2026 · Updated Jun 21, 2026 · Assigned by CPANSec

Description

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.

Affected products

VendorProductAffectedFixed
RURBAN GD < 2.86 2.86

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libgd-perl 2.84-3 —
Debian 13 libgd-perl 2.78-1+deb13u1 —
Debian 12 libgd-perl 2.76-4+deb12u1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS libgd-perl 2.84-2ubuntu0.1 USN-8484-1
Ubuntu 25.10 libgd-perl 2.78-1ubuntu0.25.10.1 USN-8484-1
Ubuntu 24.04 LTS libgd-perl 2.78-1ubuntu0.24.04.1 USN-8484-1
Ubuntu 22.04 LTS libgd-perl 2.76-2ubuntu0.1 USN-8484-1
Ubuntu 20.04 LTS libgd-perl No fix yet —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS libgd-perl No fix yet —
Ubuntu 16.04 LTS libgd-perl No fix yet —
ReleasePackageFixed inAdvisory
RHEL 7 ELS perl-GD 2.49-3.el7_9.1 RHSA-2026:49758
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed perl-GD 2.860.0-1.1 openSUSE-SU-2026:11017-1
ReleasePackageFixed inAdvisory
Alpine v3.24 perl-gd 2.86-r0 —
Alpine v3.23 perl-gd 2.86-r0 —
Alpine v3.22 perl-gd 2.86-r0 —
Alpine v3.21 perl-gd 2.86-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 perl-GD 2.80-1.amzn2023.0.3 ALAS2023-2026-1890
Amazon Linux 2 perl-GD 2.49-3.amzn2.0.3 ALAS2-2026-3387

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 perl-GD 2.49-3.0.1.el7 ELSA-2026-49758

Advisories 7

References