CVE-2024-38824 salt advisory
Description
Directory traversal vulnerability in recv_file method allows arbitrary files to be written to the master cache directory.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Directory traversal flaw in Salt's recv_file method allows an authenticated minion to write arbitrary files into the master cache directory, potentially leading to remote code execution.
Vulnerability
Overview
CVE-2024-38824 is a directory traversal vulnerability found in the recv_file method of Salt, an open-source automation and configuration management platform [1]. The flaw allows an attacker to write arbitrary files to the master's cache directory by bypassing path restrictions, enabling the placement of malicious content outside the intended cache boundaries [3][4].
Exploitation
Context
Exploitation requires an authenticated minion (privilege level: Low, as per CVSS v3.1), but no user interaction is needed [3][4]. The attacker can leverage standard Salt communication channels to send a crafted file request containing path traversal sequences (e.g., ../). The vulnerable recv_file method fails to properly sanitize or validate the file path, allowing the attacker to write files to arbitrary locations within the master's cache directory [3][4].
Impact
A successful attack can result in high impact to both confidentiality and integrity (CVSS v3.1 Base Score 9.6, AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N) [3][4]. By writing files with controlled content to the master cache, an attacker may achieve remote code execution on the Salt master, pivot to other systems managed by Salt, or disrupt the infrastructure. The attack scope is changed (S:C), meaning the compromised resource impacts assets beyond the original vulnerable component.
Mitigation
The vulnerability is addressed in Salt versions 3006.12 and 3007.4 [3][4]. Users are strongly advised to upgrade to these or newer releases. No workarounds are documented; upgrading is the only reliable mitigation.
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
saltPyPI | >= 3007.0rc1, < 3007.4 | 3007.4 |
saltPyPI | >= 3006.0rc1, < 3006.12 | 3006.12 |
Affected products
49- ghsa-coords48 versionspkg:pypi/saltpkg:rpm/opensuse/salt&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/salt&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/salt-test&distro=openSUSE%20Leap%2015.6pkg:rpm/suse/release-notes-susemanager&distro=SUSE%20Manager%20Server%204.3pkg:rpm/suse/release-notes-susemanager-proxy&distro=SUSE%20Manager%20Proxy%204.3pkg:rpm/suse/saltbundlepy-core&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy-cython&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy-jinja2&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy-lxml&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy-m2crypto&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy-msgpack&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy-ply&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy-tornado&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/saltbundlepy-zypp-plugin&distro=SUSE:EL-9:Update:Products:SaltBundle:Updatepkg:rpm/suse/salt&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-ESPOSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP5-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Micro%205.2pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Micro%205.3pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Micro%205.4pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Micro%205.5pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP6pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP6pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Systems%20Management%2015%20SP7pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Transactional%20Server%2015%20SP6pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP5-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP4pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP5pkg:rpm/suse/salt&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/salt&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/salt&distro=SUSE%20Manager%20Proxy%204.3pkg:rpm/suse/salt&distro=SUSE%20Manager%20Server%204.3pkg:rpm/suse/venv-salt-minion&distro=SUSE%20Manager%20Client%20Tools%2012pkg:rpm/suse/venv-salt-minion&distro=SUSE%20Manager%20Client%20Tools%2015pkg:rpm/suse/venv-salt-minion&distro=SUSE%20Manager%20Client%20Tools%20for%20RHEL,%20Liberty%20and%20Clones%209-CLIENT-TOOLSpkg:rpm/suse/venv-salt-minion&distro=SUSE%20Manager%20Client%20Tools%20for%20SLE%20Micro%205pkg:rpm/suse/venv-salt-minion&distro=SUSE%20Manager%20Proxy%20Module%204.3pkg:rpm/suse/venv-salt-minion&distro=SUSE%20Manager%20Server%20Module%204.3pkg:rpm/suse/venv-salt-minion&distro=SUSE:EL-9:Update:Products:SaltBundle:Update
>= 3007.0rc1, < 3007.4+ 47 more
- (no CPE)range: >= 3007.0rc1, < 3007.4
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-41.1
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 4.3.16-150400.3.140.1
- (no CPE)range: < 4.3.16-150400.3.98.1
- (no CPE)range: < 3.11.11-1.32.1
- (no CPE)range: < 0.29.37-1.12.2
- (no CPE)range: < 3.11.11-1.32.1
- (no CPE)range: < 3.1.2-1.12.2
- (no CPE)range: < 4.9.4-1.21.1
- (no CPE)range: < 0.45.1-1.12.1
- (no CPE)range: < 1.0.7-1.14.1
- (no CPE)range: < 3.11-1.8.1
- (no CPE)range: < 6.3.2-1.12.2
- (no CPE)range: < 0.6.5-1.11.1
- (no CPE)range: < 3006.0-150300.53.94.1
- (no CPE)range: < 3006.0-150300.53.94.1
- (no CPE)range: < 3006.0-150400.8.80.1
- (no CPE)range: < 3006.0-150400.8.80.1
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-150300.53.94.1
- (no CPE)range: < 3006.0-150300.53.94.1
- (no CPE)range: < 3006.0-150400.8.80.1
- (no CPE)range: < 3006.0-150400.8.80.1
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-150700.14.5.2
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-150300.53.94.1
- (no CPE)range: < 3006.0-150400.8.80.1
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-150300.53.94.1
- (no CPE)range: < 3006.0-150400.8.80.1
- (no CPE)range: < 3006.0-150500.4.55.1
- (no CPE)range: < 3006.0-13.1
- (no CPE)range: < 3006.0-slfo.1.1_4.1
- (no CPE)range: < 3006.0-150400.8.80.1
- (no CPE)range: < 3006.0-150400.8.80.1
- (no CPE)range: < 3006.0-3.76.2
- (no CPE)range: < 3006.0-150000.3.78.1
- (no CPE)range: < 3006.0-1.59.1
- (no CPE)range: < 3006.0-150000.3.78.1
- (no CPE)range: < 3006.0-150000.3.78.1
- (no CPE)range: < 3006.0-150000.3.78.1
- (no CPE)range: < 3006.0-1.59.1
- VMware/SALTv5Range: 3006.x
Patches
31245edf40057619f4e26e71bc4ad23f0f313Add test and fix for file_recv cve
2 files changed · +32 −4
salt/master.py+3 −4 modified@@ -1560,11 +1560,10 @@ def _file_recv(self, load): # Can overwrite master files!! return False - cpath = os.path.join( - self.opts["cachedir"], "minions", load["id"], "files", normpath - ) + rpath = os.path.join(self.opts["cachedir"], "minions", load["id"], "files") + cpath = os.path.join(rpath, normpath) # One last safety check here - if not os.path.normpath(cpath).startswith(self.opts["cachedir"]): + if not salt.utils.verify.clean_path(rpath, cpath): log.warning( "Attempt to write received file outside of master cache " "directory! Requested path: %s. Access denied.",
tests/pytests/integration/master/test_recv_file.py+29 −0 added@@ -0,0 +1,29 @@ +import getpass +import pathlib + +import salt.channel.client + + +def test_file_recv_path(salt_master, salt_minion): + config = salt_minion.config.copy() + config["master_uri"] = f"tcp://127.0.0.1:{salt_master.config['ret_port']}" + keyfile = f".{getpass.getuser()}_key" + data = b"asdf" + load_path_list = ["..", "..", "..", keyfile] + cachedir = salt_master.config["cachedir"] + assert (pathlib.Path(cachedir) / keyfile).exists() + assert (pathlib.Path(cachedir) / keyfile).read_bytes() != data + with salt.channel.client.ReqChannel.factory(config, crypt="aes") as channel: + load = { + "cmd": "_file_recv", + "id": salt_minion.config["id"], + "path": load_path_list, + "size": len(data), + "tok": channel.auth.gen_token(b"salt"), + "loc": 0, + "data": b"asdf", + } + ret = channel.send(load) + assert ret is False + assert (pathlib.Path(cachedir) / keyfile).exists() + assert (pathlib.Path(cachedir) / keyfile).read_bytes() != data
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-8pcp-r83j-fc92ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-38824ghsaADVISORY
- docs.saltproject.io/en/3006/topics/releases/3006.12.htmlghsaWEB
- docs.saltproject.io/en/3007/topics/releases/3007.4.htmlghsaWEB
- github.com/saltstack/salt/commit/c4ad23f0f3132d8d8a88f19fa537dc42cf21b215ghsaWEB
News mentions
0No linked articles in our index yet.