Improper Input Validation in PyYAML
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | pyyaml | < 5.4 | 5.4 |
References
- https://bugzilla.redhat.com/show_bug.cgi?id=1860466
- https://github.com/advisories/GHSA-8q59-q68h-6hv4
- https://nvd.nist.gov/vuln/detail/CVE-2020-14343
- https://github.com/SeldonIO/seldon-core/issues/2252
- https://github.com/yaml/pyyaml/issues/420
- https://github.com/yaml/pyyaml/issues/420#issuecomment-663673966
- https://github.com/yaml/pyyaml/commit/a001f2782501ad2d24986959f0239a354675f9dc
- https://github.com/pypa/advisory-database/tree/main/vulns/pyyaml/PYSEC-2021-142.yaml
- https://github.com/yaml/pyyaml
- https://pypi.org/project/PyYAML
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-20- Platform
- Python (PyPI)
- Package
pyyaml- Disclosed
- 09.02.2021
- Updated
- 11.10.2026 12:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2021-142 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-8q59-q68h-6hv4 - CC BY 4.0
Vulnerability history: pyyaml
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 06.2018 02.2021
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 4
Disclosures per year
- 2018: 1
- 2019: 0
- 2020: 2
- 2021: 1
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Improper Input Validation in PyYAML this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.