Skip to main content
Mallory
Critical

OS Command Injection in Perl GD _make_filehandle

IdentifiersCVE-2026-11526CWE-78· Improper Neutralization of Special…

CVE-2026-11526 affects the Perl GD distribution in versions before 2.86. The vulnerability is in GD::Image::_make_filehandle, which uses Perl's unsafe 2-argument open() on filename arguments. In Perl, 2-arg open() can interpret specially crafted strings as shell commands or redirections rather than literal file paths. As a result, a filename beginning with a pipe (for example, "| cmd"), ending with a pipe ("cmd |"), or beginning with a redirection operator (such as "> path" or ">> path") may be executed or treated as an output redirection. _make_filehandle is the common file-opening path used by filename-accepting GD constructors, including new, newFromPng, and newFromJpeg. Applications that pass untrusted pathname input into these constructors are therefore exposed to command injection and file overwrite/truncation. In-memory *Data variants are not affected because they do not open filesystem paths.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can lead to arbitrary OS command execution in the security context of the process using the vulnerable GD module. It can also cause file truncation or overwrite via redirection semantics, allowing destruction or corruption of files writable by the process UID. The practical impact depends on how the application accepts and forwards attacker-controlled path input, but may include full compromise of the application account, data loss, and follow-on abuse of the host environment.

Mitigation

If you can’t patch tonight, do this now.

Until a fixed version can be deployed, do not pass untrusted user-controlled strings as pathname arguments to filename-accepting GD constructors such as new, newFromPng, and newFromJpeg. Prefer opening files explicitly in the application and passing filehandles instead of path strings. Where possible, use the in-memory *Data variants, which are not affected. Additionally, strictly validate and constrain any path input to known-safe filenames or directories.

Remediation

Patch, then assume compromise.

Upgrade Perl GD to version 2.86 or later. The fix replaces the unsafe 2-argument open() behavior with a safer 3-argument read open so filename arguments are treated as literal paths rather than commands or redirects. Where distribution packages are used, install the vendor-fixed package version; for example, Debian fixed the issue in libgd-perl 2.78-1+deb13u1 for trixie.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
DebianLibgd-Perlapplication
LibgdGdapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

ACTIVITY FEED

Recent activity

8 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.

No news coverage yet. Advisories and community discussion only.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity7

Community discussion across Reddit, Mastodon, and other social sources.