CVE-2021-31607 json
Command Injection in SaltStack Salt
published 2021-04-23 5 y ago modified 2026-06-17 4 mo ago also GHSA-hcjf-rp5h-g5h3 , PYSEC-2021-56 , EUVD-2021-0233
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 5.9%
- EPSS 5.9% chance of exploitation in 30 days, percentile 93%
- public exploits
- 0
- none known
Summary
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).
Patch / fix
- pypi salt 3003rc1
- cobbler Manager Server Module 4.0 3.0.0+git20190806.32c4bae0-7.22.3
- tika-core Manager Server Module 4.0 1.26-3.6.3
- susemanager Manager Server Module 4.0 4.0.34-3.52.3
- spacewalk-web Manager Server Module 4.0 4.0.28-3.45.1
- spacewalk-java Manager Server Module 4.0 4.0.44-3.57.5
- grafana-formula Manager Server Module 4.0 0.2.3-4.16.3
- spacewalk-utils Manager Server Module 4.0 4.0.21-3.30.3
- susemanager-sls Manager Server Module 4.0 4.0.35-3.48.3
suse advisories SUSE-SU-2021:2114-1SUSE-SU-2021:2106-1SUSE-SU-2021:2105-1SUSE-SU-2021:2104-1SUSE-SU-2021:2102-1SUSE-SU-2021:14753-1
- python-distro openSUSE Leap 15.3 1.5.0-3.5.1
- salt openSUSE Leap 15.3 3002.2-8.41.8.1
- salt openSUSE Leap 15.2 3002.2-lp152.3.36.1
opensuse advisories openSUSE-SU-2021:2106-1openSUSE-SU-2021:1951-1openSUSE-SU-2021:0899-1
- salt Alpine 3.24, Alpine 3.23, Alpine 3.22 +9 more 3003-r0
alpine advisories ALPINE-CVE-2021-31607
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-31607 updated cvss 7.8
salt: Command injection in the snapper module
-
Red Hat Ceph Storage 2 salt, salt-minionaffected: no fix planned “Out of support scope”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
5.92% chance of exploitation in the next 30 days, higher than 93% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- sec.stealthcopter.com https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion/ referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 4.6 | AV:L/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | salt | >=2016.11.0, <3003rc1 |
3003rc1 |
Classification
References
-
sec.stealthcopter.com
/saltstack-snapper-minion-privledge-escaltion/
exploit, patch, third-party-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM/
vendor-advisory, mailing-list, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ/
vendor-advisory, mailing-list, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT/
vendor-advisory, mailing-list, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5/
vendor-advisory, mailing-list, third-party-advisory
-
debian.org
/security/2021/dsa-5011
vendor-advisory, web, third-party-advisory
-
security.gentoo.org
/glsa/202310-22
vendor-advisory, web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2021/11/msg00009.html
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-31607
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2021-56.yaml
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ
web
-
sec.stealthcopter.com
/saltstack-snapper-minion-privledge-escaltion
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM/
web
-
github.com
/advisories/GHSA-hcjf-rp5h-g5h3
advisory
Sources
- CVE List CVE-2021-31607
- GitHub Advisory GHSA-hcjf-rp5h-g5h3
- NVD CVE-2021-31607
- OSV PYSEC-2021-56
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.