CVE-2019-20477 Deserialization of Untrusted Data in PyYAML
Attackers can execute arbitrary code via unsafe deserialization in PyYAML's load functions, affecting applications using this library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2019-20477?
CVE-2019-20477 is a critical unsafe deserialization vulnerability in Fedoraproject Fedora, published on 19 Feb 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-502
Which versions are affected by CVE-2019-20477?
3 open source packages ship an affected version, including pyyaml. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
pyyaml PyPI | From 5.1 | 5.2 |
pyyaml PyPI | From 5.1 | 5.2 |
pyyaml PyPI | From 5.1 | 5.2b1 |
Products include Fedoraproject Fedora, Pyyaml Pyyaml.
How do I fix CVE-2019-20477?
Upgrade pyyaml to a fixed version for your release line: 5.2 or 5.2b1.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2019-20477 being exploited?
There is no known exploitation of CVE-2019-20477 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as DEBIAN-CVE-2019-20477, GHSA-3pqx-4fqf-j49f, PYSEC-2020-176.