Skip to content

GHSA-f556-49jc-4rvc CVE-2020-25635 PYSEC-2020-220

Ansible does not collect garbage after playbook run

Medium PyPI
Severity
5.0 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.32%
Chance of exploitation in the next 30 days. Higher than 24.85% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-212 Improper Removal of Sensitive Information Before Storage or Transfer
Fix
2.10.1
Upgrade ansible to this version or later

Description

A flaw was found in Ansible Base when using the aws_ssm connection plugin as its garbage collector is not happening after the playbook run is completed. Files would remain in the bucket exposing the data. This issue directly affects data confidentiality.

Affected versions

PyPI

PackageVulnerableFixed in
ansible
< 2.10.1
2.10.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

ansible PyPI → 2.10.1

pip
pip install --upgrade "ansible>=2.10.1"
poetry
poetry add "ansible>=2.10.1"
uv
uv add "ansible>=2.10.1"

Severity breakdown

CVSS 3.1 5.0

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Weakness

CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer

The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors.

How to prevent it
  • Requirements: Clearly specify which information should be regarded as private or sensitive, and require that the product offers functionality that allows the user to cleanse the sensitive information from the resource before it is published or exported to other parties.
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
  • Implementation, Operation: Some tools can automatically analyze documents to redact, strip, or "sanitize" private information, although some human review might be necessary. Tools may vary in terms of which document formats can be processed. When calling an external program to automatically generate or convert documents, invoke the program with any available options that avoid generating sensitive metadata. Some formats have well-defined fields that could contain private data, such as Exchangeable image file format (Exif), which can contain potentially sensitive metadata such as geolocation, date, and time [REF-1515] [REF-1516].
  • Implementation: Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.
  • Implementation: Avoid errors related to improper resource shutdown or release (CWE-404), which may leave the sensitive data within the resource if it is in an incomplete state.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-8ggh-xwr9-3373
Ansible Community General Collection is vulnerable to exposure of sensitive information
Medium Also affects ansible
GHSA-jpvw-p8pr-9g2x
Ansible symlink attack vulnerability
Medium Also affects ansible
GHSA-cpx3-93w7-457x
Ansible leaks password to logs
High Also affects ansible
GHSA-fh5v-5f35-2rv2
Insertion of Sensitive Information into Log File in ansible
Medium Also affects ansible
GHSA-4r65-35qq-ch8j
Ansible discloses sensitive information in traceback error message
Medium Also affects ansible
GHSA-2pfh-q76x-gwvm
Improper Input Validation and Command Injection in Ansible
High Also affects ansible
PYSEC-2021-126
A flaw was found in Ansible if an ansible user sets ANSIBLE_ASYNC_DIR to a subdirectory of a world writable directory.
Not rated yet Also affects ansible
GHSA-r6h7-5pq2-j77h
Insufficiently random values in Ansible
Medium Also affects ansible
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor