CVE-2021-20228: Ansible Exposes Sensitive Information
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.30871%
CWE
Published
5/25/2022
Updated
9/9/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
ansible | pip | >= 2.10.0a1, < 2.10.6rc1 | 2.10.6rc1 |
ansible | pip | >= 2.9.0a1, < 2.9.18rc1 | 2.9.18rc1 |
ansible | pip | < 2.8.19rc1 | 2.8.19rc1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from 2 key functions in basic.py:
- _set_defaults: Pre-patch code didn't check if parameters had 'no_log=True' when setting defaults, leaving sensitive default values unmasked
- _set_fallbacks: Pre-patch implementation didn't capture fallback return values (like from env_fallback) to mask them via no_log_values
The commit diff shows these functions were modified to add no_log checks and mask values. The added tests specifically validate that default/fallback values for no_log parameters are masked, confirming these were the vulnerable points.