Command Injection in SaltStack Salt
In SaltStack Salt 2016.9 through 3002.6, a command injection vulnerability exists in the snapper module that allows for local privilege escalation on a minion. The attack requires that a file is created with a pathname that is backed up by snapper, and that the master calls the snapper.diff function (which executes popen unsafely).
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | salt | >= 2016.11.0, < 3003rc1 | 3003rc1 |
References
- https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM/
- https://github.com/advisories/GHSA-hcjf-rp5h-g5h3
- https://nvd.nist.gov/vuln/detail/CVE-2021-31607
- https://github.com/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2021-56.yaml
- https://lists.debian.org/debian-lts-announce/2021/11/msg00009.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ
- https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion
- https://security.gentoo.org/glsa/202310-22
- https://www.debian.org/security/2021/dsa-5011
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-77, CWE-78- Platform
- Python (PyPI)
- Package
salt- Disclosed
- 23.04.2021
- Updated
- 11.10.2026 11:20
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2021-56 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-hcjf-rp5h-g5h3 - CC BY 4.0
Vulnerability history: salt
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 69
- First → latest
- 11.2013 01.2026
- Without a fix
- 0
- Exploited in attacks
- 3
Severity breakdown
- Critical 17
- High 32
- Medium 16
- Low 2
- Unrated 2
Disclosures per year
- 2017: 14
- 2018: 3
- 2019: 1
- 2020: 6
- 2021: 14
- 2022: 6
- 2023: 3
- 2024: 3
- 2025: 9
- 2026: 2
earlier: 8
-
Command Injection in SaltStack Salt this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.