Moderate
CVE-2020-14343
CVE ID
AttackerKB requires a CVE ID in order to pull vulnerability data and references from the CVE list and the National Vulnerability Database. If available, please supply below:
Add References:
CVE-2020-14343
MITRE ATT&CK
Collection
Command and Control
Credential Access
Defense Evasion
Discovery
Execution
Exfiltration
Impact
Initial Access
Lateral Movement
Persistence
Privilege Escalation
Topic Tags
Description
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.
Add Assessment
Ratings
-
Attacker ValueMedium
-
ExploitabilityHigh
Technical Analysis
Overview
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.
Details
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.
Solution
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 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.
Would you also like to delete your Exploited in the Wild Report?
Delete Assessment Only Delete Assessment and Exploited in the Wild ReportCVSS V3 Severity and Metrics
General Information
Vendors
- oracle,
- pyyaml
Products
- communications cloud native core network function cloud native environment 1.10.0,
- communications cloud native core network function cloud native environment 22.1.0,
- pyyaml
References
Additional Info
Technical Analysis
Report as Emergent Threat Response
Report as Exploited in the Wild
CVE ID
AttackerKB requires a CVE ID in order to pull vulnerability data and references from the CVE list and the National Vulnerability Database. If available, please supply below: