In PyYAML before 5.1, the yaml.load() API could execute arbitrary code if used with…
Priority MEDIUM 51CWE-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: 13 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-502.
Summary
In PyYAML before 5.1, the yaml.load() API could execute arbitrary code if used with untrusted data. The load() function has been deprecated in version 5.1 and the 'UnsafeLoader' has been introduced for backward compatibility with the function.
Why it matters now
EPSS 0.0557 92nd percentileScored 2026-11-07
Fix Partial PyYAML (PyPI): 5.1Red Hat: 13 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) | before 5.1 | 5.1 | Patch available | GHSA-rprw-h62v-c2w7 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- PyYAML (PyPI) Vendor— Affected before 5.1 Fixed in 5.1 Patch available GHSA-rprw-h62v-c2w7
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:pyyaml:pyyaml:*:*:*:*:*:*:*:* | before 5.1 | Vulnerable | Pyyaml |
| cpe:2.3:o:fedoraproject:fedora:28:*:*:*:*:*:*:* | 28 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:29:*:*:*:*:*:*:* | 29 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:* | 30 | Vulnerable | Fedoraproject |
- cpe:2.3:a:pyyaml:pyyaml:*:*:*:*:*:*:*:* Versions before 5.1 Vulnerable ·Pyyaml
- cpe:2.3:o:fedoraproject:fedora:28:*:*:*:*:*:*:* Versions 28 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:29:*:*:*:*:*:*:* Versions 29 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:* Versions 30 Vulnerable ·Fedoraproject
Remediation
- Fix · GHSA-rprw-h62v-c2w7 PyYAML (PyPI) Fixed in 5.1 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ceph Storage 1.3 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 8 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux OpenStack Platform 7 (Kilo) | Affected | No fix planned: Will not fix |
| Red Hat Enterprise MRG 2 | Affected | No fix planned: Will not fix |
| Red Hat OpenStack Platform 10 (Newton) | Affected | No fix planned: Will not fix |
| Red Hat OpenStack Platform 12 (Pike) | Affected | No fix planned: Will not fix |
| Red Hat OpenStack Platform 13 (Queens) | Affected | No fix planned: Will not fix |
| Red Hat OpenStack Platform 8 (Liberty) | Affected | No fix planned: Will not fix |
| Red Hat OpenStack Platform 9 (Mitaka) | Affected | No fix planned: Will not fix |
| Red Hat Satellite 5 | Affected | No fix planned: Will not fix |
| Red Hat Software Collections | Affected | No fix planned: Will not fix |
Not affected: 1 product
- Red Hat OpenStack Platform 15 (Stein)
Timeline
- 2026-10-02 Threatist record created from CVE-2017-18342
- 2026-10-03 Alias added: GHSA-rprw-h62v-c2w7
References
Advisory 8
Other 9
- https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load%28input%29-Deprecation
- https://github.com/yaml/pyyaml/issues/207#issuecomment-472520007
- https://github.com/yaml/pyyaml/commit/7b68405c81db889f83c32846462b238ccae5be80
- https://github.com/pypa/advisory-database/tree/main/vulns/pyyaml/PYSEC-2018-49.yaml
- https://github.com/yaml/pyyaml
- https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
- https://lists.fedoraproject.org/archives/list/[email protected]/message/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ
- https://lists.fedoraproject.org/archives/list/[email protected]/message/KSQQMRUQSXBSUXLCRD3TSZYQ7SEZRKCE
- https://lists.fedoraproject.org/archives/list/[email protected]/message/M6JCFGEIEOFMWWIXGHSELMKQDD4CV2BA
Sources
- CVE-2017-18342 · CVE Program
- CVE-2017-18342 · NVD
- FIRST EPSS
- GHSA-rprw-h62v-c2w7 · GitHub Advisory Database · CC BY 4.0
- CVE-2017-18342 · 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