Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-58278 Overview
CVE-2024-58278 affects Indigo Star perl2exe versions through V30.10C. The vulnerability allows local authenticated attackers to execute arbitrary code through manipulation of the argv[0] argument passed to packed executables. By controlling the 0th argument, attackers can redirect execution to another binary, bypassing intended restrictions on the packed Perl script.
The flaw is tracked under [CWE-78] (OS Command Injection) and originates from how perl2exe-packed binaries resolve and invoke the underlying Perl interpreter at runtime. Public exploit details are available through Exploit-DB and VulnCheck.
Critical Impact
Local authenticated users can bypass perl2exe-enforced restrictions and execute arbitrary binaries in the context of the packed executable.
Affected Products
- Indigo Star perl2exe V30.10C and earlier
- perl2exe Linux x64 distribution (p2x-30.10)
- perl2exe packaged Perl scripts running on affected runtimes
Discovery Timeline
- 2025-12-04 - CVE-2024-58278 published to NVD
- 2026-09-26 - Last updated in NVD database
Technical Details for CVE-2024-58278
Vulnerability Analysis
perl2exe packages Perl scripts into standalone executables that embed and invoke a Perl interpreter at runtime. The vulnerability stems from the loader honoring the first command-line argument (argv[0]) when deciding which binary to execute. An attacker invoking the packed executable through execve() can supply an arbitrary string for argv[0], causing the loader to resolve and launch an attacker-controlled binary instead of the intended Perl runtime path.
This behavior defeats scenarios where perl2exe binaries are used as a trust boundary, such as restricted shells, SUID helpers, or administrative wrappers. The resulting process runs with the privileges and context of the invoking user, which can include elevated privileges when the packed binary carries SUID or sudo entitlements.
Root Cause
The loader embedded in perl2exe-packed executables derives execution paths from argv[0] rather than from a trusted, immutable source such as /proc/self/exe or a hardcoded interpreter path. Combined with insufficient validation of the resolved target, this permits command injection semantics covered by [CWE-78].
Attack Vector
Exploitation requires local access and valid authentication on the host. An attacker invokes the packed executable via execve() or a wrapper that permits arbitrary argv[0], pointing it at an attacker-controlled binary. The perl2exe loader then executes that binary with the privileges associated with the packed executable's invocation context. See the VulnCheck Advisory for Indigo Star and Exploit-DB #51825 for technical details and a public proof of concept.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2024-58278
Indicators of Compromise
- Process execution events where a perl2exe-packed binary launches a child process whose path does not match the expected Perl interpreter.
- execve() audit records showing a packed executable invoked with an argv[0] value that diverges from the actual binary path.
- Unexpected spawning of shells (/bin/sh, /bin/bash) or interpreters as descendants of perl2exe-packed binaries.
Detection Strategies
- Enable Linux auditd rules on execve syscalls to capture argv[0] versus the resolved executable path for divergence analysis.
- Baseline the expected child-process tree of each perl2exe-packed binary deployed in the environment and alert on deviations.
- Hunt for SUID or sudo-permitted perl2exe binaries, which represent the highest-value abuse paths for this flaw.
Monitoring Recommendations
- Forward process-execution telemetry, including full command line and argv[0], to a centralized analytics platform for correlation.
- Monitor for new or modified perl2exe-packed binaries written to privileged directories such as /usr/local/bin or /opt.
- Track authentication events preceding anomalous perl2exe execution to identify the compromised local account.
How to Mitigate CVE-2024-58278
Immediate Actions Required
- Inventory all perl2exe-packed executables and identify any with SUID, SGID, or sudo privileges that could amplify the impact.
- Remove elevated privilege bits from perl2exe-packed binaries wherever operationally feasible.
- Restrict execution of affected binaries to trusted users through filesystem permissions until a fixed release is available.
Patch Information
No vendor patch is listed in the NVD entry at the time of publication. Monitor the Indigo Star Homepage for an updated perl2exe release beyond V30.10C and consult the VulnCheck Advisory for Indigo Star for vendor coordination status.
Workarounds
- Repackage critical Perl tooling with an alternative packer or distribute scripts directly with a controlled Perl interpreter path.
- Wrap perl2exe binaries in a shell stub that enforces a known, immutable argv[0] before invocation.
- Apply mandatory access control profiles (SELinux, AppArmor) that constrain packed executables to spawning only the intended Perl runtime.
# Example auditd rule to capture execve calls for a packed binary
-a always,exit -F arch=b64 -S execve -F path=/usr/local/bin/mytool.p2x -k perl2exe_exec
# Remove SUID bit from packed executables to reduce blast radius
find / -perm -4000 -name '*.p2x' -exec chmod u-s {} \;
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

