CVSS 3.1
9.8 criticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HCritical (9.8). EPSS 5.6% estimated probability of exploitation activity in the next 30 days. Fixed in pyyaml 5.1.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Hpyyaml (PyPI): fixed in 5.1Explain CVE-2017-18342 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2017-18342?via=ask-ai-copy and https://cve.bz/cve/CVE-2017-18342?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2017-18342 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| pyyaml:pyyaml | before 5.1 |
| fedoraproject:fedora | 28 |
| fedoraproject:fedora | 29 |
| fedoraproject:fedora | 30 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-rprw-h62v-c2w7 | PyPI | pyyaml | <5.1 | 5.1 |
| PYSEC-2018-49 | PyPI | pyyaml | <5.1 | 5.1 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 12, 13, 14 | pyyaml | 5.1.2-1 | DEBIAN-CVE-2017-18342 |
| Ubuntu | 14.04:LTS, 16.04:LTS, 18.04:LTS | pyyaml | no fix listed | UBUNTU-CVE-2017-18342 |
| openSUSE | Tumbleweed | oci-cli | 3.0.2-1.2 | openSUSE-SU-2024:11108-1 |
| openSUSE | Tumbleweed | python-PyYAML | 5.4.1-1.6 | openSUSE-SU-2024:11210-1 |
| openSUSE | Tumbleweed | python-PyYAML | 6.0.1-4.1 | openSUSE-SU-2024:14089-1 |
| openSUSE | Tumbleweed | python-PyYAML | 6.0.3-1.6 | openSUSE-SU-2026:11996-1 |
| openSUSE | Tumbleweed | python-openapi-spec-validator | 0.7.1-1.3 | openSUSE-SU-2024:14152-1 |
| openSUSE | Tumbleweed | python-openapi-spec-validator | 0.9.0-1.1 | openSUSE-SU-2026:11192-1 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.
Red Hat rates this Important.
The default loading mechanism in PyYAML contains fundamental and long-standing functionality that allows for arbitrary code execution.
The yaml.load() function (when called without a specified loader), has been documented as inherently unsafe since its first release. When processing YAML input, this function can call any Python function, including those that execute system commands (i.e., os.system()).
In response, the PyYAML maintainers have deprecated the plain use of yaml.load() to encourage developers to explicitly choose a safer option. The yaml.safe_load() function is the intended replacement. It handles a safe subset of the YAML language and disables the dangerous features that permit arbitrary code execution, effectively neutralizing the RCE threat from untrusted input.
However, to maintain backwards compatibility the yaml.load() function remains available. Its default behavior (as of PyYAML 5.1) was to use FullLoader and issue a warning. FullLoader was deemed not safe for untrusted data, and as of PyYAML 6.0 yaml.load() requires an explicit Loader argument. The original vulnerable loader is also retained (again, in the interest of backwards compatibility) which provides the attack vector.
The code executed via PyYAML runs as the user invoking the python binary calling the pyyaml module– there is no inherent privilege escalation. Therefore any exploit affecting any substantial impact requires privilege escalation via a separate vulnerability or poor application design and/or poor coding practices.
Given that the vulnerability in PyYAML’s load function provides a mechanism for threat actors to potentially impact a system via a wide range of Python functions, Red Hat must err on the side of caution and view the possible impact to Confidentiality, Integrity, and Availability as High.
Any codebases written in Python and employing the PyYAML library should be audited. Developers should replace every instance of the deprecated yaml.load() function with the secure alternative, yaml.safe_load(), especially when handling configuration or data from untrusted sources. Any applications invoking python where PyYAML is available should run as a non-privileged user.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Ceph Storage 1.3 | PyYAML | Will not fix | |
| Red Hat Enterprise Linux 6 | PyYAML | Will not fix | |
| Red Hat Enterprise Linux 7 | PyYAML | Will not fix | |
| Red Hat Enterprise Linux 8 | PyYAML | Will not fix | |
| Red Hat Enterprise Linux OpenStack Platform 7 (Kilo) | PyYAML | Will not fix | |
| Red Hat Enterprise MRG 2 | PyYAML | Will not fix | |
| Red Hat OpenStack Platform 10 (Newton) | PyYAML | Will not fix | |
| Red Hat OpenStack Platform 12 (Pike) | PyYAML | Will not fix | |
| Red Hat OpenStack Platform 13 (Queens) | PyYAML | Will not fix | |
| Red Hat OpenStack Platform 15 (Stein) | PyYAML | Not affected | |
| Red Hat OpenStack Platform 8 (Liberty) | PyYAML | Will not fix | |
| Red Hat OpenStack Platform 9 (Mitaka) | PyYAML | Will not fix | |
| Red Hat Satellite 5 | PyYAML | Will not fix | |
| Red Hat Software Collections | python27-PyYAML | Will not fix | |
| Red Hat Software Collections | rh-python36-PyYAML | Will not fix |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2017-18342.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.