CVE-2021-31607
HIGH 7.8CVSS 3.1Command 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).
- Published
- 23 Apr 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-77CWE-78
- Also known as
- GHSA-hcjf-rp5h-g5h3PYSEC-2021-56
- Sources
- NVDJSONOSV GHSA-hcjf-rp5h-g5h3JSONOSV PYSEC-2021-56JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.6 | AV:L/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | saltstack | saltcpe:2.3:a:saltstack:salt:*:*:*:*:*:*:*:* |
>= 2016.9, <= 3002.6 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* |
= 33 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* |
= 34 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* |
= 35 | |
| OSV | PyPI | salt | >= 2016.11.0, < 3003rc1 | 3003rc1 |
References
- https://lists.debian.org/debian-lts-announce/2021/11/msg00009.html · Mailing List, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5/ · Mailing List, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT/ · Mailing List, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM/ · Mailing List, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ/ · Mailing List, Third Party Advisory, WEB
- https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion/ · Exploit, Patch, Third Party Advisory, WEB
- https://security.gentoo.org/glsa/202310-22 · Third Party Advisory, WEB
- https://www.debian.org/security/2021/dsa-5011 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-31607 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2021-56.yaml · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5 · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ · WEB
- https://github.com/advisories/GHSA-hcjf-rp5h-g5h3 · ADVISORY
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 23 Apr 2021)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 23 Apr 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 24 May 2022)