Insecure Temporary File Affecting ansible-test package, versions <0:2.9.7-1.el8ae


Severity

Recommended
high

Based on Red Hat Enterprise Linux security rating.

Threat Intelligence

EPSS
0.05% (21st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Insecure Temporary File vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RHEL8-ANSIBLETEST-4403899
  • published26 Mar 2023
  • disclosed18 Feb 2020

Introduced: 18 Feb 2020

CVE-2020-1740  (opens in a new tab)
CWE-377  (opens in a new tab)

How to fix?

Upgrade RHEL:8 ansible-test to version 0:2.9.7-1.el8ae or higher.
This issue was patched in RHSA-2020:1541.

NVD Description

Note: Versions mentioned in the description apply only to the upstream ansible-test package and not the ansible-test package as distributed by RHEL. See How to fix? for RHEL:8 relevant fixed versions and status.

A flaw was found in Ansible Engine when using Ansible Vault for editing encrypted files. When a user executes "ansible-vault edit", another user on the same computer can read the old and new secret, as it is created in a temporary file with mkstemp and the returned file descriptor is closed and the method write_data is called to write the existing secret in the file. This method will delete the file before recreating it insecurely. All versions in 2.7.x, 2.8.x and 2.9.x branches are believed to be vulnerable.

CVSS Scores

version 3.1