CVE-2017-18342 json
PyYAML insecurely deserializes YAML strings leading to arbitrary code execution
published 2018-06-27 8 y ago modified 2026-07-01 4 mo ago also GHSA-rprw-h62v-c2w7 , PYSEC-2018-49 , EUVD-2018-0128
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 5.6%
- EPSS 5.6% chance of exploitation in 30 days, percentile 92%
- public exploits
- 0
- none known
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.
Patch / fix
- pypi pyyaml 5.1
- pyyaml pyyaml 5.1
- pyyaml Debian 14, Debian 13, Debian 12 5.1.2-1
debian advisories DEBIAN-CVE-2017-18342
- python-PyYAML openSUSE Tumbleweed 6.0.3-1.6
- python-openapi-spec-validator openSUSE Tumbleweed 0.9.0-1.1
- python-openapi-spec-validator openSUSE Tumbleweed 0.7.1-1.3
- python-PyYAML openSUSE Tumbleweed 6.0.1-4.1
- oci-cli openSUSE Tumbleweed 3.0.2-1.2
- python-PyYAML openSUSE Tumbleweed 5.4.1-1.6
opensuse advisories openSUSE-SU-2026:11996-1openSUSE-SU-2026:11192-1openSUSE-SU-2024:14152-1openSUSE-SU-2024:14089-1openSUSE-SU-2024:11108-1openSUSE-SU-2024:11210-1
- python-yaml Arch Linux 5.1-1
arch linux advisories AVG-843
- github.com/yaml/pyyaml@7b68405 commit
- github.com/yaml/pyyaml#74 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2017-18342 updated cvss 9.8
PyYAML: yaml.load() API could execute arbitrary code
-
Red Hat Ceph Storage 1.3 PyYAML Red Hat Enterprise Linux 6 PyYAML Red Hat Enterprise Linux 7 PyYAML Red Hat Enterprise Linux 8 PyYAML, python2-pyyaml, python38-pyyaml, python39-pyyaml Red Hat Enterprise Linux OpenStack Platform 7 (Kilo) PyYAML Red Hat Enterprise MRG 2 PyYAMLaffected: workaround, no fix planned “Will not fix”
+7 more productsfewer
Red Hat OpenStack Platform 8 (Liberty) PyYAML Red Hat OpenStack Platform 9 (Mitaka) PyYAML Red Hat OpenStack Platform 10 (Newton) PyYAML Red Hat OpenStack Platform 12 (Pike) PyYAML Red Hat OpenStack Platform 13 (Queens) PyYAML Red Hat Satellite 5 PyYAML Red Hat Software Collections python27-PyYAML, rh-python36-PyYAML -
Red Hat OpenStack Platform 15 (Stein) PyYAMLnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
5.57% chance of exploitation in the next 30 days, higher than 92% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pyyaml | <5.1 |
5.1 |
Classification
- Weakness
-
- CWE-502 Deserialization of Untrusted Data
References
-
github.com
/yaml/pyyaml/pull/74
web, patch, third-party-advisory
-
github.com
/yaml/pyyaml/commit/7b68405c81db889f83c32846462b238ccae5be80
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/M6JCFGEIEOFMWWIXGHSELMKQDD4CV2BA/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/KSQQMRUQSXBSUXLCRD3TSZYQ7SEZRKCE/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ/
vendor-advisory
-
security.gentoo.org
/glsa/202003-45
vendor-advisory, web, third-party-advisory, advisory
-
github.com
/yaml/pyyaml/blob/master/CHANGES
web, release-notes, third-party-advisory
-
github.com
/marshmallow-code/apispec/issues/278
web, third-party-advisory, report
-
github.com
/yaml/pyyaml/issues/193
web, third-party-advisory, report
- github.com /yaml/pyyaml/wiki/PyYAML-yaml.load%28input%29-Deprecation
-
nvd.nist.gov
/vuln/detail/CVE-2017-18342
advisory
-
github.com
/yaml/pyyaml/issues/207#issuecomment-472520007
web
-
github.com
/pypa/advisory-database/tree/main/vulns/pyyaml/PYSEC-2018-49.yaml
web
-
github.com
/yaml/pyyaml
package
-
github.com
/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/KSQQMRUQSXBSUXLCRD3TSZYQ7SEZRKCE
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/M6JCFGEIEOFMWWIXGHSELMKQDD4CV2BA
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/M6JCFGEIEOFMWWIXGHSELMKQDD4CV2BA/
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/KSQQMRUQSXBSUXLCRD3TSZYQ7SEZRKCE/
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ/
web
-
github.com
/advisories/GHSA-rprw-h62v-c2w7
advisory
Sources
- CVE List CVE-2017-18342
- GitHub Advisory GHSA-rprw-h62v-c2w7
- NVD CVE-2017-18342
- OSV PYSEC-2018-49
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.