cve.bz

CVE-2021-31607 OS Command Injection

7.8 highExploit referenceEPSS 5.9%Fix available

High (7.8). EPSS 5.9% estimated probability of exploitation activity in the next 30 days. Fixed in salt 3003rc1.

On this page
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).

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
5.9% (unchanged from 5.9% a week ago; 5.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 93rd percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-31607 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-31607?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-31607?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-31607 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
saltstack:saltfrom 2016.9 through 3002.6
fedoraproject:fedora33
fedoraproject:fedora34
fedoraproject:fedora35

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-hcjf-rp5h-g5h3PyPIsalt>=2016.11.0 <3003rc13003rc1
PYSEC-2021-56PyPIsalt>=2016.11.0 <3003rc13003rc1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9salt2016.11.2+ds-1+deb9u7DLA-2815-1
UbuntuPro:18.04:LTSsaltno fix listedUBUNTU-CVE-2021-31607
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 6 moresalt3002.2-37.1SUSE-SU-2021:2105-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Server 15-LTSS and 1 moresalt3002.2-8.41.8.1SUSE-SU-2021:2104-1
SUSELinux Enterprise Micro 5.0, Linux Enterprise Module for Basesystem 15 SP2, Linux Enterprise Module for Basesystem 15 SP3 and 2 morepython-distro1.5.0-3.5.1SUSE-SU-2021:2106-1
SUSELinux Enterprise Micro 5.0, Linux Enterprise Module for Basesystem 15 SP2, Linux Enterprise Module for Server Applications 15 SP2 and 1 moresalt3002.2-37.1SUSE-SU-2021:2106-1
SUSELinux Enterprise Module for Advanced Systems Management 12, Manager Client Tools 12salt3000-46.142.2SUSE-SU-2021:2102-1
SUSELinux Enterprise Module for Basesystem 15 SP3, Linux Enterprise Module for Server Applications 15 SP3, Linux Enterprise Module for Transactional Server 15 SP3salt3002.2-8.41.8.1SUSE-SU-2021:1951-1
SUSELinux Enterprise Server 11 SP3-CLIENT-TOOLS, Linux Enterprise Server 11 SP4-CLIENT-TOOLSgolang-github-wrouesnel-postgres_exporter0.4.7-5.12.1SUSE-SU-2021:14753-1
SUSELinux Enterprise Server 11 SP3-CLIENT-TOOLS, Linux Enterprise Server 11 SP4-CLIENT-TOOLSmgr-cfg4.2.2-5.15.2SUSE-SU-2021:14753-1
SUSELinux Enterprise Server 11 SP3-CLIENT-TOOLS, Linux Enterprise Server 11 SP4-CLIENT-TOOLSmgr-custom-info4.2.1-5.9.2SUSE-SU-2021:14753-1
SUSELinux Enterprise Server 11 SP3-CLIENT-TOOLS, Linux Enterprise Server 11 SP4-CLIENT-TOOLSmgr-daemon4.2.7-5.26.1SUSE-SU-2021:14753-1
SUSELinux Enterprise Server 11 SP3-CLIENT-TOOLS, Linux Enterprise Server 11 SP4-CLIENT-TOOLSmgr-osad4.2.5-5.27.2SUSE-SU-2021:14753-1
SUSELinux Enterprise Server 11 SP3-CLIENT-TOOLS, Linux Enterprise Server 11 SP4-CLIENT-TOOLSmgr-push4.2.2-5.9.2SUSE-SU-2021:14753-1
50 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.2salt3002.2-lp152.3.36.1openSUSE-SU-2021:0899-1
openSUSELeap 15.3python-distro1.5.0-3.5.1openSUSE-SU-2021:2106-1
openSUSELeap 15.3salt3002.2-8.41.8.1openSUSE-SU-2021:1951-1
Alpinev3.13, v3.14, v3.15 and 9 moresalt3003-r0ALPINE-CVE-2021-31607

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Ceph Storage 2saltOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-31607.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON