CVE-2017-16615 Unsafe deserialization in MLAlchemy
An attacker can execute arbitrary Python commands by inserting malicious code into YAML queries processed by the MLAlchemy 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-2017-16615?
CVE-2017-16615 is a critical unsafe deserialization 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 parse_yaml_query method in parser.py in MLAlchemy before 0.2.2. When processing YAML-Based queries for data, 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-16615?
3 open source packages ship an affected version, including mlalchemy and MLAlchemy. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
mlalchemy PyPI | All versions | 0.2.2 |
mlalchemy PyPI | All versions | 0.2.2 |
MLAlchemy PyPI | All versions | 0.2.2 |
Products include Mlalchemy Project Mlalchemy.
How do I fix CVE-2017-16615?
Upgrade mlalchemy to 0.2.2 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2017-16615 being exploited?
There is no known exploitation of CVE-2017-16615 in the wild and no public exploit code.
Sources
Also known as GHSA-xpm8-98mx-h4c5, PYSEC-2017-19.