cve.bz

CVE-2020-1747 Improper Input Validation

9.8 criticalEPSS 5.4%Fix available

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

On this page
A vulnerability was discovered in the PyYAML library in versions before 5.3.1, 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. An attacker could use this flaw to execute arbitrary code on the system by abusing the python/object/new constructor.

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
5.4% (unchanged from 5.4% a week ago; 5.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 93rd 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-1747 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2020-1747?via=ask-ai-copy and https://cve.bz/cve/CVE-2020-1747?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-1747 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.3.1
fedoraproject:fedora30
fedoraproject:fedora31
fedoraproject:fedora32
fedoraproject:fedora33
opensuse:leap15.1
oracle:communications_cloud_native_core_network_function_cloud_native_environment22.1.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-6757-jp84-gxfxPyPIpyyaml>=5.1b7 <5.3.15.3.1
PYSEC-2020-96PyPIpyyaml>=5.1 <5.3.15.3.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14pyyaml5.3-2DEBIAN-CVE-2020-1747
Red Hatenterprise_linux:8::appstreamCython, python38-Cython, Cython-debugsource and 1 more0:0.29.14-4.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreamPyYAML, python38-pyyaml, PyYAML-debugsource and 1 more0:5.3.1-1.module+el8.3.0+7187+a27ec44bRHSA-2020:4641
Red Hatenterprise_linux:8::appstreambabel, python38-babel0:2.7.0-10.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreammod_wsgi, python38-mod_wsgi0:4.6.8-3.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreamnumpy, python38-numpy, numpy-debugsource and 3 more0:1.17.3-5.module+el8.3.0+7187+a27ec44bRHSA-2020:4641
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python38-PyMySQL0:0.9.3-3.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreampython-asn1crypto, python38-asn1crypto0:1.2.0-3.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreampython-cffi, python38-cffi, python-cffi-debugsource and 1 more0:1.13.2-3.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreampython-chardet, python38-chardet0:3.0.4-19.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreampython-cryptography, python38-cryptography, python-cryptography-debugsource and 1 more0:2.8-3.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreampython-idna, python38-idna0:2.8-6.module+el8.2.0+5234+f98739b6RHSA-2020:4641
Red Hatenterprise_linux:8::appstreampython-jinja2, python38-jinja20:2.10.3-4.module+el8.2.0+5234+f98739b6RHSA-2020:4641
16 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise High Availability Extension 12 SP1 and 19 morepython-PyYAML5.1.2-26.12.1SUSE-SU-2020:1285-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Module for Public Cloud 15 and 2 morepython-PyYAML5.1.2-150000.3.6.1SUSE-SU-2022:2841-1
SUSELinux Enterprise Module for Basesystem 15 SP1, Linux Enterprise Module for Python 2 15 SP1python-PyYAML5.1.2-6.6.1SUSE-SU-2020:0959-1
openSUSELeap 15.1python-PyYAML5.1.2-lp151.2.13.1openSUSE-SU-2020:0630-1
openSUSELeap 15.1python-PyYAML5.1.2-lp151.2.6.1openSUSE-SU-2020:0507-1
AlmaLinux8python38-Cython0.29.14-4.module_el8.6.0+2778+cd494b30ALSA-2020:4641 ALSA-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-2020:4641 ALSA-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-2020:4641 ALSA-2021:2583
AlmaLinux8python38-chardet3.0.4-19.module_el8.6.0+2778+cd494b30ALSA-2020:4641 ALSA-2021:2583
AlmaLinux8python38-cryptography2.8-3.module_el8.6.0+2778+cd494b30ALSA-2020:4641 ALSA-2021:2583
AlmaLinux8python38-idna2.8-6.module_el8.6.0+2778+cd494b30ALSA-2020:4641 ALSA-2021:2583
AlmaLinux8python38-markupsafe1.1.1-6.module_el8.6.0+2778+cd494b30ALSA-2020:4641 ALSA-2021:2583
24 more for AlmaLinux in the JSON.
Rocky Linux8Cython0:0.29.14-4.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8PyYAML0:5.3.1-1.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8babel0:2.7.0-10.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8mod_wsgi0:4.6.8-3.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8numpy0:1.17.3-5.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8python-asn1crypto0:1.2.0-3.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8python-cffi0:1.13.2-3.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8python-chardet0:3.0.4-19.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8python-cryptography0:2.8-3.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8python-cryptography0:2.8-3.module+el8.5.0+672+ab6eb015RLSA-2020:4641
Rocky Linux8python-idna0:2.8-6.module+el8.4.0+570+c2eaf144RLSA-2020:4641
Rocky Linux8python-jinja20:2.10.3-4.module+el8.4.0+570+c2eaf144RLSA-2020:4641
14 more for Rocky Linux in the JSON.
Alpinev3.11, v3.12, v3.13 and 11 morepy3-yaml5.3.1-r0ALPINE-CVE-2020-1747
Azure Linux2PyYAML5.4.1-1AZL-31783

From the distributions' data via OSV.dev: the Debian Security Tracker; 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 · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Quay 3.2 uses the vulnerable load function, but only to parse the Nginx configuration file, which only contains trusted data.

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-8030020200818121840.4190259bFixed 2020-11-04RHSA-2020:4641
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 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 3python-PyYAMLWill not fix
Red Hat Software Collectionspython27-PyYAMLNot affected
Red Hat Software Collectionsrh-python36-PyYAMLNot affected
Red Hat Software Collectionsrh-python38-PyYAMLAffected

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

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