Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. PyYAML
  4. ›
  5. CVE-2017-18342

CVE-2017-18342: PyYAML insecurely deserializes YAML strings leading to arbitrary code execution

January 4, 2019 (updated October 16, 2024)

In PyYAML before 4.1, the yaml.load() API could execute arbitrary code. In other words, yaml.safe_load is not used.

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
  • github.com/yaml/pyyaml/blob/master/CHANGES
  • github.com/yaml/pyyaml/commit/7b68405c81db889f83c32846462b238ccae5be80
  • github.com/yaml/pyyaml/issues/193
  • 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. Learn more about Dependency Scanning →

Affected versions

All versions before 4.1

Fixed versions

  • 4.1

Solution

Upgrade to version 4.1 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

pypi/PyYAML/CVE-2017-18342.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:27 +0000.