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.
CVE-2017-18342
This critical-severity CVE scores 9.8 under NVD CVSS v3. EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 9.8
- EG Score
- 9.8(low)
- EPSS
- 92.5%
- KEV
- Not listed
Published
June 27, 2018
Last Modified
November 21, 2024
Advisory Details (9)
Auto-updated Jul 6, 2026Use 'yaml.safe_load' in 'load_yaml_from_docstring' · Issue #278 · marshmallow-code/apispec · GitHub
https://github.com/marshmallow-code/apispec/issues/278PyYAML: Arbitrary code execution (GLSA 202003-45) — Gentoo security
https://security.gentoo.org/glsa/202003-45[SECURITY] Fedora 29 Update: PyYAML-5.1-1.fc29 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M6JCFGEIEOFMWWIXGHSELMKQDD4CV2BA/[SECURITY] Fedora 28 Update: PyYAML-5.1-1.fc28 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KSQQMRUQSXBSUXLCRD3TSZYQ7SEZRKCE/[SECURITY] Fedora 30 Update: PyYAML-5.1-1.fc30 - package-announce - Fedora mailing-lists
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ/PyYAML yaml.load(input) Deprecation · yaml/pyyaml Wiki · GitHub
https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load%28input%29-DeprecationMake pyyaml safe by default.
Patch available: yaml/pyyaml 6.0.2rc1 (PR #74 merged 2017-08-26)
https://github.com/yaml/pyyaml/pull/74PyYAML 4.2 Release Plan · Issue #193 · yaml/pyyaml · GitHub
https://github.com/yaml/pyyaml/issues/193pyyaml/CHANGES at main · yaml/pyyaml · GitHub
https://github.com/yaml/pyyaml/blob/master/CHANGESVendor Advisories for CVE-2017-18342(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Affected Packages
(1 across 1 ecosystem)
PyPI(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| pyyaml | 3.01 ... 5.1b7 (22 versions) | 5.1 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 9× in last 7d / 39× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-09 19:06 UTCEPSS rescore
- 2026-07-08 15:10 UTCEPSS rescore
- 2026-07-07 13:42 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-05 02:27 UTCEPSS rescore
- 2026-07-04 06:28 UTCEPSS rescore
- 2026-07-02 16:54 UTCEPSS rescore
- 2026-07-01 15:02 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-29 14:03 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-27 03:05 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-24 03:59 UTCOSV refresh
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-22 14:23 UTCEPSS rescore
- 2026-06-22 14:23 UTCEPSS rescore
Show 44 moreShow fewer
- 2026-06-21 14:54 UTCEPSS rescore
- 2026-06-21 14:54 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-19 19:23 UTCEPSS rescore
- 2026-06-19 19:23 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-15 17:45 UTCEPSS rescore
- 2026-06-14 23:14 UTCEPSS rescore
- 2026-06-13 22:57 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-10 22:15 UTCEPSS rescore
- 2026-06-10 13:19 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-08 14:14 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-07 08:50 UTCOSV refresh
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-06 13:45 UTCEPSS rescore
- 2026-06-05 22:44 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-05 06:08 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-01 13:49 UTCEPSS rescore
- 2026-05-31 22:28 UTCEPSS rescore
- 2026-05-31 22:28 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-31 00:14 UTCEPSS rescore
- 2026-05-29 13:41 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-27 13:38 UTCEPSS rescore
- 2026-05-27 13:38 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-23 02:29 UTCEG score recompute
Related CVEs(same CWE)
Same CWE
10 shownCWE-502
- CVE-2017-20208EG 9.8CRITICAL
- CVE-2017-20207EG 9.8CRITICAL
- CVE-2017-20206EG 9.8CRITICAL
- CVE-2017-20189EG 9.8CRITICAL
- CVE-2017-10992EG 9.8EPSS 95%CRITICAL
- CVE-2013-4521EG 9.8EPSS 90%CRITICAL
- CVE-2014-1860EG 9.8CRITICAL
- CVE-2016-1000027EG 9.8EPSS 98%CRITICAL
- CVE-2014-3699EG 9.8CRITICAL
- CVE-2017-18605EG 9.8CRITICAL
Frequently asked(5)
What is CVE-2017-18342?
When was CVE-2017-18342 disclosed?
Is CVE-2017-18342 actively exploited?
What is the CVSS score of CVE-2017-18342?
How do I remediate CVE-2017-18342?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2017-18342
Is Your Infrastructure Affected by CVE-2017-18342?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.