GHSA-77g3-3j5w-64w4 CVE-2020-10685 PYSEC-2020-1
Exposure of Resource to Wrong Sphere and Insecure Temporary File in Ansible
- Severity
- 0.0 / 10
- Medium · CVSS 4.0
- Exploit chance (EPSS)
- 0.36%
- Chance of exploitation in the next 30 days. Higher than 30.25% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-377 Insecure Temporary File
- CWE-459 Incomplete Cleanup
- CWE-668 Exposure of Resource to Wrong Sphere
- Fix
2.7.17- Upgrade ansible to this version or later
Description
A flaw was found in Ansible Engine affecting Ansible Engine versions 2.7.x before 2.7.17 and 2.8.x before 2.8.11 and 2.9.x before 2.9.7 as well as Ansible Tower before and including versions 3.4.5 and 3.5.5 and 3.6.3 when using modules which decrypts vault files such as assemble, script, unarchive, win_copy, aws_s3 or copy modules. The temporary directory is created in /tmp leaves the s ts unencrypted. On Operating Systems which /tmp is not a tmpfs but part of the root partition, the directory is only cleared on boot and the decryp emains when the host is switched off. The system will be vulnerable when the system is not running. So decrypted data must be cleared as soon as possible and the data which normally is encrypted ble.
Affected versions
PyPI
| Package | Vulnerable | Fixed in |
|---|---|---|
| ansible | >= 2.7.0a1, < 2.7.17 |
2.7.17 |
| ansible | >= 2.8.0a1, < 2.8.11 |
2.8.11 |
| ansible | >= 2.9.0a1, < 2.9.7 |
2.9.7 |
| ansible | >= 2.7.0, < 2.7.17>= 2.8.0, < 2.8.11>= 2.9.0, < 2.9.7 |
2.7.172.8.112.9.7 |
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.7.17
- pip
pip install --upgrade "ansible>=2.7.17"- poetry
poetry add "ansible>=2.7.17"- uv
uv add "ansible>=2.7.17"
Severity breakdown
CVSS 4.0 0.0
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- Attack vector
- Local
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- Low
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- None
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
CVSS 3.1 5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Weakness
CWE-377: Insecure Temporary File
Creating and using insecure temporary files can leave application and system data vulnerable to attack.
CWE-459: Incomplete Cleanup
The product does not properly "clean up" and remove temporary or supporting resources after they have been used.
How to prevent it
- Architecture and Design, Implementation: Temporary files and other supporting resources should be deleted/released immediately after they are no longer needed.
CWE-668: Exposure of Resource to Wrong Sphere
The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.
References
Advisories
Packages
Other links
- github.com/ansible/ansible/pull/68433
- github.com/ansible/ansible/commit/4e1fe80e681fa466626e9dea53efe6b0253ea1b2
- github.com/ansible/ansible/commit/51d2514753544a9d58cd7524e27e696b2c944fb5
- github.com/ansible/ansible/commit/e1273b6faf036ed84e4f4edee85b888a4e256aee
- bugzilla.redhat.com/show_bug.cgi
- github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2020-1.yaml
- security.gentoo.org/glsa/202006-11
- debian.org/security/2021/dsa-4950
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why 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 |
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