VYPR
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.

PackageAffected versionsPatched versions
MLAlchemyPyPI
< 0.2.20.2.2

Affected products

5
  • cpe: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

1
bc795757febd

attempting to fix security flaw (issue #1)

https://github.com/thanethomson/MLAlchemyThane ThomsonNov 7, 2017via ghsa
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

News mentions

0

No linked articles in our index yet.