CVE-2019-14858: Ansible Ansible Leaks Sensitive Information To Vulnerability

MODERATE
Advisory Identifier: GHSA-h653-95qw-h2mp
CVSS 5.5
CWE-532
Published
Advisory Summary

CVE-2019-14858 is a MODERATE (CVSS 5.5) ansible leaks sensitive information to vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Ansible libraries in the PyPI ecosystem. The issue involves ansible leaks sensitive information to logs when told not to. Remediation is available by upgrading affected packages to version 2.9.0rc4, 2.8.6, 2.7.14, 2.6.20.

CVE-2019-14858 at a Glance

CVE Identifier CVE-2019-14858
GHSA Identifier GHSA-h653-95qw-h2mp
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Ansible
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.5

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:N/A:N).

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 None (I:N)
Availability None (A:N)

How to Fix CVE-2019-14858

To remediate this vulnerability, upgrade all affected Ansible dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ansible fixed: 2.9.0rc4
pip install ansible>=2.9.0rc4
ansible fixed: 2.8.6
pip install ansible>=2.8.6
ansible fixed: 2.7.14
pip install ansible>=2.7.14
ansible fixed: 2.6.20
pip install ansible>=2.6.20
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 ansible

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2019-14858, inspect your installed packages using pip:

pip show ansible

Analyze the terminal output to locate any version of Ansible in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.0rc4), your application is affected.

Note: The pip show ansible command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Ansible, 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 vulnerability was found in Ansible engine 2.x up to 2.8 and Ansible tower 3.x up to 3.5. When a module has an argument_spec with sub parameters marked as `no_log`, passing an invalid parameter name to the module will cause the task to fail before the `no_log` options in the sub parameters are processed. As a result, data in the sub parameter fields will not be masked and will be displayed if Ansible is run with increased verbosity and present in the module invocation arguments for the task.

CVE-2019-14858 Affected Ansible Versions

4 component(s)
Fixed Versions:
2.9.0rc42.8.62.7.142.6.20
Product / Package Ecosystem Affected Versions Fixed Version
ansible
PyPI
≥ 2.9.0a1
< 2.9.0rc4
2.9.0rc4
ansible
PyPI
≥ 2.8.0a1
< 2.8.6
2.8.6
ansible
PyPI
≥ 2.7.0a1
< 2.7.14
2.7.14
ansible
PyPI
≥ 2.0
< 2.6.20
2.6.20

References

NVD — CVE-2019-14858 NVD
https://nvd.nist.gov/vuln/detail/CVE-2019-14858
Ansible Source Repository REPOSITORY
https://github.com/ansible/ansible/pull/63405
Security Fix Commit FIX COMMIT
https://github.com/ansible/ansible/commit/0fd656e9964a91f2e8b1e9bbf78c74661ab9d37b
Security Fix Commit FIX COMMIT
https://github.com/ansible/ansible/commit/3dfb8e81bb5f776a6b00c7a90dd087e85b71f8bb
Security Fix Commit FIX COMMIT
https://github.com/ansible/ansible/commit/87f8d77d70476454f7fe2381bd363a329ce4266c
Security Fix Commit FIX COMMIT
https://github.com/ansible/ansible/commit/f610ed3a4eb87eb557200606279796921fa9b722
access.redhat.com/errata/rhsa-2019:32... WEB
https://access.redhat.com/errata/RHSA-2019:3201
access.redhat.com/errata/rhsa-2019:32... WEB
https://access.redhat.com/errata/RHSA-2019:3202
access.redhat.com/errata/rhsa-2019:32... WEB
https://access.redhat.com/errata/RHSA-2019:3203
access.redhat.com/errata/rhsa-2019:32... WEB
https://access.redhat.com/errata/RHSA-2019:3207
access.redhat.com/errata/rhsa-2020:07... WEB
https://access.redhat.com/errata/RHSA-2020:0756
Ansible Source Repository REPOSITORY
https://github.com/ansible/ansible
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-14858
Ansible Source Repository REPOSITORY
https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2019-171.yaml
Ansible Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00021.html
Ansible Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00026.html

Frequently Asked Questions

What is CVE-2019-14858?
CVE-2019-14858 is a security vulnerability in Ansible involving Ansible leaks sensitive information to logs when told not to under CWE-532: Insertion of Sensitive Information into Log File.
Which Ansible versions are affected?
Affected versions include releases prior to 2.9.0rc4, 2.8.6, 2.7.14, 2.6.20 across affected packages: ansible.
What version fixes CVE-2019-14858?
Upgrading to 2.9.0rc4, 2.8.6, 2.7.14, 2.6.20 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ansible affected?
Yes, ansible is affected in releases prior to 2.9.0rc4, 2.8.6, 2.7.14, 2.6.20. Upgrade your dependency to 2.9.0rc4, 2.8.6, 2.7.14, 2.6.20 or later.
What is the CVSS score of CVE-2019-14858?
CVE-2019-14858 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2019-14858?
CVE-2019-14858 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check PyPI dependencies for CVE-2019-14858?
Run the dependency tree command: 'pip show ansible'. 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-h653-95qw-h2mp",
  "modified" : "2024-09-10T21:47:33Z",
  "published" : "2022-05-24T16:58:43Z",
  "aliases" : [ "CVE-2019-14858" ],
  "summary" : "Ansible leaks sensitive information to logs when told not to",
  "details" : "A vulnerability was found in Ansible engine 2.x up to 2.8 and Ansible tower 3.x up to 3.5. When a module has an argument_spec with sub parameters marked as `no_log`, passing an invalid parameter name to the module will cause the task to fail before the `no_log` options in the sub parameters are processed. As a result, data in the sub parameter fields will not be masked and will be displayed if Ansible is run with increased verbosity and present in the module invocation arguments for the task.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ansible"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.9.0a1"
      }, {
        "fixed" : "2.9.0rc4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ansible"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.8.0a1"
      }, {
        "fixed" : "2.8.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ansible"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0a1"
      }, {
        "fixed" : "2.7.14"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ansible"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0"
      }, {
        "fixed" : "2.6.20"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-14858"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ansible/ansible/pull/63405"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ansible/ansible/commit/0fd656e9964a91f2e8b1e9bbf78c74661ab9d37b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ansible/ansible/commit/3dfb8e81bb5f776a6b00c7a90dd087e85b71f8bb"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ansible/ansible/commit/87f8d77d70476454f7fe2381bd363a329ce4266c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ansible/ansible/commit/f610ed3a4eb87eb557200606279796921fa9b722"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:3201"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:3202"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:3203"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:3207"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:0756"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2019-14858"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ansible/ansible"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2019-171.yaml"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00021.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00026.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-22T22:14:26Z",
    "nvd_published_at" : "2019-10-14T15:15:00Z"
  }
}