CVE-2021-3197
Description
An issue was discovered in SaltStack Salt before 3002.5. The salt-api's ssh client is vulnerable to a shell injection by including ProxyCommand in an argument, or via ssh_options provided in an API request.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
CVE-2021-3197 is a shell injection vulnerability in SaltStack Salt's salt-api SSH client, allowing unauthenticated remote code execution via ProxyCommand or ssh_options.
Vulnerability
Overview
CVE-2021-3197 is a shell injection vulnerability found in the SaltStack Salt configuration management framework, specifically in the salt-api's SSH client. The vulnerability exists in versions before 3002.5. An attacker can inject arbitrary shell commands by including a ProxyCommand directive in an SSH argument or via ssh_options provided in an API request [1]. The root cause is insufficient sanitization of user-supplied input that is later passed to a shell, allowing an attacker to break out of the intended command and execute arbitrary system commands.
Exploitation
The attack surface is the salt-api endpoint that handles SSH connections. No authentication is required to exploit this vulnerability; an attacker can send a crafted API request that includes malicious ProxyCommand options or ssh_options values [1]. The injected commands are executed by the SSH client on the Salt master or proxy minion, depending on the deployment. This low-complexity attack can be carried out over the network without any user interaction.
Impact
Successful exploitation grants an attacker unauthenticated remote code execution (RCE) with the privileges of the salt-api process, which is often root or a highly privileged user [1]. This allows the attacker to take full control of the Salt master or any managed systems that the API can reach, leading to a complete compromise of the infrastructure. The vulnerability has been assigned a CVSS score of 9.8 (Critical) due to its network attack vector, low complexity, and high impact on confidentiality, integrity, and availability.
Mitigation
The vulnerability is patched in SaltStack Salt version 3002.5 [1]. Users are strongly advised to upgrade immediately. No workarounds have been publicly recommended, and given the critical severity, patching is the only reliable mitigation. The fix ensures that user-supplied SSH options are properly sanitized before being passed to the shell, preventing injection.
AI Insight generated on May 21, 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 | < 2015.8.13 | 2015.8.13 |
saltPyPI | >= 2016.3.0, < 2016.11.5 | 2016.11.5 |
saltPyPI | >= 2016.11.7, < 2016.11.10 | 2016.11.10 |
saltPyPI | >= 2017.5.0, < 2017.7.8 | 2017.7.8 |
saltPyPI | >= 2018.2.0, <= 2018.3.5 | — |
saltPyPI | >= 2019.2.0, < 2019.2.8 | 2019.2.8 |
saltPyPI | >= 3000, < 3000.7 | 3000.7 |
saltPyPI | >= 3001, < 3001.5 | 3001.5 |
saltPyPI | >= 3002, < 3002.3 | 3002.3 |
Affected products
32- SaltStack/Saltdescription
- ghsa-coords31 versionspkg:pypi/saltpkg:rpm/opensuse/salt&distro=openSUSE%20Leap%2015.2pkg:rpm/suse/py26-compat-salt&distro=SUSE%20Manager%20Server%20Module%204.0pkg:rpm/suse/py26-compat-salt&distro=SUSE%20Manager%20Server%20Module%204.1pkg:rpm/suse/release-notes-susemanager&distro=SUSE%20Manager%20Server%204.0pkg:rpm/suse/release-notes-susemanager&distro=SUSE%20Manager%20Server%204.1pkg:rpm/suse/release-notes-susemanager-proxy&distro=SUSE%20Manager%20Proxy%204.0pkg:rpm/suse/release-notes-susemanager-proxy&distro=SUSE%20Manager%20Proxy%204.1pkg:rpm/suse/release-notes-susemanager-proxy&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.0pkg:rpm/suse/release-notes-susemanager-proxy&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.1pkg:rpm/suse/salt&distro=SUSE%20Enterprise%20Storage%206pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-ESPOSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Advanced%20Systems%20Management%2012pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP2pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Python%202%2015%20SP2pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Server%20Applications%2015%20SP2pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Point%20of%20Sale%2012%20SP2pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP3-CLIENT-TOOLSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4-CLIENT-TOOLSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-BCLpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/salt&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/salt&distro=SUSE%20Manager%20Client%20Tools%2012pkg:rpm/suse/salt&distro=SUSE%20Manager%20Proxy%204.0pkg:rpm/suse/salt&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.0pkg:rpm/suse/salt&distro=SUSE%20Manager%20Server%204.0
< 2015.8.13+ 30 more
- (no CPE)range: < 2015.8.13
- (no CPE)range: < 3000-lp152.3.27.1
- (no CPE)range: < 2016.11.10-10.22.1
- (no CPE)range: < 2016.11.10-6.8.1
- (no CPE)range: < 4.0.12.1-3.68.1
- (no CPE)range: < 4.1.5.1-3.38.1
- (no CPE)range: < 4.0.12.1-0.16.52.1
- (no CPE)range: < 4.1.5.1-3.26.1
- (no CPE)range: < 4.0.12.1-0.16.52.1
- (no CPE)range: < 4.1.5.1-3.26.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-5.106.1
- (no CPE)range: < 3000-5.106.1
- (no CPE)range: < 3000-46.129.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-46.129.1
- (no CPE)range: < 2016.11.10-43.69.1
- (no CPE)range: < 2016.11.10-43.69.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-5.106.1
- (no CPE)range: < 3000-5.106.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-46.129.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-24.1
- (no CPE)range: < 3000-24.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
23- github.com/advisories/GHSA-8rp6-x3r7-5qw3ghsaADVISORY
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7GRVZ5WAEI3XFN2BDTL6DDXFS5HYSDVB/mitrevendor-advisory
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FUGLOJ6NXLCIFRD2JTXBYQEMAEF2B6XH/mitrevendor-advisory
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YOGNT2XWPOYV7YT75DN7PS4GIYWFKOK5/mitrevendor-advisory
- nvd.nist.gov/vuln/detail/CVE-2021-3197ghsaADVISORY
- security.gentoo.org/glsa/202103-01ghsavendor-advisoryWEB
- security.gentoo.org/glsa/202310-22ghsavendor-advisoryWEB
- www.debian.org/security/2021/dsa-5011ghsavendor-advisoryWEB
- github.com/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2021-57.yamlghsaWEB
- github.com/saltstack/salt/blob/8f9405cf8e6f7d7776d5000841c886dec6d96250/CHANGELOG.mdghsaWEB
- github.com/saltstack/salt/blob/8f9405cf8e6f7d7776d5000841c886dec6d96250/doc/topics/releases/3000.7.rstghsaWEB
- github.com/saltstack/salt/blob/8f9405cf8e6f7d7776d5000841c886dec6d96250/doc/topics/releases/3001.5.rstghsaWEB
- github.com/saltstack/salt/blob/8f9405cf8e6f7d7776d5000841c886dec6d96250/doc/topics/releases/3002.3.rstghsaWEB
- lists.debian.org/debian-lts-announce/2021/11/msg00009.htmlghsamailing-listWEB
- lists.debian.org/debian-lts-announce/2022/01/msg00000.htmlghsamailing-listWEB
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7GRVZ5WAEI3XFN2BDTL6DDXFS5HYSDVBghsaWEB
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FUGLOJ6NXLCIFRD2JTXBYQEMAEF2B6XHghsaWEB
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YOGNT2XWPOYV7YT75DN7PS4GIYWFKOK5ghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7GRVZ5WAEI3XFN2BDTL6DDXFS5HYSDVBghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FUGLOJ6NXLCIFRD2JTXBYQEMAEF2B6XHghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YOGNT2XWPOYV7YT75DN7PS4GIYWFKOK5ghsaWEB
- saltproject.io/security_announcements/active-saltstack-cve-release-2021-feb-25ghsaWEB
- saltproject.io/security_announcements/active-saltstack-cve-release-2021-feb-25/mitre
News mentions
0No linked articles in our index yet.