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.
- 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
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 | 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 |
Linux distribution packages (35)
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.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2023-34049 being exploited?
There is no known exploitation of CVE-2023-34049 in the wild and no public exploit code.
Sources
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 and 8 more.