Critical severity9.8NVD Advisory· Published Nov 8, 2017· Updated May 13, 2026
CVE-2017-16615
CVE-2017-16615
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.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
MLAlchemyPyPI | < 0.2.2 | 0.2.2 |
Affected products
5cpe:2.3:a:mlalchemy_project:mlalchemy:0.1.1:*:*:*:*:*:*:*+ 4 more
- cpe:2.3:a:mlalchemy_project:mlalchemy:0.1.1:*:*:*:*:*:*:*
- cpe:2.3:a:mlalchemy_project:mlalchemy:0.1.2:*:*:*:*:*:*:*
- cpe:2.3:a:mlalchemy_project:mlalchemy:0.1.3:*:*:*:*:*:*:*
- cpe:2.3:a:mlalchemy_project:mlalchemy:0.2.0:*:*:*:*:*:*:*
- cpe:2.3:a:mlalchemy_project:mlalchemy:0.2.1:*:*:*:*:*:*:*
Patches
1bc795757febdattempting to fix security flaw (issue #1)
2 files changed · +22 −1
mlalchemy/parser.py+1 −1 modified@@ -33,7 +33,7 @@ def parse_yaml_query(yaml_content): On success, the processed MLQuery object. """ logger.debug("Attempting to parse YAML content:\n%s" % yaml_content) - return parse_query(yaml.load(yaml_content)) + return parse_query(yaml.safe_load(yaml_content)) def parse_json_query(json_content):
tests/test_yaml_security.py+21 −0 added@@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +from __future__ import unicode_literals + +import unittest +import yaml + +from mlalchemy import * +from mlalchemy.testing import MLAlchemyTestCase + + +class TestYamlSecurity(MLAlchemyTestCase): + + def test_basic_yaml_security(self): + with self.assertRaises(yaml.constructor.ConstructorError): + parse_yaml_query('!!python/object/apply:os.system ["echo Hello"]') + + +if __name__ == "__main__": + unittest.main() +
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
7- github.com/advisories/GHSA-xpm8-98mx-h4c5ghsaADVISORY
- joel-malwarebenchmark.github.io/blog/2017/11/08/cve-2017-16615-critical-restful-web-applications-vulnerability/nvdThird Party Advisory
- nvd.nist.gov/vuln/detail/CVE-2017-16615ghsaADVISORY
- github.com/pypa/advisory-database/tree/main/vulns/mlalchemy/PYSEC-2017-19.yamlghsaWEB
- github.com/thanethomson/MLAlchemy/commit/bc795757febdcce430d89f9d08f75c32d6989d3cnvdIssue TrackingWEB
- github.com/thanethomson/MLAlchemy/issues/1nvdIssue TrackingWEB
- joel-malwarebenchmark.github.io/blog/2017/11/08/cve-2017-16615-critical-restful-web-applications-vulnerabilityghsaWEB
News mentions
0No linked articles in our index yet.