{"id":"CVE-2020-1740","published":"2020-03-16T15:07:11Z","modified":"2024-08-04T06:46:30Z","title":"A flaw was found in Ansible Engine when using Ansible Vault for editing encrypted files","vendor":"Red Hat","product":"ansible","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.9,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00351,"percentile":0.29566,"provenance":"source"},"cwes":[{"id":"CWE-377","name":null}],"references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2020-1740","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ansible/ansible/issues/67798","tags":["x_refsource_CONFIRM"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WQVOQD4VAIXXTVQAJKTN7NUGTJFE2PCB/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DKPA4KC3OJSUFASUYMG66HKJE7ADNGFW/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MRRYUU5ZBLPBXCYG6CFP35D64NP2UB2S/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.debian.org/debian-lts-announce/2020/05/msg00005.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://security.gentoo.org/glsa/202006-11","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://www.debian.org/security/2021/dsa-4950","tags":["vendor-advisory","x_refsource_DEBIAN"]}],"priority":{"score":8.6,"factors":[{"name":"EPSS percentile","points":5.91},{"name":"CVSS severity","points":2.73}]},"vendorSlug":"red-hat","affectedVersions":[{"vendor":"Red Hat","product":"ansible","versions":["2.7.x, 2.8.x, 2.9.x"]}],"affected":[{"ecosystem":"PyPI","package":"ansible","vulnerableRanges":["<2.7.17",">=2.8.0a1, <2.8.11",">=2.9.0a1, <2.9.7",">=2.8.0, <2.8.9",">=2.9.0, <2.9.6"],"patched":["2.7.17","2.8.11","2.9.7","2.8.9","2.9.6"],"from":["GHSA-vcg8-98q8-g7mj","PYSEC-2020-12"],"provenance":"source"}],"summary":{"text":"A flaw in Ansible Engine's Ansible Vault \"edit\" functionality causes secrets to be written to a temporary file that is deleted and then recreated insecurely, exposing both the old and new secret. An attacker with local access to the same machine can read these secrets when another user runs \"ansible-vault edit\", and this requires a high-complexity race-style condition, low privileges on the system, and user interaction by the victim.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:11:39Z"},"euvd":{"id":"EUVD-2020-0005","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-red-hat-ansible-cve-2020-1740","children":[{"from":"CVE-2020-1740","to":"CVE-2020-10685","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/ansible/parsing/vault/__init__.py"],"commits":["https://github.com/ansible/ansible/commit/4e1fe80e681fa466626e9dea53efe6b0253ea1b2","https://github.com/ansible/ansible/commit/51d2514753544a9d58cd7524e27e696b2c944fb5","https://github.com/ansible/ansible/commit/28f9fbdb5e281976e33f443193047068afb97a9b","https://github.com/ansible/ansible/commit/2a563514f070a0a8ba64aebf6bce21194be96c73"],"basis":"rarely changed file"}]}]}}