CVE-2017-18342: PyYAML insecurely deserializes YAML strings leading to arbitrary code execution
(updated )
In PyYAML before 5.1, the yaml.load() API could execute arbitrary code. In other words, yaml.safe_load is not used.
This was intended to be fixed in 4.1, but due to breaking changes, 4.1 was yanked and 5.1 contains the patch for CVE-2017-18342.
References
- github.com/advisories/GHSA-rprw-h62v-c2w7
- github.com/marshmallow-code/apispec/issues/278
- github.com/pypa/advisory-database/tree/main/vulns/pyyaml/PYSEC-2018-49.yaml
- github.com/yaml/pyyaml/blob/master/CHANGES
- github.com/yaml/pyyaml/commit/7b68405c81db889f83c32846462b238ccae5be80
- github.com/yaml/pyyaml/issues/193
- github.com/yaml/pyyaml/issues/207
- github.com/yaml/pyyaml/pull/74
- github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JEX7IPV5P2QJITAMA5Z63GQCZA5I6NVZ
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KSQQMRUQSXBSUXLCRD3TSZYQ7SEZRKCE
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/M6JCFGEIEOFMWWIXGHSELMKQDD4CV2BA
- nvd.nist.gov/vuln/detail/CVE-2017-18342
- security.gentoo.org/glsa/202003-45
Code Behaviors & Features
Detect and mitigate CVE-2017-18342 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →