CVE-2021-25315: Salt Saltstack Salt Unauthenticated Arbitrary Code Vulnerability
HIGHCVE-2021-25315 is a HIGH (CVSS 7.8) saltstack salt unauthenticated arbitrary code vulnerability (CWE-287: Improper Authentication) affecting Salt libraries in the PyPI ecosystem. The issue involves saltstack salt unauthenticated arbitrary code execution. Remediation is available by upgrading affected packages to version 3002.2.
CVE-2021-25315 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-25315
To remediate this vulnerability, upgrade all affected Salt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install salt>=3002.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show salt
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-25315, inspect your installed packages using pip:
pip show salt
Analyze the terminal output to locate any version of Salt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3002.2), your application is affected.
Note: The pip show salt command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Salt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-25315 Affected Salt Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
salt
|
PyPI |
< 3002.2
|
3002.2
|
References
Frequently Asked Questions
What is CVE-2021-25315?
Which Salt versions are affected?
What version fixes CVE-2021-25315?
Is salt affected?
What is the CVSS score of CVE-2021-25315?
What CWE is associated with CVE-2021-25315?
How can I check PyPI dependencies for CVE-2021-25315?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pmj6-9f8c-8g2m",
"modified" : "2025-04-09T20:06:23Z",
"published" : "2022-05-24T17:43:35Z",
"aliases" : [ "CVE-2021-25315" ],
"summary" : "Saltstack Salt Unauthenticated Arbitrary Code Execution",
"details" : "A Incorrect Implementation of Authentication Algorithm vulnerability in of SUSE SUSE Linux Enterprise Server 15 SP 3; openSUSE Tumbleweed allows local attackers to execute arbitrary code via salt without the need to specify valid credentials. This issue affects: SUSE SUSE Linux Enterprise Server 15 SP 3 salt versions prior to 3002.2-3. openSUSE Tumbleweed salt version 3002.2-2.1 and prior versions.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "salt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3002.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-25315"
}, {
"type" : "WEB",
"url" : "https://bugzilla.suse.com/show_bug.cgi?id=1182382"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2021-891.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/saltstack/salt"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287", "CWE-303" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-22T22:26:04Z",
"nvd_published_at" : "2021-03-03T10:15:00Z"
}
}