CVE-2021-25315: Salt Saltstack Salt Unauthenticated Arbitrary Code Vulnerability

HIGH
Advisory Identifier: GHSA-pmj6-9f8c-8g2m
CVSS 7.8
CWE-287 CWE-303
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-25315
GHSA Identifier GHSA-pmj6-9f8c-8g2m
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-287: Improper Authentication
Affected Product Salt
Package Ecosystem PyPI
Published Date
Last Updated

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

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

salt fixed: 3002.2
pip install salt>=3002.2
Verify Direct and Transitive Dependencies

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

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.

CVE-2021-25315 Affected Salt Versions

1 component(s)
Fixed Versions:
3002.2
Product / Package Ecosystem Affected Versions Fixed Version
salt
PyPI
< 3002.2
3002.2

References

Frequently Asked Questions

What is CVE-2021-25315?
CVE-2021-25315 is a security vulnerability in Salt involving Saltstack Salt Unauthenticated Arbitrary Code Execution under CWE-287: Improper Authentication.
Which Salt versions are affected?
Affected versions include releases prior to 3002.2 across affected packages: salt.
What version fixes CVE-2021-25315?
Upgrading to 3002.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is salt affected?
Yes, salt is affected in releases prior to 3002.2. Upgrade your dependency to 3002.2 or later.
What is the CVSS score of CVE-2021-25315?
CVE-2021-25315 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-25315?
CVE-2021-25315 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check PyPI dependencies for CVE-2021-25315?
Run the dependency tree command: 'pip show salt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}