{"id":"CVE-2021-31607","aliases":["CVE-2021-31607","GHSA-hcjf-rp5h-g5h3","PYSEC-2021-56"],"related":[],"kind":"vulnerability","state":"published","title":"Command Injection in SaltStack Salt","summary":"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).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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).","source":"cvelist"},{"lang":"es","text":"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.&#xa0;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)","source":"nvd"}],"published":"2021-04-23T00:00:00.000Z","modified":"2026-06-17T03:52:04.190Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:L/AC:L/Au:N/C:P/I:P/A:P","score":4.6,"rating":"MEDIUM"}],"cwes":["CWE-77","CWE-78"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2016.11.0","status":"affected","fixed":"3003rc1"}],"ecosystem":"PyPI","package":"salt","purl":"pkg:pypi/salt","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2016.9","lastAffected":"3002.6"}],"vendor":"saltstack","product":"salt","cpe":"cpe:2.3:a:saltstack:salt:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"33"},{"status":"affected","version":"34"},{"status":"affected","version":"35"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"2016.11.0","status":"affected","fixed":"3003rc1"}],"ecosystem":"PyPI","package":"salt","purl":"pkg:pypi/salt","source":"pysec"}],"references":[{"url":"https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion/","tags":["exploit","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM/","tags":["mailing-list","third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ/","tags":["mailing-list","third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT/","tags":["mailing-list","third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5/","tags":["mailing-list","third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/11/msg00009.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.debian.org/security/2021/dsa-5011","tags":["third-party-advisory","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.gentoo.org/glsa/202310-22","tags":["third-party-advisory","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31607","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2021-56.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6BUWUF5VTENNP2ZYZBVFKPSUHLKLUBD5","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ACVT7M4YLZRLWWQ6SGRK3C6TOF4FXOXT","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MBAHHSGZLEJRCG4DX6J4RBWJAAWH55RQ","tags":["web"],"sources":["ghsa"]},{"url":"https://sec.stealthcopter.com/saltstack-snapper-minion-privledge-escaltion","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LDKMAJXYFHM4USVX3H5V2GCCBGASWUSM/","tags":["web"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-hcjf-rp5h-g5h3","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-31607","url":"https://www.cve.org/CVERecord?id=CVE-2021-31607","licence":"CVE Terms of Use","modified":"2024-08-03T23:03:33.642Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hcjf-rp5h-g5h3","url":"https://github.com/advisories/GHSA-hcjf-rp5h-g5h3","licence":"CC-BY-4.0","modified":"2024-10-23T18:51:50.437Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-31607","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31607","licence":"Public domain","modified":"2026-06-17T03:52:04.190Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-56","url":"https://osv.dev/vulnerability/PYSEC-2021-56","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:50.055Z"}],"updatedAt":"2026-11-25T22:58:01.012Z","epss":{"score":0.05922,"percentile":0.93414,"date":"2026-12-02T12:00:21.000Z"}}