SaltStack Salt
SaltStack Salt Shell Injection Vulnerability
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 versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- >= 2016.3.0, < 2016.3.8
Fixed in 2016.3.8
from GitHub Security Advisory GHSA-qr38-h96j-2j3w
- >= 2016.11.0, < 2016.11.10
Fixed in 2016.11.10
from GitHub Security Advisory GHSA-qr38-h96j-2j3w
- >= 2017.5.0, < 2017.7.8
Fixed in 2017.7.8
from GitHub Security Advisory GHSA-qr38-h96j-2j3w
- >= 2018.2.0, < 2018.3.5
Fixed in 2018.3.5
from GitHub Security Advisory GHSA-qr38-h96j-2j3w
- >= 2019.2.0, < 2019.2.6
Fixed in 2019.2.6
from GitHub Security Advisory GHSA-qr38-h96j-2j3w
Mitigation
Upgrade salt to 2015.8.13 or later.
Upgrade salt to 2016.3.8 or later.
Upgrade salt to 2016.11.10 or later.
Upgrade salt to 2017.7.8 or later.
Upgrade salt to 2018.3.5 or later.
Upgrade salt to 2019.2.6 or later.
Upgrade salt to 3000.4 or later.
Upgrade salt to 3001.2 or later.
Upgrade salt to 3002.1 or later.
Timeline
Days relative to CVE publicationFirst public PoC 5.5 days after publication; added to CISA KEV 362 days after publication. First PoC: Metasploit exploit: SaltStack Salt REST API Arbitrary Command Execution (exploit/linux/http/saltstack_salt_api_cmd_exec) (Metasploit, 11 Nov 2020).
PoC repositories
Found on GitHub.2 PoCs
PoCs 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| zomy22/CVE-2020-16846-Saltstack-Salt-API | 14 Oct 2021 +342 d | 0 | PoC |
| hamza-boudouche/projet-secu | 12 Dec 2022 +2.1 y | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| Metasploit | Metasploit exploit: SaltStack Salt REST API Arbitrary Command Execution (exploit/linux/http/saltstack_salt_api_cmd_exec) | 11 Nov 2020 | 14 Nov 2026 |
| nuclei template | nuclei template: SaltStack <=3002 - Shell Injection | 27 Apr 2023 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 2 PoC reposPOST /run
- Body markers
"client":"ssh""fun":"eauth":"ssh_priv":"|"tgt":inapplication/json- Ports
- 8000
- Seen in
- 1 repo: zomy22/CVE-2020-16846-Saltstack-Salt-API
- Evidence
- zomy22/CVE-2020-16846-Saltstack-Salt-API/README.md:32 zomy22/CVE-2020-16846-Saltstack-Salt-API/README.md:39
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/run(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2020-16846 SaltStack Salt exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/run"; http.request_body; content:"|22|client|22|:|22|ssh|22|"; http.request_body; content:"|22|fun|22|:"; http.request_body; content:"|22|eauth|22|:"; http.request_body; content:"|22|ssh_priv|22|:|22||7c|"; http.request_body; content:"|22|tgt|22|:"; reference:url,poc.griffinguard.io/cve/CVE-2020-16846; classtype:web-application-attack; sid:9557696; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: SaltStack Salt exploit attempt (CVE-2020-16846)
id: gg-pocmon-cve-2020-16846-9557696
status: experimental
description: Request pattern taken from public PoCs for CVE-2020-16846. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2020-16846
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/run'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2020.16846