PyYAML 5.1 through 5.1.2 has insufficient restrictions on the load and load_all functions…
Priority MEDIUM 50CWE-502Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 2 fixed, 3 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-502.
Summary
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.
Why it matters now
EPSS 0.05114 92nd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial pyyaml (PyPI): 5.2Red Hat: 2 advisoriesRed Hat: 2 fixed, 3 without a fix
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | pyyaml (PyPI) | 5.1 to before 5.2 | 5.2 | Patch available | GHSA-3pqx-4fqf-j49f |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- pyyaml (PyPI) Vendor— Affected 5.1 to before 5.2 Fixed in 5.2 Patch available GHSA-3pqx-4fqf-j49f
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:pyyaml:pyyaml:*:*:*:*:*:*:*:* | 5.1 – 5.1.2 | Vulnerable | Pyyaml |
| cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:* | 30 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:* | 31 | Vulnerable | Fedoraproject |
- cpe:2.3:a:pyyaml:pyyaml:*:*:*:*:*:*:*:* Versions 5.1 – 5.1.2 Vulnerable ·Pyyaml
- cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:* Versions 30 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:* Versions 31 Vulnerable ·Fedoraproject
Remediation
- Fix · GHSA-3pqx-4fqf-j49f pyyaml (PyPI) Fixed in 5.2 Advisory →
Red Hat 2 advisories
- RHSA-2021:0420 Released 2021-02-04 · Red Hat rating ModerateRed Hat Quay v3.4.0 security update
- Quay v3 quay/clair-rhel8, quay/quay-bridge-operator-bundle, quay/quay-bridge-operator-rhel8 +8
- RHSA-2020:4641 Released 2020-11-04 · Red Hat rating Moderatepython38:3.8 security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 8) Cython-0.29.14-4.module+el8.2.0+5234+f98739b6.src::python38:3.8, PyYAML-5.3.1-1.module+el8.3.0+7187+a27ec44b.src::python38:3.8, babel-2.7.0-10.module+el8.2.0+5234+f98739b6.src::python38:3.8 +47
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 10 (Newton) | Affected | No fix planned: Will not fix |
| Red Hat OpenStack Platform 13 (Queens) | Affected | No fix planned: Will not fix |
| Quay v3 | Fixed | RHSA-2021:0420 |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2020:4641 |
Not affected: 3 products
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Software Collections
Timeline
- 2026-10-02 Threatist record created from CVE-2019-20477
- 2026-10-03 Alias added: GHSA-3pqx-4fqf-j49f
References
Advisory 5
Other 4
- https://github.com/pypa/advisory-database/tree/main/vulns/pyyaml/PYSEC-2020-176.yaml
- https://github.com/yaml/pyyaml
- https://lists.fedoraproject.org/archives/list/[email protected]/message/33VBUY73AA6CTTYL3LRWHNFDULV7PFPN
- https://lists.fedoraproject.org/archives/list/[email protected]/message/52N5XS73Z5S4ZN7I7R56ICCPCTKCUV4H
Sources
- CVE-2019-20477 · CVE Program
- CVE-2019-20477 · NVD
- FIRST EPSS
- GHSA-3pqx-4fqf-j49f · GitHub Advisory Database · CC BY 4.0
- CVE-2019-20477 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences