cve.bz

CVE-2020-14343 Improper Input Validation

9.8 criticalEPSS 6.2%Fix available

Critical (9.8). EPSS 6.2% estimated probability of exploitation activity in the next 30 days. Fixed in pyyaml 5.4.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
6.2% (unchanged from 6.2% a week ago; 6.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 94th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2020-14343 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2020-14343?via=ask-ai-copy and https://cve.bz/cve/CVE-2020-14343?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2020-14343 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
pyyaml:pyyamlfrom 5.1 before 5.4
oracle:communications_cloud_native_core_network_function_cloud_native_environment1.10.0
oracle:communications_cloud_native_core_network_function_cloud_native_environment22.1.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-8q59-q68h-6hv4PyPIpyyaml<5.45.4
PYSEC-2021-142PyPIpyyaml<5.45.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14pyyaml5.3.1-4DEBIAN-CVE-2020-14343
Ubuntu20.04:LTSpyyaml5.3.1-1ubuntu0.1UBUNTU-CVE-2020-14343 USN-4940-1
Red Hatenterprise_linux:8::appstreamCython, python38-Cython, Cython-debugsource and 1 more0:0.29.14-4.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreamPyYAML, python38-pyyaml, PyYAML-debugsource and 1 more0:5.4.1-1.module+el8.4.0+10706+5c295a3eRHSA-2021:2583
Red Hatenterprise_linux:8::appstreambabel, python38-babel0:2.7.0-10.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreammod_wsgi, python38-mod_wsgi0:4.6.8-3.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreamnumpy, python38-numpy, numpy-debugsource and 3 more0:1.17.3-5.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python38-PyMySQL0:0.10.1-1.module+el8.4.0+9692+8e86ab84RHSA-2021:2583
Red Hatenterprise_linux:8::appstreampython-asn1crypto, python38-asn1crypto0:1.2.0-3.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreampython-cffi, python38-cffi, python-cffi-debugsource and 1 more0:1.13.2-3.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreampython-chardet, python38-chardet0:3.0.4-19.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreampython-cryptography, python38-cryptography, python-cryptography-debugsource and 1 more0:2.8-3.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreampython-idna, python38-idna0:2.8-6.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
Red Hatenterprise_linux:8::appstreampython-jinja2, python38-jinja20:2.10.3-4.module+el8.4.0+8888+89bc7e79RHSA-2021:2583
39 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 9 morepython-PyYAML5.3.1-6.10.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 9 morepython-pytz2019.1-6.4.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 9 morepython-requests2.24.0-6.10.2SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 11 morepython-blinker1.4-3.4.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 11 morepython-ecdsa0.13.3-3.7.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 11 morepython-oauthlib2.0.6-3.4.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 9 morepython-requests-oauthlib0.8.0-3.4.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 10 morepython-adal1.2.4-7.4.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 8 morepython-websocket-client0.57.0-6.4.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 7 morepython-Pygments2.6.1-7.4.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 10 morepython-nose1.3.7-7.4.1SUSE-RU-2021:0985-1
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 8 morepython-PyJWT1.7.1-6.4.1SUSE-RU-2021:0985-1
149 more for SUSE in the JSON and on SUSE's page.
openSUSETumbleweedoci-cli3.0.2-1.2openSUSE-SU-2024:11108-1
openSUSETumbleweedpython-PyYAML5.4.1-1.6openSUSE-SU-2024:11210-1
openSUSETumbleweedpython-PyYAML6.0.1-4.1openSUSE-SU-2024:14089-1
openSUSETumbleweedpython-PyYAML6.0.3-1.6openSUSE-SU-2026:11996-1
AlmaLinux8python38-Cython0.29.14-4.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-PyMySQL0.10.1-1.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-asn1crypto1.2.0-3.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-atomicwrites1.3.0-8.module_el8.4.0+2510+cb4d423dALSA-2021:2583
AlmaLinux8python38-atomicwrites1.3.0-8.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-attrs19.3.0-3.module_el8.4.0+2510+cb4d423dALSA-2021:2583
AlmaLinux8python38-attrs19.3.0-3.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-cffi1.13.2-3.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-chardet3.0.4-19.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-cryptography2.8-3.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-idna2.8-6.module_el8.6.0+2778+cd494b30ALSA-2021:2583
AlmaLinux8python38-markupsafe1.1.1-6.module_el8.6.0+2778+cd494b30ALSA-2021:2583
24 more for AlmaLinux in the JSON.
Rocky Linux8Cython0:0.29.14-4.module+el8.4.0+570+c2eaf144RLSA-2021:2583
Rocky Linux8PyYAML0:5.4.1-1.module+el8.4.0+574+843c4898RLSA-2021:2583
Rocky Linux8PyYAML0:5.4.1-1.module+el8.5.0+672+ab6eb015RLSA-2021:2583
Rocky Linux8babel0:2.7.0-10.module+el8.4.0+570+c2eaf144RLSA-2021:2583
Rocky Linux8mod_wsgi0:4.6.8-3.module+el8.4.0+570+c2eaf144RLSA-2021:2583
Rocky Linux8numpy0:1.17.3-5.module+el8.4.0+570+c2eaf144RLSA-2021:2583
Rocky Linux8pytest0:4.6.6-3.module+el8.4.0+570+c2eaf144RLSA-2021:2583
Rocky Linux8python-PyMySQL0:0.10.1-1.module+el8.4.0+570+c2eaf144RLSA-2021:2583
Rocky Linux8python-PyMySQL0:0.10.1-1.module+el8.5.0+672+ab6eb015RLSA-2021:2583
Rocky Linux8python-asn1crypto0:1.2.0-3.module+el8.4.0+570+c2eaf144RLSA-2021:2583
Rocky Linux8python-atomicwrites0:1.3.0-8.module+el8.4.0+570+c2eaf144RLSA-2021:2583
Rocky Linux8python-attrs0:19.3.0-3.module+el8.4.0+570+c2eaf144RLSA-2021:2583
30 more for Rocky Linux in the JSON.
Alpinev3.11, v3.12py3-yaml5.3.1-r1ALPINE-CVE-2020-14343
Alpinev3.13py3-yaml5.3.1-r2ALPINE-CVE-2020-14343
Alpinev3.14, v3.15, v3.16 and 8 morepy3-yaml5.4-r0ALPINE-CVE-2020-14343
Azure Linux2PyYAML5.4.1-1AZL-31782

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This CVE has already been fixed in RHEL-9 with initial release of PyYaml v5.4-1.

Ansible Tower 3.7 uses affected version of PyYAML 3.12 from RHEL, but the use of load() is specified with a SafeLoader when it is called. So Ansible Tower and Ansible Engine are not affected.

Red Hat Quay, from version 3.4 uses the safe_load function which is not affected by this issue. See [1].

Even though the CVSSv3 for this flaw is 9.8, the Impact has been set to Moderate because PyYAML provides a specific method to deal with untrusted input, which is `yaml.safe_load`. `yaml.safe_load` or the SafeLoader loader should be used whenever the input YAML can be modified by a malicious user.

[1] https://github.com/quay/quay/pull/603

Red Hat's mitigation

Use `yaml.safe_load` or the SafeLoader loader when you parse untrusted input.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8python38:3.8-8040020210420090415.6dfe838aFixed 2021-06-29RHSA-2021:2583
Red Hat Enterprise Linux 8python38-devel:3.8-8040020210420090415.6dfe838aFixed 2021-06-29RHSA-2021:2583
Red Hat Satellite 6.10 for RHEL 7python-pyyaml-0:5.4.1-1.el7pcFixed 2021-11-16RHSA-2021:4702
Red Hat Ansible Tower 3python3-PyYAMLNot affected
Red Hat Ansible Tower 3PyYAMLNot affected
Red Hat Enterprise Linux 6PyYAMLNot affected
Red Hat Enterprise Linux 7PyYAMLNot affected
Red Hat Enterprise Linux 8python27:2.7/PyYAMLNot affected
Red Hat Enterprise Linux 8python39:3.9/PyYAMLNot affected
Red Hat Enterprise Linux 8PyYAMLNot affected
Red Hat Enterprise Linux 9PyYAMLNot affected
Red Hat OpenStack Platform 10 (Newton)PyYAMLNot affected
Red Hat OpenStack Platform 13 (Queens)PyYAMLNot affected
Red Hat Quay 3quayNot affected
Red Hat Software Collectionspython27-PyYAMLNot affected
Red Hat Software Collectionsrh-python36-PyYAMLNot affected
Red Hat Software Collectionsrh-python38-PyYAMLWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2020-14343.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON