CVE-2020-16846 — salt
CRITICALCVE-2020-16846 is a critical-severity (CVSS 9.8) OS Command Injection vulnerability in salt. It is in CISA's Known Exploited Vulnerabilities catalog (added 2021-11-03) — treat it as actively exploited and patch now. A fix is available for salt — see the affected versions and patch details below.
SaltStack Salt Command Injection in netapi ssh client
Exploitation Status
Actively exploited in the wild
- Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2021-11-03. Federal agencies were required to remediate by 2022-05-03.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2020-16846.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2020-16846 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 394,415 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
salt🐍salt🐍salt🐍salt🐍salt🐍salt🐍salt🐍salt+1 moreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
An issue was discovered in SaltStack Salt through 3002. Sending crafted web requests to the Salt API, with the SSH client enabled, can result in shell injection.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | salt | all versions | 2015.8.13pip install --upgrade 'salt==2015.8.13' |
| 🐍PyPI | salt | ≥ 2016.3.0&&< 2016.3.8 | 2016.3.8pip install --upgrade 'salt==2016.3.8' |
| 🐍PyPI | salt | ≥ 2016.11.0&&< 2016.11.10 | 2016.11.10pip install --upgrade 'salt==2016.11.10' |
| 🐍PyPI | salt | ≥ 2017.5.0&&< 2017.7.8 | 2017.7.8pip install --upgrade 'salt==2017.7.8' |
| 🐍PyPI | salt | ≥ 2018.2.0&&< 2018.3.5 | 2018.3.5pip install --upgrade 'salt==2018.3.5' |
| 🐍PyPI | salt | ≥ 2019.2.0&&< 2019.2.6 | 2019.2.6pip install --upgrade 'salt==2019.2.6' |
Affected Products
debian linuxdebianfedorafedoraprojectleapopensusesaltsaltstackResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
An issue was discovered in SaltStack Salt through 3002. Sending crafted …
An issue was discovered in SaltStack Salt through 3002. Sending crafted …
An issue was discovered in SaltStack Salt through 3002. Sending crafted …
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for salt, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update salt to 2015.8.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-16846 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
How to detect CVE-2020-16846
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2020-16846 -u https://target- Template
- SaltStack <=3002 - Shell Injection
- Severity
- critical
- Impact
- Unauthenticated attackers can execute arbitrary shell commands via the Salt API, leading to complete server compromise and access to all managed systems.
- Remediation
- Upgrade to a patched version of SaltStack (>=3003) to mitigate this vulnerability.
Template by ProjectDiscovery nuclei-templates (dwisiswant0), MIT licensed. View the full template. Scan only systems you are authorised to test.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat Ceph Storage 2 shipped salt for the usage of Red Hat Storage Console 2 (RHSCON-2), which required salt to administrate ceph nodes. RHSCON-2 has reached End Of Life, hence salt is no longer used and supported. Therefore, the salt package provided by Red Hat Ceph Storage 2 has been marked as 'will not fix'.
Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update as soon as possible.Source: Red Hat security advisory for CVE-2020-16846 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2020-16846 in your dependencies?
Find it across PyPI, including transitive dependencies.