CVE-2017-16616 Unsafe pyyaml load usage in PyAnyAPI

Critical 9.8 Published Updated

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.

PackageAffectedFixed in
pyanyapi PyPIAll versions0.6.1
pyanyapi PyPIAll versions0.6.1
pyanyapi PyPIAll versions0.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.

Is CVE-2017-16616 in your software?

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

Check your SBOMs for free