CVE-2021-31607
JSON

7.8high

Command Injection in SaltStack Salt

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
5.92% (higher than 93% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-hcjf-rp5h-g5h3PYSEC-2021-56

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

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
salt (PyPI)from 2016.11.0 before 3003rc1GitHub Advisory Database, PyPA Advisory Database
saltstack saltfrom 2016.9 up to 3002.6NVD
fedoraproject fedora33, 34, 35NVD

All scores

GitHub7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD4.6medium CVSS:2.0AV:L/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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

NVD (es)

En SaltStack Salt versiones 2016.9 hasta 3002.6, se presenta una vulnerabilidad de inyección de comando en el módulo snapper que permite una escalada local de privilegios en un minion. El ataque requiere que sea creado un archivo con un nombre de ruta respaldado por snapper, y que el maestro llame a la función snapper.diff (que ejecuta popen de manera no segura)

References

https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion/exploit, patch, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM/mailing-list, third-party-advisory, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ/mailing-list, third-party-advisory, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT/mailing-list, third-party-advisory, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5/mailing-list, third-party-advisory, vendor-advisory
https://lists.debian.org/debian-lts-announce/2021/11/msg00009.htmlmailing-list, third-party-advisory, web
https://www.debian.org/security/2021/dsa-5011third-party-advisory, vendor-advisory, web
https://security.gentoo.org/glsa/202310-22third-party-advisory, vendor-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-31607advisory
https://github.com/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2021-56.yamlweb
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXTweb

Sources

SourceRecordLicence
CVE ListCVE-2021-31607 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-hcjf-rp5h-g5h3 changed 2024-10-23CC-BY-4.0
NVDCVE-2021-31607 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-56 changed 2023-11-08CC-BY-4.0