CVE-2022-22941: Salt SaltStack Salt Permissions Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-qcr3-hr2f-6557
CVSS 8.8
CWE-732
Published
Advisory Summary

CVE-2022-22941 is a HIGH (CVSS 8.8) saltstack salt permissions bypass vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting Salt libraries in the PyPI ecosystem. The issue involves saltstack salt permissions bypass. Remediation is available by upgrading affected packages to version 3002.8, 3003.4, 3004.1.

CVE-2022-22941 at a Glance

CVE Identifier CVE-2022-22941
GHSA Identifier GHSA-qcr3-hr2f-6557
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-732: Incorrect Permission Assignment for Critical Resource
Affected Product Salt
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
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-2022-22941

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.8
pip install salt>=3002.8
salt fixed: 3003.4
pip install salt>=3003.4
salt fixed: 3004.1
pip install salt>=3004.1
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-2022-22941, 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.8), 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-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. 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

An issue was discovered in SaltStack Salt in versions before 3002.8, 3003.4, 3004.1. When configured as a Master-of-Masters, with a publisher_acl, if a user configured in the publisher_acl targets any minion connected to the Syndic, the Salt Master incorrectly interpreted no valid targets as valid, allowing configured users to target any of the minions connected to the syndic with their configured commands. This requires a syndic master combined with publisher_acl configured on the Master-of-Masters, allowing users specified in the publisher_acl to bypass permissions, publishing authorized commands to any configured minion.

CVE-2022-22941 Affected Salt Versions

3 component(s)
Fixed Versions:
3002.83003.43004.1
Product / Package Ecosystem Affected Versions Fixed Version
salt
PyPI
< 3002.8
3002.8
salt
PyPI
≥ 3003
< 3003.4
3003.4
salt
PyPI
≥ 3004
< 3004.1
3004.1

References

Frequently Asked Questions

What is CVE-2022-22941?
CVE-2022-22941 is a security vulnerability in Salt involving SaltStack Salt Permissions Bypass under CWE-732: Incorrect Permission Assignment for Critical Resource.
Which Salt versions are affected?
Affected versions include releases prior to 3002.8, 3003.4, 3004.1 across affected packages: salt.
What version fixes CVE-2022-22941?
Upgrading to 3002.8, 3003.4, 3004.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is salt affected?
Yes, salt is affected in releases prior to 3002.8, 3003.4, 3004.1. Upgrade your dependency to 3002.8, 3003.4, 3004.1 or later.
What is the CVSS score of CVE-2022-22941?
CVE-2022-22941 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-22941?
CVE-2022-22941 is classified under CWE-732: Incorrect Permission Assignment for Critical Resource (The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.).
How can I check PyPI dependencies for CVE-2022-22941?
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-qcr3-hr2f-6557",
  "modified" : "2024-10-22T14:50:15Z",
  "published" : "2022-03-30T00:00:20Z",
  "aliases" : [ "CVE-2022-22941" ],
  "summary" : "SaltStack Salt Permissions Bypass",
  "details" : "An issue was discovered in SaltStack Salt in versions before 3002.8, 3003.4, 3004.1. When configured as a Master-of-Masters, with a publisher_acl, if a user configured in the publisher_acl targets any minion connected to the Syndic, the Salt Master incorrectly interpreted no valid targets as valid, allowing configured users to target any of the minions connected to the syndic with their configured commands. This requires a syndic master combined with publisher_acl configured on the Master-of-Masters, allowing users specified in the publisher_acl to bypass permissions, publishing authorized commands to any configured minion.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/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.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "salt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3003"
      }, {
        "fixed" : "3003.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "salt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3004"
      }, {
        "fixed" : "3004.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-22941"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2022-174.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/saltstack/salt"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/saltstack/salt/blob/8f9405cf8e6f7d7776d5000841c886dec6d96250/doc/topics/releases/3002.8.rst#L31"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/saltstack/salt/blob/8f9405cf8e6f7d7776d5000841c886dec6d96250/doc/topics/releases/3003.4.rst#L32"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/saltstack/salt/blob/8f9405cf8e6f7d7776d5000841c886dec6d96250/doc/topics/releases/3004.1.rst#L30"
  }, {
    "type" : "WEB",
    "url" : "https://repo.saltproject.io"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202310-22"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-732" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-22T21:15:02Z",
    "nvd_published_at" : "2022-03-29T17:15:00Z"
  }
}