Summary
The wheel.key.gen_keys function on the Salt master accepted a caller-supplied keydir parameter without validating that the resulting path stayed within the master's pki_dir (CWE-22, path traversal). Affected versions are 3006.0 before 3006.31, 3007.0 before 3007.18, and 3008.0 before 3008.6.
Per the CVSS vector (8.1, high), the attack is network-based, low complexity, and requires no user interaction, but does require authentication: the attacker must be an authenticated eauth user permitted to call wheel.key.gen_keys. Such a user can write RSA key files to arbitrary locations writable by the master process.
The impact is high on integrity and availability (overwriting or planting files), with no direct confidentiality impact. The vulnerability is not in the CISA KEV catalog; the EPSS exploitation probability is low (about 0.55%).
Who is affected
Organizations running Salt master versions 3006.x before 3006.31, 3007.x before 3007.18, or 3008.x before 3008.6, especially where eauth users have wheel permissions.
What to do
- Upgrade Salt to 3006.31, 3007.18, or 3008.6 (depending on branch), which validate keydir against pki_dir.
- Check the Salt master version (e.g. salt --version) to determine whether you run an affected branch.
- Review eauth/external_auth configuration and remove wheel.key.gen_keys (and wheel functions generally) permissions from users who do not need them.
- Review master logs and filesystem for unexpected key files outside pki_dir.
- Consult the official advisory: https://saltproject.io/blog/advisory-3006-31-3007-18-3008-6
Vendor solution
keydir is validated against pki_dir. 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:N/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
- None
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
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.