cve.bz

CVE-2019-20477 Deserialization of Untrusted Data

9.8 criticalExploit referenceEPSS 5.1%Fix available

Critical (9.8). EPSS 5.1% estimated probability of exploitation activity in the next 30 days. Fixed in pyyaml 5.2, 5.2b1.

On this page
PyYAML 5.1 through 5.1.2 has insufficient restrictions on the load and load_all functions because of a class deserialization issue, e.g., Popen is a class in the subprocess module. NOTE: this issue exists because of an incomplete fix for CVE-2017-18342.

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.1% (unchanged from 5.1% a week ago; 5.1% 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-502 Deserialization of Untrusted Data
OWASP Top 10
A08:2025 Software or Data Integrity Failures
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-2019-20477 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2019-20477?via=ask-ai-copy and https://cve.bz/cve/CVE-2019-20477?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-2019-20477 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 through 5.1.2
fedoraproject:fedora30
fedoraproject:fedora31

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-3pqx-4fqf-j49fPyPIpyyaml>=5.1 <5.25.2
PYSEC-2020-176PyPIpyyaml>=5.1 <5.2b15.2b1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14pyyaml5.2-1DEBIAN-CVE-2019-20477
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.
AlmaLinux8python38-Cython0.29.14-4.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-asn1crypto1.2.0-3.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-cffi1.13.2-3.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-chardet3.0.4-19.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-cryptography2.8-3.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-idna2.8-6.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-markupsafe1.1.1-6.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-mod_wsgi4.6.8-3.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-psycopg2, python38-psycopg2-doc, python38-psycopg2-tests2.8.4-4.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-pycparser2.19-3.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-pysocks1.7.1-4.module_el8.6.0+2778+cd494b30ALSA-2020:4641
AlmaLinux8python38-pytz2019.3-3.module_el8.6.0+2778+cd494b30ALSA-2020:4641
2 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.

From the distributions' data via OSV.dev: the Debian Security Tracker; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Red Hat.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue did not affect the versions of PyYAML as shipped with Red Hat Enterprise Linux 7, and 8 as they did not include the class FullLoader, which contains this vulnerability.

The PyYAML libary that is provided in the Red Hat OpenStack repositories is vulnerable. However, because there are no instances where this library is used in a way which exposes the vulnerability, the impact to OpenStack products has been reduced to 'low' and Red Hat will not be providing a fix at this time. Any updates will be through RHEL channels.

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 Quay 3quay/clair-rhel8:v3.4.0-25Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-bridge-operator-bundle:v3.4.0-3Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-bridge-operator-rhel8:v3.4.0-17Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-builder-qemu-rhcos-rhel8:v3.4.0-17Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-builder-rhel8:v3.4.0-18Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-container-security-operator-bundle:v3.4.0-2Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-container-security-operator-rhel8:v3.4.0-2Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-openshift-bridge-rhel8-operator:v3.4.0-17Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-operator-bundle:v3.4.0-89Fixed 2021-02-04RHSA-2021:0420
Red Hat Quay 3quay/quay-operator-rhel8:v3.4.0-132Fixed 2021-02-04RHSA-2021:0420
Red Hat Enterprise Linux 6PyYAMLOut of support scope
Red Hat Enterprise Linux 7PyYAMLNot affected
Red Hat Enterprise Linux 8python27:2.7/PyYAMLNot affected
Red Hat Enterprise Linux 8PyYAMLNot affected
Red Hat OpenStack Platform 10 (Newton)PyYAMLWill not fix
Red Hat OpenStack Platform 13 (Queens)PyYAMLWill not fix
Red Hat Software Collectionspython27-PyYAMLNot affected
Red Hat Software Collectionsrh-python36-PyYAMLNot affected
Red Hat Software Collectionsrh-python38-PyYAMLNot affected
1 more in the JSON and on Red Hat's page.

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-2019-20477.

Attack patterns (CAPEC)

  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON