Moderate severityNVD Advisory· Published Sep 11, 2020· Updated Aug 4, 2024
CVE-2020-14330
CVE-2020-14330
Description
An Improper Output Neutralization for Logs flaw was found in Ansible when using the uri module, where sensitive data is exposed to content and json output. This flaw allows an attacker to access the logs or outputs of performed tasks to read keys used in playbooks from other users within the uri module. The highest threat from this vulnerability is to data confidentiality.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
ansiblePyPI | < 2.10.0 | 2.10.0 |
Affected products
1Patches
1e0f25a2b1f9eStrip no log values from module response keys. Fixes #68400 (#69653)
4 files changed · +22 −2
changelogs/fragments/68400-strip-no-log-values-from-keys.yml+2 −0 added@@ -0,0 +1,2 @@ +bugfixes: +- Strip no log values from module response keys (https://github.com/ansible/ansible/issues/68400)
lib/ansible/module_utils/basic.py+2 −1 modified@@ -410,8 +410,9 @@ def remove_values(value, no_log_strings): old_data, new_data = deferred_removals.popleft() if isinstance(new_data, Mapping): for old_key, old_elem in old_data.items(): + new_key = _remove_values_conditions(old_key, no_log_strings, deferred_removals) new_elem = _remove_values_conditions(old_elem, no_log_strings, deferred_removals) - new_data[old_key] = new_elem + new_data[new_key] = new_elem else: for elem in old_data: new_elem = _remove_values_conditions(elem, no_log_strings, deferred_removals)
test/integration/targets/uri/tasks/main.yml+12 −0 modified@@ -544,6 +544,18 @@ that: - result.json.json[0] == 'JSON Test Pattern pass1' +- name: Make request that includes password in JSON keys + uri: + url: "https://{{ httpbin_host}}/get?key-password=value-password" + user: admin + password: password + register: sanitize_keys + +- name: assert that keys were sanitized + assert: + that: + - sanitize_keys.json.args['key-********'] == 'value-********' + - name: Create a testing file copy: content: "content"
test/units/module_utils/basic/test_no_log.py+6 −1 modified@@ -105,13 +105,18 @@ class TestRemoveValues(unittest.TestCase): 'three': [ OMIT, 'musketeers', None, { 'ping': OMIT, - 'base': [ + OMIT: [ OMIT, 'raquets' ] } ] } ), + ( + {'key-password': 'value-password'}, + frozenset(['password']), + {'key-********': 'value-********'}, + ), ( 'This sentence has an enigma wrapped in a mystery inside of a secret. - mr mystery', frozenset(['enigma', 'mystery', 'secret']),
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- github.com/advisories/GHSA-785x-qw4v-6872ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2020-14330ghsaADVISORY
- www.debian.org/security/2021/dsa-4950ghsavendor-advisoryWEB
- bugzilla.redhat.com/show_bug.cgighsaWEB
- github.com/ansible/ansible/commit/e0f25a2b1f9e6c21f751ba0ed2dc2eee2152983eghsaWEB
- github.com/ansible/ansible/issues/68400ghsaWEB
- github.com/ansible/ansible/pull/69653ghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2020-3.yamlghsaWEB
News mentions
0No linked articles in our index yet.