Unsafe pyyaml load usage in PyAnyAPI
Date: 2022-05
Affected: pip/pyanyapi
Attack vector: rce
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2017-16616
CWE: CWE-502
CVSS: 9.8 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

An exploitable vulnerability exists in the YAML parsing functionality in the YAMLParser method in Interfaces.py in PyAnyAPI before 0.6.1. 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.


Mitigations:

Architectural layers (MAESTRO):