CVE-2018-16859: Ansible Ansible Logs Passwords If PowerShell Vulnerability
MODERATECVE-2018-16859 is a MODERATE (CVSS 4.4) ansible logs passwords if powershell vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Ansible libraries in the PyPI ecosystem. The issue involves ansible logs passwords if powershell scriptblock is enabled. Remediation is available by upgrading affected packages to version 2.7.3, 2.5.12, 2.6.9.
CVE-2018-16859 at a Glance
Security Impact
CVSS: 4.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2018-16859
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.
pip install ansible>=2.7.3
pip install ansible>=2.5.12
pip install ansible>=2.6.9
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-2018-16859, 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.7.3), 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
CVE-2018-16859 Affected Ansible Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ansible
|
PyPI |
≥ 2.7.0a1
< 2.7.3
|
2.7.3
|
|
ansible
|
PyPI |
< 2.5.12
|
2.5.12
|
|
ansible
|
PyPI |
≥ 2.6.0a1
< 2.6.9
|
2.6.9
|
References
Frequently Asked Questions
What is CVE-2018-16859?
Which Ansible versions are affected?
What version fixes CVE-2018-16859?
Is ansible affected?
What is the CVSS score of CVE-2018-16859?
What CWE is associated with CVE-2018-16859?
How can I check PyPI dependencies for CVE-2018-16859?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v735-2pp6-h86r",
"modified" : "2024-09-04T19:38:45Z",
"published" : "2022-05-14T01:14:00Z",
"aliases" : [ "CVE-2018-16859" ],
"summary" : "Ansible Logs Passwords If PowerShell ScriptBlock is Enabled",
"details" : "Execution of Ansible playbooks on Windows platforms with PowerShell ScriptBlock logging and Module logging enabled can allow for 'become' passwords to appear in EventLogs in plaintext. A local user with administrator privileges on the machine can view these logs and discover the plaintext password. Ansible Engine 2.8 and older are believed to be vulnerable.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:H/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.7.0a1"
}, {
"fixed" : "2.7.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "ansible"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.5.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "ansible"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.6.0a1"
}, {
"fixed" : "2.6.9"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-16859"
}, {
"type" : "WEB",
"url" : "https://github.com/ansible/ansible/pull/49142"
}, {
"type" : "WEB",
"url" : "https://github.com/ansible/ansible/commit/0d746b4198abf84290a093b83cf02b4203d73d9f"
}, {
"type" : "WEB",
"url" : "https://github.com/ansible/ansible/commit/2f8d3fcf41107efafc14d51ab6e14531ca8f8c87"
}, {
"type" : "WEB",
"url" : "https://github.com/ansible/ansible/commit/4d748d34f9392aa469da00a85c8e2d5fe6cec52b"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3770"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3771"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3772"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3773"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16859"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ansible/ansible"
}, {
"type" : "WEB",
"url" : "https://github.com/ansible/ansible/blob/v2.5.13/changelogs/CHANGELOG-v2.5.rst"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2018-60.yaml"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200227102121/http://www.securityfocus.com/bid/106004"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00021.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00077.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00020.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-22T22:07:45Z",
"nvd_published_at" : "2018-11-29T18:29:00Z"
}
}