Vulnerabilities / CVE-2017-18342

critical

CVE-2017-18342

PyYAML: yaml.load() API could execute arbitrary code

Published Modified CWE 502
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, GHSA, Photon OS. Rated lower by Red Hat (high), Oracle (high).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
Photon OS 1.0PyYAML3.12-3.ph1
Photon OS 2.0PyYAML3.12-3.ph2
Photon OS 3.0PyYAML3.13-3.ph3
pip::GitHub Security Advisory pippyyaml5.1
debian 11pyyaml5.1.2-1
debian 12pyyaml5.1.2-1
debian 13pyyaml5.1.2-1
debian 14pyyaml5.1.2-1
echopyyaml5.1.2-1
Oracle Linux 8ol-automation-manager, ol-automation-manager-cli, python3-olamkit1.0.2-1.el8
Red HatPyYAML, python2-pyyaml, python27-PyYAML and 3 moreno fix listed
Show all 18 entries from 11 sources
SourcePackageFixed in
Photon OS 1.0PyYAML3.12-3.ph1
Photon OS 2.0PyYAML3.12-3.ph2
Photon OS 3.0PyYAML3.13-3.ph3
pip::GitHub Security Advisory pippyyaml5.1
debian 11pyyaml5.1.2-1
debian 12pyyaml5.1.2-1
debian 13pyyaml5.1.2-1
debian 14pyyaml5.1.2-1
echopyyaml5.1.2-1
Oracle Linux 8ol-automation-manager1.0.2-1.el8
Oracle Linux 8ol-automation-manager-cli1.0.2-1.el8
Oracle Linux 8python3-olamkit1.0.2-1.el8
Red HatPyYAMLno fix listed
Red Hatpython2-pyyamlno fix listed
Red Hatpython27-PyYAMLno fix listed
Red Hatpython38-pyyamlno fix listed
Red Hatpython39-pyyamlno fix listed
Red Hatrh-python36-PyYAMLno fix listed

References

All 21 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.