Skip to content
Heist/ feed
Back to feed
MediumFix available

ansible, ansible-base — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2020-1740

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.

Products
ansible, ansible-base
Affected versions
Not specified
Fixed versions
2.7.17-r0, 2.8.11-r0, 2.9.7-r0
CVEs
CVE-2020-1740
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 12:05 UTC · Revision 1

Source evidence

ALPINE-CVE-2020-1740

core-osv · Original source

Published 16 Mar 2020, 16:15 UTC

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.

osv:ALPINE-CVE-2020-1740

ansible

Fixed versions: 2.8.11-r0

ansible

Fixed versions: 2.9.7-r0

ansible

Fixed versions: 2.9.7-r0

ansible

Fixed versions: 2.7.17-r0

ansible-base

Fixed versions: 2.9.7-r0

ansible-base

Fixed versions: 2.9.7-r0

Complete source record
{
  "id": "2ef9ab4a191000f55b1c899494883c2f4781ab6ec0f48a8a4283779ef55bfc21",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2020-1740",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2020-1740",
    "summary": "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.",
    "evidence": "osv:ALPINE-CVE-2020-1740",
    "products": [
      {
        "name": {
          "value": "ansible",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.8.11-r0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ansible",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.9.7-r0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ansible",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.9.7-r0",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ansible",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.7.17-r0",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ansible-base",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.9.7-r0",
            "evidence": "/affected/4/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "ansible-base",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.9.7-r0",
            "evidence": "/affected/5/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "ALPINE-CVE-2020-1740",
      "aliases": [
        "ALPINE-CVE-2020-1740"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.8.0"
                },
                {
                  "fixed": "2.8.11-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "ansible",
            "purl": "pkg:apk/alpine/ansible?arch=source",
            "ecosystem": "Alpine:v3.10"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2020-1740.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.8.0"
                },
                {
                  "fixed": "2.9.7-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "ansible",
            "purl": "pkg:apk/alpine/ansible?arch=source",
            "ecosystem": "Alpine:v3.11"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2020-1740.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.8.0"
                },
                {
                  "fixed": "2.9.7-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "ansible",
            "purl": "pkg:apk/alpine/ansible?arch=source",
            "ecosystem": "Alpine:v3.12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2020-1740.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.8.0"
                },
                {
                  "fixed": "2.7.17-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "ansible",
            "purl": "pkg:apk/alpine/ansible?arch=source",
            "ecosystem": "Alpine:v3.9"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2020-1740.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.9.7-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "ansible-base",
            "purl": "pkg:apk/alpine/ansible-base?arch=source",
            "ecosystem": "Alpine:v3.13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2020-1740.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.9.7-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "ansible-base",
            "purl": "pkg:apk/alpine/ansible-base?arch=source",
            "ecosystem": "Alpine:v3.14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2020-1740.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-26T11:17:55.144541930Z",
      "provider": "osv",
      "upstream": [
        "CVE-2020-1740"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2020-1740"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2020-1740",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 450486,
  "published_at": "2020-03-16T16:15:14.217+00:00"
}