Skip to content

CVE-2026-11526 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

CriticalCVSS 9.8 EPSS 1.4%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: total
Technology
UbuntuDebianRed Hat

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.

Upgrade path

13 packages: 12 fixed, 1 with no fix yet.

PackageAffectedFixed inStatus
azure linux gd(Azure Linux 3.0) All versions No fix listed No fix yet
alpine/perl-gd(Alpine v3.21) < 2.86-r0 2.86-r0 Fixed
alpine/perl-gd(Alpine v3.22) < 2.86-r0 2.86-r0 Fixed
alpine/perl-gd(Alpine v3.23) < 2.86-r0 2.86-r0 Fixed
alpine/perl-gd(Alpine v3.24) < 2.86-r0 2.86-r0 Fixed
debian/libgd-perl(Debian 12) < 2.76-4+deb12u1; = 2.76-4 2.76-4+deb12u1 Fixed
debian/libgd-perl(Debian 13) < 2.78-1+deb13u1; = 2.78-1 2.78-1+deb13u1 Fixed
debian/libgd-perl(Debian 14) < 2.84-3; = 2.78-1; = 2.83-1; = 2.84-1 +1 more 2.84-3 Fixed
redhat/perl-GD(Red Hat rhel_els 7) < 2.49-3.el7_9.1 2.49-3.el7_9.1 Fixed
RURBAN GD < 2.86 2.86 Fixed
ubuntu/libgd-perl(Ubuntu 22.04) < 2.76-2ubuntu0.1 2.76-2ubuntu0.1 Fixed
ubuntu/libgd-perl(Ubuntu 24.04) < 2.78-1ubuntu0.24.04.1 2.78-1ubuntu0.24.04.1 Fixed
ubuntu/libgd-perl(Ubuntu 26.04) < 2.84-2ubuntu0.1 2.84-2ubuntu0.1 Fixed

Affected products

ProductAffected versionsFixed in
RURBAN GD < 2.86 2.86
redhat/perl-GD(Red Hat:rhel_els:7) < 2.49-3.el7_9.1 2.49-3.el7_9.1
redhat/perl-GD(Red Hat:rhel_els:6) All versions No fix listed
debian/libgd-perl(Debian:12) < 2.76-4+deb12u1 2.76-4+deb12u1
debian/libgd-perl(Debian:12) = 2.76-4 No fix listed
debian/libgd-perl(Debian:13) < 2.78-1+deb13u1 2.78-1+deb13u1
debian/libgd-perl(Debian:13) = 2.78-1 No fix listed
debian/libgd-perl(Debian:14) < 2.84-3 2.84-3
debian/libgd-perl(Debian:14) = 2.78-1 No fix listed
debian/libgd-perl(Debian:14) = 2.83-1 No fix listed
debian/libgd-perl(Debian:14) = 2.84-1 No fix listed
debian/libgd-perl(Debian:14) = 2.84-2 No fix listed
ubuntu/libgd-perl(Ubuntu:22.04) < 2.76-2ubuntu0.1 2.76-2ubuntu0.1
alpine/perl-gd(Alpine:v3.21) < 2.86-r0 2.86-r0
alpine/perl-gd(Alpine:v3.22) < 2.86-r0 2.86-r0
alpine/perl-gd(Alpine:v3.23) < 2.86-r0 2.86-r0
alpine/perl-gd(Alpine:v3.24) < 2.86-r0 2.86-r0
ubuntu/libgd-perl(Ubuntu:24.04) < 2.78-1ubuntu0.24.04.1 2.78-1ubuntu0.24.04.1
ubuntu/libgd-perl(Ubuntu:26.04) < 2.84-2ubuntu0.1 2.84-2ubuntu0.1
azure linux gd(Azure Linux:3.0) All versions No fix listed

References