# CVE-2018-16876: Ansible sensitive information disclosure

> Attackers can leak sensitive data when using verbose mode with logging disabled in Ansible, requiring an upgrade to secure configurations.

- **Severity:** Low 3.1 (`CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Jan 2019
- **Updated:** 5 Aug 2024
- **Also known as:** ALPINE-CVE-2018-16876, DEBIAN-CVE-2018-16876, GHSA-j569-fghw-f9rx, MGASA-2019-0023, PYSEC-2019-141, RHSA-2018:3835, RHSA-2018:3836, RHSA-2018:3837, RHSA-2018:3838, UBUNTU-CVE-2018-16876

## What is CVE-2018-16876?

CVE-2018-16876 is a low-severity vulnerability in Canonical Ubuntu Linux, published on 3 Jan 2019. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

ansible before versions 2.5.14, 2.6.11, 2.7.5 is vulnerable to a information disclosure flaw in vvv+ mode with no_log on that can lead to leakage of sensible data.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2018-16876?

7 open source packages ship an affected version, including ansible. It affects 9 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ansible` | PyPI | All versions | 2.5.14 |
| `ansible` | PyPI | All versions | 2.5.14 |
| `ansible` | PyPI | From 2.5.0 | 2.5.14, 2.6.11, 2.7.5 |
| `ansible` | PyPI | From 2.6.0a1 | 2.6.11 |
| `ansible` | PyPI | From 2.6.0a1 | 2.6.11 |
| `ansible` | PyPI | From 2.7.0a1 | 2.7.5 |
| `ansible` | PyPI | From 2.7.0a1 | 2.7.5 |
| `ansible` | Red Hat:ansible_engine:2.5::el7 | All versions | 0:2.5.14-1.el7ae |
| `ansible-doc` | Red Hat:ansible_engine:2.5::el7 | All versions | 0:2.5.14-1.el7ae |
| `ansible` | Red Hat:ansible_engine:2.6::el7 | All versions | 0:2.6.11-1.el7ae |
| `ansible` | Red Hat:ansible_engine:2.7::el7 | All versions | 0:2.7.5-1.el7ae |
| `ansible` | Red Hat:ansible_engine:2::el7 | All versions | 0:2.7.5-1.el7ae |

Products: Canonical Ubuntu Linux, Debian Debian Linux, Redhat Ansible, Redhat Ansible Engine, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Server, Redhat Enterprise Linux Workstation, Redhat Openstack, Suse Package Hub.

## How do I fix CVE-2018-16876?

Upgrade ansible to a fixed version for your release line: 2.5.14, 2.6.11 or 2.7.5.

## Is CVE-2018-16876 being exploited?

There is no known exploitation of CVE-2018-16876 in the wild and no public exploit code.

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11651](https://insights.sbomify.com/CVE-2020-11651/): SaltStack Salt Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2020-7247](https://insights.sbomify.com/CVE-2020-7247/): OpenSMTPD Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2019-16928](https://insights.sbomify.com/CVE-2019-16928/): Exim Out-of-bounds Write (critical 9.8, exploited in the wild)
- [CVE-2018-6789](https://insights.sbomify.com/CVE-2018-6789/): Exim Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2015-2590](https://insights.sbomify.com/CVE-2015-2590/): Oracle Java SE and Java SE Embedded Remote Code Execution (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-16876 and fix it if it is affected.

What it is: CVE-2018-16876 is a low-severity vulnerability in Canonical Ubuntu Linux, published on 3 Jan 2019. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-16876 in the wild and no public exploit code.

Affected packages and fixed versions:
- ansible (PyPI): affected all versions; fixed in 2.5.14
- ansible (PyPI): affected all versions; fixed in 2.5.14
- ansible (PyPI): affected from 2.5.0; fixed in 2.5.14, 2.6.11, 2.7.5
- ansible (PyPI): affected from 2.6.0a1; fixed in 2.6.11
- ansible (PyPI): affected from 2.6.0a1; fixed in 2.6.11
- ansible (PyPI): affected from 2.7.0a1; fixed in 2.7.5
- ansible (PyPI): affected from 2.7.0a1; fixed in 2.7.5

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-16876/ (Markdown: https://insights.sbomify.com/CVE-2018-16876/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-16876
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-16876
- OSV: https://osv.dev/vulnerability/CVE-2018-16876

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-16876/
Summaries are generated and may contain mistakes; the official description above is the record.
