# CVE-2020-14343: Improper Input Validation in PyYAML

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 6.24% (percentile 94, 2026-11-26)
- **CWE:** CWE-20
- **Aliases:** GHSA-8q59-q68h-6hv4, PYSEC-2021-142
- **Published:** 2021-02-09T00:00:00.000Z
- **Modified:** 2026-06-17T02:54:34.453Z

## Who should check

- Projects that depend on PyPI package pyyaml (\< 5.4)
- Anyone running PyYAML PyYAML 5.4

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

## Affected and fixed versions

- PyPI `pyyaml`: affected \< 5.4; fixed 5.4 (osv)
- PyYAML: PyYAML 5.4 (cvelist)

## Mitigation

- Upgrade pyyaml to 5.4 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2020-14343. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2020-14343.md
Affected: pyyaml < 5.4
Fixed in: 5.4

Steps:
1. Search this machine and project for pyyaml (PyPI), PyYAML: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2020-14343 being exploited?

There is no confirmed exploitation: CVE-2020-14343 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 6.24% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2020-14343?

Critical: CVSS 9.8 (v3.1, scored by NVD). Remote, no login needed.

### Which versions are affected by CVE-2020-14343?

pyyaml \< 5.4.

### Is there a fix for CVE-2020-14343?

Yes. Fixed in 5.4. Upgrade pyyaml to 5.4 or later.

### How do I check if I'm affected by CVE-2020-14343?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2020-14343>
- vendor: <https://github.com/advisories/GHSA-8q59-q68h-6hv4>
- patch: <https://www.oracle.com/security-alerts/cpuapr2022.html>
- patch: <https://www.oracle.com/security-alerts/cpujul2022.html>
- patch: <https://github.com/yaml/pyyaml/commit/a001f2782501ad2d24986959f0239a354675f9dc>
- other: <https://github.com/yaml/pyyaml/issues/420>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=1860466>
- other: <https://github.com/SeldonIO/seldon-core/issues/2252>
- other: <https://github.com/yaml/pyyaml/issues/420#issuecomment-663673966>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/pyyaml/PYSEC-2021-142.yaml>
- other: <https://github.com/yaml/pyyaml>
- other: <https://pypi.org/project/PyYAML>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2020-14343>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-8q59-q68h-6hv4> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2021-142> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2020-14343> · JSON: <https://flawdb.com/api/v1/entries/CVE-2020-14343>
