BREW-ANSIBLE-CVE-2020-1740 (CVE-2020-1740)
Vulnerability from osv_homebrew – Published: 2026-08-13 16:35 – Updated: 2026-09-10 18:51 – Source websiteA 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.
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"upstream_fixed_in": "2.9.7"
},
"package": {
"ecosystem": "Homebrew",
"name": "ansible",
"purl": "pkg:brew/ansible"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "14.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "git",
"upstream_evidence": [
{
"ecosystem": "GIT",
"key": "https://github.com/ansible/ansible",
"name": "https://github.com/ansible/ansible",
"strategy": "git",
"subject_version": "14.4.0"
},
{
"ecosystem": "PyPI",
"key": "pkg:pypi/ansible@14.4.0",
"name": "ansible",
"strategy": "registry",
"subject_version": "14.4.0"
},
{
"ecosystem": "Debian",
"key": "Debian/ansible",
"name": "ansible",
"strategy": "distro"
},
{
"ecosystem": "GIT",
"key": "upstream:https://github.com/ansible/ansible",
"name": "https://github.com/ansible/ansible",
"strategy": "distro",
"subject_version": "14.4.0"
},
{
"ecosystem": "PyPI",
"key": "upstream:pkg:pypi/ansible@14.4.0",
"name": "ansible",
"strategy": "distro",
"subject_version": "14.4.0"
},
{
"ecosystem": "Ubuntu",
"key": "Ubuntu/ansible",
"name": "ansible",
"strategy": "distro"
}
]
},
"details": "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.",
"id": "BREW-ansible-CVE-2020-1740",
"modified": "2026-09-10T18:51:05Z",
"published": "2026-08-13T16:35:22Z",
"references": [
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DKPA4KC3OJSUFASUYMG66HKJE7ADNGFW/"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MRRYUU5ZBLPBXCYG6CFP35D64NP2UB2S/"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WQVOQD4VAIXXTVQAJKTN7NUGTJFE2PCB/"
},
{
"type": "ADVISORY",
"url": "https://lists.debian.org/debian-lts-announce/2020/05/msg00005.html"
},
{
"type": "ADVISORY",
"url": "https://security.gentoo.org/glsa/202006-11"
},
{
"type": "ADVISORY",
"url": "https://www.debian.org/security/2021/dsa-4950"
},
{
"type": "REPORT",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2020-1740"
},
{
"type": "REPORT",
"url": "https://github.com/ansible/ansible/issues/67798"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"upstream": [
"CVE-2020-1740",
"GHSA-vcg8-98q8-g7mj",
"PYSEC-2020-12"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.