CVE-2023-34049
Medium · 6.7CVSS
6.7
EPSS
0.2%
Published
Nov 14, 2024
CISA due date
—
Cloudanix analysis
A management tool used to control many computers at once could be tricked by someone who already has access to one of those computers into running their own commands instead of the intended ones.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- High
- Impact
- Full Compromise
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
The Salt-SSH pre-flight option copies its script to a predictable path on the target, enabling an attacker with local access and path knowledge to substitute a malicious script that executes with the privileges of the Salt-SSH user; the flaw stems from improper input validation of the copy destination combined with missing verification of scp return codes.
Why it matters to the business
Attackers who already have a foothold on managed systems can hijack Salt-SSH operations to run arbitrary code, potentially leading to full compromise of infrastructure managed by Salt and disruption of configuration and orchestration workflows.
How an attack unfolds
An attacker with access to the target VM predicts the pre-flight script path, places a malicious script at that location before Salt-SSH runs, and relies on the lack of path randomization and scp error checking so that Salt-SSH executes the attacker's script with the privileges of the invoking user.
How to fix it
Upgrade to a Salt release that uses an unpredictable path for pre-flight script copies and verifies scp return codes; if no fixed version is available, disable the pre-flight option or restrict Salt-SSH usage to trusted targets only.
How to confirm the fix worked
Review Salt-SSH source for randomized temporary paths and explicit scp return-code checks; test by attempting to place a file at the former predictable location and confirming Salt-SSH refuses or fails the operation.
Typical attack path
- Obtain local access to the target VM
- Determine or guess the predictable pre-flight script path used by Salt-SSH
- Write a malicious script to that exact path
- Trigger or wait for a Salt-SSH pre-flight operation
- Observe execution of the malicious script under the Salt-SSH user's context
How to detect it
Search Salt master and minion logs for scp commands involving pre-flight scripts, unexpected file creations in predictable temporary paths, or executions of scripts whose content does not match known Salt-SSH pre-flight payloads.
What your security team should do
- Prioritize patching Salt to the first release containing unpredictable pre-flight paths and scp validation
- Audit Salt-SSH usage and restrict pre-flight to environments where targets are fully trusted
- Monitor for unexpected files appearing in temporary directories used by Salt-SSH
- Review logs for scp operations that complete without error checking
The record
The Salt-SSH pre-flight option copies the script to the target at a predictable path, which allows an attacker to force Salt-SSH to run their script. If an attacker has access to the target VM and knows the path to the pre-flight script before it runs they can ensure Salt-SSH runs their script with the privileges of the user running Salt-SSH. Do not make the copy path on the target predictable and ensure we check return codes of the scp command if the copy fails.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | salt | 0 | 3005.4 |
| PyPI | salt | 3006.0rc1 | 3006.4 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundle-swig | 0 | 4.1.1-1.9.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-appdirs | 0 | 1.4.4-1.6.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-certifi | 0 | 2018.1.18-1.9.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-cffi | 0 | 1.15.1-1.9.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-dateutil | 0 | 2.8.1-1.3.4 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-editables | 0 | 0.3-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-exceptiongroup | 0 | 1.1.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-exceptiongroup-test | 0 | 1.1.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-flit-core | 0 | 3.8.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-flit-scm | 0 | 1.7.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-hatch-vcs | 0 | 0.3.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-hatch-vcs-test | 0 | 0.3.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-hatchling | 0 | 1.13.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-iniconfig | 0 | 2.0.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-iniconfig-test | 0 | 2.0.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-lxml | 0 | 4.9.3-1.12.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-more-itertools | 0 | 8.10.0-1.6.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-packaging | 0 | 23.1-1.6.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-pathspec | 0 | 0.11.1-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-pip | 0 | 20.2.4-1.6.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-pluggy | 0 | 1.0.0-1.6.4 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-pluggy-test | 0 | 1.0.0-1.6.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-py | 0 | 1.10.0-1.9.4 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-pytest | 0 | 7.3.2-1.6.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-setuptools-scm | 0 | 7.1.0-1.6.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-tomli | 0 | 1.2.3-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-typing-extensions | 0 | 4.5.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-typing-extensions-test | 0 | 4.5.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-wheel | 0 | 0.40.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | saltbundlepy-wheel-test | 0 | 0.40.0-1.3.1 |
| SUSE:EL-9:Update:Products:SaltBundle:Update | venv-salt-minion | 0 | 3006.0-1.30.3 |
| SUSE:Enterprise Storage 7.1 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Enterprise Storage 7.1 | salt | 0 | 3006.0-150300.53.65.2 |
| SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | salt | 0 | 3006.0-150100.112.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | salt | 0 | 3006.0-150200.113.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | salt | 0 | 3006.0-150300.53.65.2 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | salt | 0 | 3006.0-150300.53.65.2 |
| SUSE:Linux Enterprise Micro 5.1 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Micro 5.1 | salt | 0 | 3006.0-150300.53.65.2 |
| SUSE:Linux Enterprise Micro 5.2 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Micro 5.2 | salt | 0 | 3006.0-150300.53.65.2 |
| SUSE:Linux Enterprise Micro 5.3 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Micro 5.3 | salt | 0 | 3006.0-150400.8.49.2 |
| SUSE:Linux Enterprise Micro 5.4 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Micro 5.4 | salt | 0 | 3006.0-150400.8.49.2 |
| SUSE:Linux Enterprise Micro 5.5 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Micro 5.5 | salt | 0 | 3006.0-150500.4.24.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | salt | 0 | 3006.0-150400.8.49.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | salt | 0 | 3006.0-150500.4.24.2 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP4 | salt | 0 | 3006.0-150400.8.49.2 |
| SUSE:Linux Enterprise Module for Server Applications 15 SP5 | salt | 0 | 3006.0-150500.4.24.2 |
| SUSE:Linux Enterprise Module for Transactional Server 15 SP4 | salt | 0 | 3006.0-150400.8.49.2 |
| SUSE:Linux Enterprise Module for Transactional Server 15 SP5 | salt | 0 | 3006.0-150500.4.24.2 |
| SUSE:Linux Enterprise Server 15 SP1-LTSS | salt | 0 | 3006.0-150100.112.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | salt | 0 | 3006.0-150200.113.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | salt | 0 | 3006.0-150300.53.65.2 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | salt | 0 | 3006.0-150100.112.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | salt | 0 | 3006.0-150200.113.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | salt | 0 | 3006.0-150300.53.65.2 |
| SUSE:Manager Client Tools 12 | venv-salt-minion | 0 | 3006.0-3.46.2 |
| SUSE:Manager Client Tools 15 | venv-salt-minion | 0 | 3006.0-150000.3.48.2 |
| SUSE:Manager Client Tools for RHEL, Liberty and Clones 9-CLIENT-TOOLS | venv-salt-minion | 0 | 3006.0-1.30.3 |
| SUSE:Manager Client Tools for SLE Micro 5 | venv-salt-minion | 0 | 3006.0-150000.3.48.2 |
| SUSE:Manager Proxy 4.3 | release-notes-susemanager-proxy | 0 | 4.3.9-150400.3.69.1 |
| SUSE:Manager Proxy Module 4.3 | venv-salt-minion | 0 | 3006.0-150000.3.48.2 |
| SUSE:Manager Server 4.3 | release-notes-susemanager | 0 | 4.3.9-150400.3.90.1 |
| SUSE:Manager Server Module 4.3 | venv-salt-minion | 0 | 3006.0-150000.3.48.2 |
| SUSE:Manager Tools 12 | venv-salt-minion | 0 | 3006.0-3.46.2 |
| SUSE:Manager Tools 15 | venv-salt-minion | 0 | 3006.0-150000.3.48.2 |
| SUSE:Manager Tools for SLE Micro 5 | venv-salt-minion | 0 | 3006.0-150000.3.48.2 |
| Ubuntu:22.04:LTS | salt | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | salt | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | salt | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | salt | 0 | No fix |
| openSUSE:Leap 15.4 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| openSUSE:Leap 15.4 | salt | 0 | 3006.0-150400.8.49.2 |
| openSUSE:Leap 15.5 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| openSUSE:Leap 15.5 | salt | 0 | 3006.0-150500.4.24.2 |
| openSUSE:Leap Micro 5.3 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| openSUSE:Leap Micro 5.3 | salt | 0 | 3006.0-150400.8.49.2 |
| openSUSE:Leap Micro 5.4 | python-simplejson | 0 | 3.17.2-150300.3.4.1 |
| openSUSE:Leap Micro 5.4 | salt | 0 | 3006.0-150400.8.49.2 |
| pypi | salt | 3006.0rc1 | No fix |
Related vulnerabilities
- GHSA-77w2-v593-vxvv Salt junos Module Vulnerable to Code Injection via Specially Crafted YAML Payload Also affects salt
- GHSA-vcf3-26xf-fw4m Salt Authentication Protocol Version Downgrade Allows Minion Impersonation Also affects salt
- CVE-2025-62349 Salt contains an authentication protocol version downgrade weakness that can allow a… Also affects salt
- CVE-2025-62348 Salt's junos execution module contained an unsafe YAML decode/load usage. Also affects salt
- CVE-2024-22232 A specially crafted url can be created which leads to a directory traversal in the salt… Also affects salt
- CVE-2024-22231 Syndic cache directory creation is vulnerable to a directory traversal attack in salt… Also affects salt
- CVE-2014-3563 Multiple unspecified vulnerabilities in Salt (aka SaltStack) before 2014.1.10 allow local… Also affects salt
- CVE-2024-0397 A defect was discovered in the Python “ssl” module where there is a memory race condition… Also affects venv-salt-minion