# CVE-2023-34049: Salt security advisory release - 2023-OCT-27

> Attackers with target access can execute arbitrary code via predictable Salt-SSH pre-flight script paths, requiring immediate patching.

- **Severity:** Medium 6.7 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 14 Nov 2024
- **Updated:** 14 Nov 2024
- **Also known as:** GHSA-4277-m35q-7c9w, PYSEC-2026-1892, SUSE-EL-9-CLIENT-TOOLS-2023-4757, SUSE-SU-2023:4386-1, SUSE-SU-2023:4387-1, SUSE-SU-2023:4388-1, SUSE-SU-2023:4389-1, SUSE-SU-2023:4390-1, SUSE-SU-2023:4412-1, SUSE-SU-2023:4748-1, SUSE-SU-2023:4749-1, SUSE-SU-2023:4757-1, UBUNTU-CVE-2023-34049, openSUSE-SU-2024:13630-1

## What is CVE-2023-34049?

CVE-2023-34049 is a medium-severity path traversal vulnerability in SALT, published on 14 Nov 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

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.

## Which versions are affected by CVE-2023-34049?

5 open source packages ship an affected version, including salt.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `salt` | PyPI | All versions | 3005.4, 3006.4 |
| `salt` | PyPI | All versions | 3005.4 |
| `salt` | PyPI | All versions | 3005.4 |
| `salt` | PyPI | From 3006.0rc1 | 3006.4 |
| `salt` | PyPI | From 3006.0rc1 | 3006.4 |
| `saltbundle-swig` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 4.1.1-1.9.1 |
| `saltbundlepy-appdirs` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.4.4-1.6.1 |
| `saltbundlepy-certifi` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 2018.1.18-1.9.1 |
| `saltbundlepy-cffi` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.15.1-1.9.1 |
| `saltbundlepy-dateutil` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 2.8.1-1.3.4 |
| `saltbundlepy-editables` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 0.3-1.3.1 |
| `saltbundlepy-exceptiongroup` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.1.0-1.3.1 |
| `saltbundlepy-exceptiongroup-test` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.1.0-1.3.1 |
| `saltbundlepy-flit-core` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 3.8.0-1.3.1 |
| `saltbundlepy-flit-scm` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.7.0-1.3.1 |
| `saltbundlepy-hatch-vcs` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 0.3.0-1.3.1 |
| `saltbundlepy-hatch-vcs-test` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 0.3.0-1.3.1 |
| `saltbundlepy-hatchling` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.13.0-1.3.1 |
| `saltbundlepy-iniconfig` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 2.0.0-1.3.1 |
| `saltbundlepy-iniconfig-test` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 2.0.0-1.3.1 |
| `saltbundlepy-lxml` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 4.9.3-1.12.1 |
| `saltbundlepy-more-itertools` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 8.10.0-1.6.1 |
| `saltbundlepy-packaging` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 23.1-1.6.1 |
| `saltbundlepy-pathspec` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 0.11.1-1.3.1 |
| `saltbundlepy-pip` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 20.2.4-1.6.1 |
| `saltbundlepy-pluggy` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.0.0-1.6.4 |
| `saltbundlepy-pluggy-test` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.0.0-1.6.1 |
| `saltbundlepy-py` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.10.0-1.9.4 |
| `saltbundlepy-pytest` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 7.3.2-1.6.1 |
| `saltbundlepy-setuptools-scm` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 7.1.0-1.6.1 |
| `saltbundlepy-tomli` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 1.2.3-1.3.1 |
| `saltbundlepy-typing-extensions` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 4.5.0-1.3.1 |
| `saltbundlepy-typing-extensions-test` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 4.5.0-1.3.1 |
| `saltbundlepy-wheel` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 0.40.0-1.3.1 |
| `saltbundlepy-wheel-test` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 0.40.0-1.3.1 |
| `venv-salt-minion` | SUSE:EL-9:Update:Products:SaltBundle:Update | All versions | 3006.0-1.30.3 |
| `python-simplejson` | SUSE:Enterprise Storage 7.1 | All versions | 3.17.2-150300.3.4.1 |
| `salt` | SUSE:Enterprise Storage 7.1 | All versions | 3006.0-150300.53.65.2 |
| `salt` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 3006.0-150100.112.1 |
| `salt` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 3006.0-150200.113.1 |

## How do I fix CVE-2023-34049?

Upgrade salt to a fixed version for your release line: 3005.4 or 3006.4.

## Is CVE-2023-34049 being exploited?

There is no known exploitation of CVE-2023-34049 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-34049 and fix it if it is affected.

What it is: CVE-2023-34049 is a medium-severity path traversal vulnerability in SALT, published on 14 Nov 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-34049 in the wild and no public exploit code.

Affected packages and fixed versions:
- salt (PyPI): affected all versions; fixed in 3005.4, 3006.4
- salt (PyPI): affected all versions; fixed in 3005.4
- salt (PyPI): affected all versions; fixed in 3005.4
- salt (PyPI): affected from 3006.0rc1; fixed in 3006.4
- salt (PyPI): affected from 3006.0rc1; fixed in 3006.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-34049/ (Markdown: https://insights.sbomify.com/CVE-2023-34049/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-34049
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-34049
- OSV: https://osv.dev/vulnerability/CVE-2023-34049

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-34049/
Summaries are generated and may contain mistakes; the official description above is the record.
