PoC Monitor
← All CVEs
CVE-2020-16846published 6 Nov 2020 07:27 UTCData: JSON · API

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.

First public PoC 5.5 daysafter publication · 11 Nov 2020 · Metasploit
Public PoCs42 on GitHub · 2 Exploit-DB, Metasploit or nuclei
CVSS9.8critical · scored by CISA ADP · CWE-78
CISA KEV 3 Nov 2021362 days after publication

Affected versions and mitigation

From the CVE record, GitHub Security Advisories and the vendor's references.

Affected

salt (PyPI)
  • < 2015.8.13

Fixed in 2015.8.13

from GitHub Security Advisory GHSA-qr38-h96j-2j3w

salt (PyPI)
  • >= 2016.3.0, < 2016.3.8

Fixed in 2016.3.8

from GitHub Security Advisory GHSA-qr38-h96j-2j3w

salt (PyPI)
  • >= 2016.11.0, < 2016.11.10

Fixed in 2016.11.10

from GitHub Security Advisory GHSA-qr38-h96j-2j3w

salt (PyPI)
  • >= 2017.5.0, < 2017.7.8

Fixed in 2017.7.8

from GitHub Security Advisory GHSA-qr38-h96j-2j3w

salt (PyPI)
  • >= 2018.2.0, < 2018.3.5

Fixed in 2018.3.5

from GitHub Security Advisory GHSA-qr38-h96j-2j3w

salt (PyPI)
  • >= 2019.2.0, < 2019.2.6

Fixed in 2019.2.6

from GitHub Security Advisory GHSA-qr38-h96j-2j3w

salt (PyPI)
  • >= 3000.0, < 3000.4

Fixed in 3000.4

from GitHub Security Advisory GHSA-qr38-h96j-2j3w

salt (PyPI)
  • >= 3001, < 3001.2

Fixed in 3001.2

from GitHub Security Advisory GHSA-qr38-h96j-2j3w

salt (PyPI)
  • >= 3002, < 3002.1

Fixed in 3002.1

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 publication
t=0+60+120+180+240+300+360CVE published6 Nov 2020 · t = 0First public PoC11 Nov 2020 · t+5.5dAdded to CISA KEV3 Nov 2021 · t+362d

First 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
RepositoryCreatedStarsAssessment
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.

PoC characteristics

What to hunt for in your logs · from 2 PoC repos

POST /run

Body markers
"client":"ssh" "fun": "eauth": "ssh_priv":"| "tgt": in application/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.

POST /run
(?i)^/run(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /run
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.

POST /run
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