CVE-2021-31607: Command Injection

Published Apr 23, 2021
·
Updated

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

8 affected componentsFixes available
debian/salt
2018.3.4+dfsg1-6+deb10u33002.6+dfsg1-4+deb11u13004.1+dfsg-2.2
debian/salt<=2018.3.4+dfsg1-6, <=2018.3.4+dfsg1-6+deb10u2, <=3002.6+dfsg1-1
pip/salt>=2016.11.0<=3002.6
3003rc1
SaltStack Salt
SaltStack Salt>=2016.9<=3002.6
fedoraproject fedora=33
fedoraproject fedora=34
fedoraproject fedora=35

Event History

Apr 23, 2021
CVE Published
12:00 AM
Data Sourced
12:00 AM
Description
May 24, 2022
Advisory Published
via GitHub·05:48 PM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2021-31607?

CVE-2021-31607 is a command injection vulnerability in the snapper module of SaltStack Salt 2016.9 through 3002.6, allowing for local privilege escalation on a minion.

2

What is the severity of CVE-2021-31607?

The severity of CVE-2021-31607 is high with a CVSS score of 7.8.

3

How does CVE-2021-31607 work?

CVE-2021-31607 requires the creation of a file with a backed-up pathname by snapper and the master calling the snapper.diff function, leading to command injection and potential privilege escalation.

4

Which versions of SaltStack Salt are affected by CVE-2021-31607?

SaltStack Salt versions 2016.9 through 3002.6 are affected by CVE-2021-31607.

5

How can I fix CVE-2021-31607?

To fix CVE-2021-31607, update to SaltStack Salt version 2018.3.4+dfsg1-6+deb10u3 or 3002.6+dfsg1-4+deb11u1 or 3004.1+dfsg-2.2, as recommended by Debian.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203