CVE-2025-32797 Conda-build Insecure Build Script Permissions Enabling Arbitrary Code Execution
Attackers with local access can exploit a race condition in conda-build to overwrite build scripts, enabling arbitrary code execution and privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-32797?
CVE-2025-32797 is a medium-severity vulnerability in conda-build, published on 16 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
Conda-build contains commands and tools to build conda packages. Prior to version 25.3.1, the write_build_scripts function in conda-build creates the temporary build script conda_build.sh with overly permissive file permissions (0o766), allowing write access to all users. Attackers with filesystem access can exploit a race condition to overwrite the script before execution, enabling arbitrary code execution under the victim's privileges. This risk is significant in shared environments, potentially leading to full system compromise. Even with non-static directory names, attackers can monitor parent directories for file creation events. The brief window between script creation (with insecure permissions) and execution allows rapid overwrites. Directory names can also be inferred via timestamps or logs, and automation enables exploitation even with semi-randomized paths by acting within milliseconds of detection. This issue has been patched in version 25.3.1. A workaround involves restricting conda_build.sh permissions from 0o766 to 0o700 (owner-only read/write/execute). Additionally, use atomic file creation (write to a temporary randomized filename and rename atomically) to minimize the race condition window.
Weakness: CWE-277
Which versions are affected by CVE-2025-32797?
It affects 1 product.
Products include Anaconda Conda-Build.
How do I fix CVE-2025-32797?
No fix has been published for CVE-2025-32797 yet. Limit exposure of the affected software until one is available.
Is CVE-2025-32797 being exploited?
There is no known exploitation of CVE-2025-32797 in the wild and no public exploit code.
Other vulnerabilities in conda-build
Sources
Also known as GHSA-vfp6-3v8g-vcmm.