9.8 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
10 High
CVSS2
Access Vector
NETWORK
Access Complexity
LOW
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:L/Au:N/C:C/I:C/A:C
A vulnerability was discovered in the PyYAML library in versions before 5.4, where it is susceptible to arbitrary code execution when it processes untrusted YAML files through the full_load method or with the FullLoader loader. Applications that use the library to process untrusted input may be vulnerable to this flaw. This flaw allows an attacker to execute arbitrary code on the system by abusing the python/object/new constructor. This flaw is due to an incomplete fix for CVE-2020-1747.
Recent assessments:
zeroSteiner at October 29, 2020 1:51pm UTC reported:
The PyYAML library contains a vulnerability where an attacker with control over data which is loaded using the load
function can trigger arbitrary Python code execution. The latest version as of this writing (5.3.1) is affected. PyYAML version 4.1 changed the default load to use safe_load
by default, however this was reverted in the 4.2 release. Later, in version 5.1 the PyYAML project implemented a new default FullLoader
class which prevented function calls but is in sufficient to prevent code execution.
The latest versions of PyYAML (5.1+) use a default loader implementation that allow deserialization of objects and references but not functions. The builtin map
is a class in Python3 and can be used to apply the builtin eval
function to indirectly trigger a function call.
!!python/object/new:tuple
- !!python/object/new:map
- !!python/name:eval
- [ "RCE_HERE" ]
An attacker looking to leverage this vulnerability would need to identify that YAML is loaded by the application and then submit their crafted data to be loaded.
The PyYAML library contains a two primary alternatives to load data safely. The first is to use the load_safe
alternative, the second is to specify the SafeLoader
class as the Loader
keyword argument to the standard load
function. This is detailed in the PyYAML-Deprecation) Wiki page. Developers using PyYAML should use one of these safe methods and ensure that they are not loading data from untrusted sources.
See: <https://blog.arxenix.dev/pyyaml-cve/> for more information.
Assessed Attacker Value: 3
Assessed Attacker Value: 3Assessed Attacker Value: 4
9.8 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
10 High
CVSS2
Access Vector
NETWORK
Access Complexity
LOW
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:L/Au:N/C:C/I:C/A:C