CVE-2017-16615: YAML Parsing Arbitrary Command Execution in MLAlchemy

mlalchemy Updated 02 Oct 2025

Summary

08/11/2017
Yes i
Critical
9.8

CVE-2017-16615: An exploitable vulnerability exists in the YAML parsing functionality in the parse_yaml_query method in parser.py in MLAlchemy before 0.2.2. Affects mlalchemy across 2 version ranges.

< 0.2.2 < bc795757febdcce430d89f9d08f75c32d6989d3c

Fixed in bc795757febdcce430d89f9d08f75c32d6989d3c. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

MLAlchemy is a Python package available on PyPI that provides functionality for processing YAML-based queries for data. It is commonly used in machine learning applications. MLAlchemy allows users to load and parse YAML files to extract data for further processing. However, a vulnerability exists in the YAML parsing functionality of MLAlchemy versions before 0.2.2, which can lead to arbitrary command execution. This vulnerability arises due to the use of the 'load' function instead of the safer 'safe_load' function when processing YAML queries. An attacker can exploit this vulnerability by inserting malicious Python code into loaded YAML, which will be executed during the parsing process.

Vulnerability Detail

The vulnerability in MLAlchemy allows an attacker to execute arbitrary Python commands by manipulating the loaded YAML data. By injecting malicious Python code into a YAML file, an attacker can trigger the execution of the code during the parsing process. This can lead to various security risks, including unauthorized access, data manipulation, and remote code execution. The vulnerability affects MLAlchemy versions prior to 0.2.2.

How To Fix

Minimum fixed version

bc795757febdcce430d89f9d08f75c32d6989d3c

This is the first release that contains the fix.

pip install --upgrade "mlalchemy==bc795757febdcce430d89f9d08f75c32d6989d3c"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version of MLAlchemy is not immediately feasible, a temporary workaround can be implemented by manually validating and sanitizing the loaded YAML data. This involves inspecting the YAML file for any suspicious or potentially malicious code and removing or neutralizing it before parsing. However, this workaround is not recommended as it relies on manual inspection and may not provide complete protection against all possible attack vectors.

Conclusion

The vulnerability in MLAlchemy versions prior to 0.2.2 allows for arbitrary command execution through manipulated YAML data. To mitigate this vulnerability, it is crucial to upgrade to MLAlchemy version 0.2.2 or later. This ensures the usage of the safer 'safe_load' function for YAML parsing. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for mlalchemy →

Share this vulnerability

FAQ

MLAlchemy is a Python package used for processing YAML-based queries for data, particularly in machine learning applications.

The vulnerability allows an attacker to execute arbitrary Python commands by manipulating the loaded YAML data. This can lead to unauthorized access, data manipulation, and remote code execution.

MLAlchemy versions prior to 0.2.2 are affected by this vulnerability.

To fix this vulnerability, upgrade to MLAlchemy version 0.2.2 or later, where the vulnerable code has been fixed.

A temporary workaround involves manually validating and sanitizing the loaded YAML data. However, this workaround is not recommended as it may not provide complete protection.

How To Fix

Minimum fixed version

bc795757febdcce430d89f9d08f75c32d6989d3c

This is the first release that contains the fix.

pip install --upgrade "mlalchemy==bc795757febdcce430d89f9d08f75c32d6989d3c"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback