# CVE-2019-14858: Ansible leaks sensitive information to logs when told not to

> Attackers can view sensitive no_log data in Ansible task output if invalid parameters are passed and verbosity is increased.

- **Severity:** High 7.3 (`CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 14 Oct 2019
- **Updated:** 5 Aug 2024
- **Also known as:** ALPINE-CVE-2019-14858, DEBIAN-CVE-2019-14858, GHSA-h653-95qw-h2mp, PYSEC-2019-171, UBUNTU-CVE-2019-14858

## What is CVE-2019-14858?

CVE-2019-14858 is a high-severity vulnerability in Redhat Ansible Tower, published on 14 Oct 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-532 (Insertion of Sensitive Information into Log File), CWE-117 (Improper Output Neutralization for Logs)

## Which versions are affected by CVE-2019-14858?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ansible` | PyPI | From 2.0 | 2.6.20 |
| `ansible` | PyPI | From 2.0 | 2.6.20 |
| `ansible` | PyPI | From 2.0 | 2.8.1 |
| `ansible` | PyPI | From 2.7.0a1 | 2.7.14 |
| `ansible` | PyPI | From 2.7.0a1 | 2.7.14 |
| `ansible` | PyPI | From 2.8.0a1 | 2.8.6 |
| `ansible` | PyPI | From 2.8.0a1 | 2.8.6 |
| `ansible` | PyPI | From 2.9.0a1 | 2.9.0rc4 |
| `ansible` | PyPI | From 2.9.0a1 | 2.9.0rc4 |

Products: Redhat Ansible Engine, Redhat Ansible Tower.

## How do I fix CVE-2019-14858?

Upgrade ansible to a fixed version for your release line: 2.6.20, 2.8.1, 2.7.14 or 2.8.6.

## Is CVE-2019-14858 being exploited?

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

## Other vulnerabilities in Redhat Ansible Tower

- [CVE-2018-10874](https://insights.sbomify.com/CVE-2018-10874/): Ansible Improper Input Validation vulnerability (high 7.8)
- [CVE-2020-1737](https://insights.sbomify.com/CVE-2020-1737/): Path Traversal in Ansible (high 7.5)
- [CVE-2020-1734](https://insights.sbomify.com/CVE-2020-1734/): OS Command Injection in ansible (high 7.4)
- [CVE-2020-10691](https://insights.sbomify.com/CVE-2020-10691/): Path Traversal in Ansible (medium 5.2)
- [CVE-2018-16859](https://insights.sbomify.com/CVE-2018-16859/): Ansible Logs Passwords If PowerShell ScriptBlock is Enabled (medium 4.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-14858 and fix it if it is affected.

What it is: CVE-2019-14858 is a high-severity vulnerability in Redhat Ansible Tower, published on 14 Oct 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-14858 in the wild and no public exploit code.

Affected packages and fixed versions:
- ansible (PyPI): affected from 2.0; fixed in 2.6.20
- ansible (PyPI): affected from 2.0; fixed in 2.6.20
- ansible (PyPI): affected from 2.0; fixed in 2.8.1
- ansible (PyPI): affected from 2.7.0a1; fixed in 2.7.14
- ansible (PyPI): affected from 2.7.0a1; fixed in 2.7.14
- ansible (PyPI): affected from 2.8.0a1; fixed in 2.8.6
- ansible (PyPI): affected from 2.8.0a1; fixed in 2.8.6
- ansible (PyPI): affected from 2.9.0a1; fixed in 2.9.0rc4
- ansible (PyPI): affected from 2.9.0a1; fixed in 2.9.0rc4

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-2019-14858/ (Markdown: https://insights.sbomify.com/CVE-2019-14858/index.md)
```

## Sources

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

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