CVE-2025-32797

7.0 HIGH

📋 TL;DR

CVE-2025-32797 is a local privilege escalation vulnerability in conda-build where the temporary build script conda_build.sh is created with overly permissive file permissions (0o766). Attackers with filesystem access can exploit a race condition to overwrite this script before execution, enabling arbitrary code execution under the victim's privileges. This primarily affects users in shared environments like multi-user systems, CI/CD pipelines, or containerized builds.

💻 Affected Systems

Products:
  • conda-build
Versions: All versions prior to 25.3.1
Operating Systems: Linux, Unix-like systems, macOS, Windows (with appropriate filesystem)
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in default configuration when using conda-build to create packages. Requires filesystem access to exploit.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise through arbitrary code execution with the victim's privileges, potentially leading to lateral movement, data exfiltration, or complete host takeover.

🟠

Likely Case

Local privilege escalation in shared environments where attackers can monitor filesystem events, leading to unauthorized code execution during package builds.

🟢

If Mitigated

Limited to authenticated users with filesystem access; proper permissions and isolation reduce impact to individual user contexts.

🌐 Internet-Facing: LOW - This requires local filesystem access and cannot be exploited remotely without existing access.
🏢 Internal Only: HIGH - In shared internal environments (development servers, CI/CD systems, multi-user workstations), this poses significant risk of privilege escalation.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires filesystem access and precise timing (race condition). Attackers need to monitor directory events and overwrite the script within milliseconds of creation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 25.3.1

Vendor Advisory: https://github.com/conda/conda-build/security/advisories/GHSA-vfp6-3v8g-vcmm

Restart Required: No

Instructions:

1. Update conda-build using: conda update conda-build
2. Verify version: conda-build --version
3. Ensure version is 25.3.1 or higher

🔧 Temporary Workarounds

Restrict script permissions

linux

Manually change conda_build.sh permissions from 0o766 to 0o700 (owner-only access) before execution

chmod 700 conda_build.sh

Use atomic file operations

all

Implement atomic file creation by writing to temporary randomized filenames and renaming atomically

🧯 If You Can't Patch

  • Isolate conda-build processes to dedicated, non-shared directories with strict permissions
  • Implement filesystem monitoring to detect unauthorized modifications to conda_build.sh scripts

🔍 How to Verify

Check if Vulnerable:

Check conda-build version: conda-build --version. If version is less than 25.3.1, system is vulnerable.

Check Version:

conda-build --version

Verify Fix Applied:

Verify conda-build version is 25.3.1 or higher and test that conda_build.sh files are created with secure permissions (0o700).

📡 Detection & Monitoring

Log Indicators:

  • Unexpected modifications to conda_build.sh files
  • Multiple rapid file creation/deletion events in build directories
  • Suspicious process execution from conda build contexts

Network Indicators:

  • None - this is a local filesystem vulnerability

SIEM Query:

File modification events where target_path LIKE '%conda_build.sh' AND permissions_changed_to != '0700'

🔗 References

📤 Share & Export