# CVE-2020-1747: Improper Input Validation in PyYAML

Source: https://junglewise.ai/threats/cve-2020-1747-improper-input-validation-in-pyyaml  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-03-24  
License: CC BY 4.0 with a link back

CVE-2020-1747 · Severity: low · CVSS 3.1 · Published 2020-03-24

A vulnerability was discovered in the PyYAML library in versions before 5.3.1, where it is susceptible to arbitrary code execution when it processes untrusted YAML files through the full_load method or with the FullLoader loader. Applications that use the library to process untrusted input may be vulnerable to this flaw. An attacker could use this flaw to execute arbitrary code on the system by abusing the python/object/new constructor.

Technologies: [PyYAML (PyPI)](https://junglewise.ai/threats/technologies/pyyaml). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2020-1747 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2020-1747 being exploited in the wild.

**How severe is CVE-2020-1747?** Low severity, with a CVSS score of 3.1, published 24 March 2020.

**Which products and versions are affected?** PyYAML (PyPI) ECOSYSTEM:introduced=5.1,fixed=5.3.1, ECOSYSTEM:introduced=5.1b7,fixed=5.3.1.

**Is there a fix for CVE-2020-1747?** Yes. PyYAML (PyPI): upgrade to 5.3.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2020-1747?** Check whether you run PyYAML (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- PyYAML (PyPI): upgrade to 5.3.1 or later

  ```sh
  pip install "PyYAML>=5.3.1"
  ```


## Affected products

- PyYAML (PyPI) ECOSYSTEM:introduced=5.1,fixed=5.3.1, ECOSYSTEM:introduced=5.1b7,fixed=5.3.1

## Identifiers

- CVE-2020-1747
- GHSA-6757-jp84-gxfx
- PYSEC-2020-96

## Related threats

- [Improper Input Validation in PyYAML](https://junglewise.ai/threats/cve-2020-14343-improper-input-validation-in-pyyaml)
- [PyYAML unsafe deserialization in load and load_all](https://junglewise.ai/threats/cve-2019-20477-pyyaml-unsafe-deserialization-in-load-and-load-all)
- [PYSEC-2020-195 - PyYAML 5.1 through 5.1.2 has insufficient restrictions on the load and load_all functions because of…](https://junglewise.ai/threats/pysec-2020-195-pyyaml-5-1-through-5-1-2-has-insufficient-restrictions-52e85ed8)
- [PyYAML insecure deserialization in yaml.load API](https://junglewise.ai/threats/cve-2017-18342-pyyaml-insecure-deserialization-in-yaml-load-api)
