Summary
Salt contains two related flaws. clean_path() normalized paths before resolving symlinks, allowing a symlink to survive and bypass the directory boundary check. virtualenv.get_distribution_path() guarded its distribution parameter with a keyword blocklist that could be bypassed (CWE-94, code injection).
The attack is network-based, low complexity and requires no user interaction, but the attacker must be an authenticated eauth user permitted to call virtualenv functions. Successful exploitation allows execution of arbitrary Python code as the salt-minion process user, with high impact on confidentiality, integrity and availability (CVSS 8.8).
The vulnerability is not in the CISA KEV catalog; the EPSS exploitation probability is about 0.54%.
Who is affected
Organizations running Salt 3006.0 – 3006.30, 3007.0 – 3007.17 or 3008.0 – 3008.5, especially where eauth users may call virtualenv functions.
What to do
- Upgrade Salt to 3006.31, 3007.18 or 3008.6 (depending on branch), which contain the fix: clean_path() resolves symlinks before the boundary check and distribution is validated against an allowlist of PEP 508 distribution name characters.
- Inventory all Salt masters and minions and compare installed versions against the affected ranges.
- Review eauth configuration and restrict permission to call virtualenv functions to strictly necessary users until patched.
- Check which account the salt-minion process runs as and review logs of virtualenv function calls for suspicious activity.
- Follow the official advisory: https://saltproject.io/blog/advisory-3006-31-3007-18-3008-6
Vendor solution
clean_path() resolves symlinks before checking the boundary, and distribution is validated against an allowlist of PEP 508 distribution name characters. Upgrade to Salt 3006.31, 3007.18, or 3008.6, which contain the fix.
Original text from the vendor's CVE record.
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- Regular user
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
- saltproject.io/blog/advisory-3006-31-3007-18-3008-6 vendor advisory
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.