CVE-2017-14695: Salt Path Traversal Vulnerability

CRITICAL
Advisory Identifier: GHSA-j6gj-pg62-x8j6
CVSS 9.8
CWE-22
Published
Advisory Summary

CVE-2017-14695 is a CRITICAL (CVSS 9.8) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Salt libraries in the PyPI ecosystem. The issue involves saltstack salt directory traversal vulnerability in minion id validation. Remediation is available by upgrading affected packages to version 2016.3.8, 2016.11.8, 2017.7.2.

CVE-2017-14695 at a Glance

CVE Identifier CVE-2017-14695
GHSA Identifier GHSA-j6gj-pg62-x8j6
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Salt
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
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-2017-14695

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: 2016.3.8
pip install salt>=2016.3.8
salt fixed: 2016.11.8
pip install salt>=2016.11.8
salt fixed: 2017.7.2
pip install salt>=2017.7.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-2017-14695, 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 2016.3.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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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

Directory traversal vulnerability in minion id validation in SaltStack Salt before 2016.3.8, 2016.11.x before 2016.11.8, and 2017.7.x before 2017.7.2 allows remote minions with incorrect credentials to authenticate to a master via a crafted minion ID. NOTE: this vulnerability exists because of an incomplete fix for CVE-2017-12791.

CVE-2017-14695 Affected Salt Versions

3 component(s)
Fixed Versions:
2016.3.82016.11.82017.7.2
Product / Package Ecosystem Affected Versions Fixed Version
salt
PyPI
< 2016.3.8
2016.3.8
salt
PyPI
≥ 2016.11.0
< 2016.11.8
2016.11.8
salt
PyPI
≥ 2017.7.0
< 2017.7.2
2017.7.2

References

Frequently Asked Questions

What is CVE-2017-14695?
CVE-2017-14695 is a security vulnerability in Salt involving SaltStack Salt Directory traversal vulnerability in minion id validation under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Salt versions are affected?
Affected versions include releases prior to 2016.3.8, 2016.11.8, 2017.7.2 across affected packages: salt.
What version fixes CVE-2017-14695?
Upgrading to 2016.3.8, 2016.11.8, 2017.7.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is salt affected?
Yes, salt is affected in releases prior to 2016.3.8, 2016.11.8, 2017.7.2. Upgrade your dependency to 2016.3.8, 2016.11.8, 2017.7.2 or later.
What is the CVSS score of CVE-2017-14695?
CVE-2017-14695 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2017-14695?
CVE-2017-14695 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2017-14695?
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-j6gj-pg62-x8j6",
  "modified" : "2024-10-21T21:11:11Z",
  "published" : "2022-05-17T00:24:32Z",
  "aliases" : [ "CVE-2017-14695" ],
  "summary" : "SaltStack Salt Directory traversal vulnerability in minion id validation",
  "details" : "Directory traversal vulnerability in minion id validation in SaltStack Salt before 2016.3.8, 2016.11.x before 2016.11.8, and 2017.7.x before 2017.7.2 allows remote minions with incorrect credentials to authenticate to a master via a crafted minion ID.  NOTE: this vulnerability exists because of an incomplete fix for CVE-2017-12791.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "salt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2016.3.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "salt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2016.11.0"
      }, {
        "fixed" : "2016.11.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "salt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2017.7.0"
      }, {
        "fixed" : "2017.7.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-14695"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/saltstack/salt/commit/80d90307b07b3703428ecbb7c8bb468e28a9ae6d"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1500748"
  }, {
    "type" : "WEB",
    "url" : "https://docs.saltstack.com/en/latest/topics/releases/2016.11.8.html"
  }, {
    "type" : "WEB",
    "url" : "https://docs.saltstack.com/en/latest/topics/releases/2016.3.8.html"
  }, {
    "type" : "WEB",
    "url" : "https://docs.saltstack.com/en/latest/topics/releases/2017.7.2.html"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/salt/PYSEC-2017-36.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/saltstack/salt"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2017-10/msg00073.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2017-10/msg00075.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-22T22:20:25Z",
    "nvd_published_at" : "2017-10-24T17:29:00Z"
  }
}