CVE-2017-16616 Unsafe pyyaml load usage in PyAnyAPI
Attackers can execute arbitrary Python commands via malicious YAML input due to unsafe parsing in PyAnyAPI.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2017-16616?
CVE-2017-16616 is a critical code injection vulnerability in n/a, published on 8 Nov 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An exploitable vulnerability exists in the YAML parsing functionality in the YAMLParser method in Interfaces.py in PyAnyAPI before 0.6.1. A YAML parser can execute arbitrary Python commands resulting in command execution because load is used where safe_load should have been used. An attacker can insert Python into loaded YAML to trigger this vulnerability.
Which versions are affected by CVE-2017-16616?
3 open source packages ship an affected version, including pyanyapi. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pyanyapi PyPI | All versions | 0.6.1 |
pyanyapi PyPI | All versions | 0.6.1 |
pyanyapi PyPI | All versions | 0.6.1 |
Products include Pyanyapi Project Pyanyapi.
How do I fix CVE-2017-16616?
Upgrade pyanyapi to 0.6.1 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2017-16616 being exploited?
There is no known exploitation of CVE-2017-16616 in the wild and no public exploit code.
Sources
Also known as GHSA-vg8g-jpm9-jh8r, PYSEC-2017-23.