CVE-2020-1737 Path Traversal in Ansible

High 7.5 Published Updated

An attacker can exploit path traversal in Ansible's win_unzip module to write files outside the destination directory, potentially leading to code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-1737?

CVE-2020-1737 is a high-severity path traversal vulnerability in Redhat Ansible Tower, published on 9 Mar 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

A flaw was found in Ansible 2.7.17 and prior, 2.8.9 and prior, and 2.9.6 and prior when using the Extract-Zip function from the win_unzip module as the extracted file(s) are not checked if they belong to the destination folder. An attacker could take advantage of this flaw by crafting an archive anywhere in the file system, using a path traversal. This issue is fixed in 2.10.

Weakness: CWE-22

Which versions are affected by CVE-2020-1737?

7 open source packages ship an affected version, including ansible. It affects 2 products.

PackageAffectedFixed in
ansible PyPIAll versions2.7.17, 2.8.9, 2.9.6
ansible PyPIAll versions2.7.17
ansible PyPIAll versions2.7.17
ansible PyPIFrom 2.8.0a12.8.9
ansible PyPIFrom 2.8.0a12.8.9
ansible PyPIFrom 2.9.0a12.9.6
1 more packages
ansible PyPIFrom 2.9.0a12.9.6

Products include Redhat Ansible Engine, Redhat Ansible Tower.

How do I fix CVE-2020-1737?

Upgrade ansible to a fixed version for your release line: 2.7.17, 2.8.9 or 2.9.6.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2020-1737 being exploited?

There is no known exploitation of CVE-2020-1737 in the wild and no public exploit code.

All Redhat Ansible Tower vulnerabilities

Sources

Also known as ALPINE-CVE-2020-1737, DEBIAN-CVE-2020-1737, GHSA-893h-35v4-mxqx, PYSEC-2020-9, UBUNTU-CVE-2020-1737.

Is CVE-2020-1737 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free