# PYSEC-2020-195 - PyYAML 5.1 through 5.1.2 has insufficient restrictions on the load and load_all functions because of…

Source: https://junglewise.ai/threats/pysec-2020-195-pyyaml-5-1-through-5-1-2-has-insufficient-restrictions-52e85ed8  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2020-02-19  
License: CC BY 4.0 with a link back

Severity: info · Published 2020-02-19

PyYAML 5.1 through 5.1.2 has insufficient restrictions on the load and load_all functions because of a class deserialization issue, e.g., Popen is a class in the subprocess module. NOTE: this issue exists because of an incomplete fix for CVE-2017-18342.

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

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 19 February 2020.

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

**Is there a fix for This vulnerability?** Yes. PyYAML (PyPI): upgrade to 5.2b1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected?** 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.2b1 or later

  ```sh
  pip install "PyYAML>=5.2b1"
  ```


## Affected products

- PyYAML (PyPI) ECOSYSTEM:introduced=5.1,fixed=5.2b1

## Related threats

- [Improper Input Validation in PyYAML](https://junglewise.ai/threats/cve-2020-14343-improper-input-validation-in-pyyaml)
- [Improper Input Validation in PyYAML](https://junglewise.ai/threats/cve-2020-1747-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)
- [PyYAML insecure deserialization in yaml.load API](https://junglewise.ai/threats/cve-2017-18342-pyyaml-insecure-deserialization-in-yaml-load-api)
