Arbitrary Code Execution Affecting mlalchemy package, versions [,0.2.2)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
3.45% (89th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-MLALCHEMY-40700
  • published28 Nov 2017
  • disclosed6 Nov 2017
  • creditJoel-MalwareBenchmark

Introduced: 6 Nov 2017

CVE-2017-16615  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade mlalchemy to version 0.2.2 or higher.

Overview

mlalchemy is a library for converting YAML/JSON to SQLAlchemy SELECT queries.

Affected versions of the package are vulnerable to Arbitrary Code Execution. 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.

CVSS Base Scores

version 3.1