Skip to content
OpenAdvisories
Critical · 9.8 CVE-2017-18342 EUVD-2018-0128GHSA-rprw-h62v-c2w7PYSEC-2018-49

PyYAML insecurely deserializes YAML strings leading to arbitrary code execution

Published Jun 27, 2018 · Updated Aug 5, 2024 · Assigned by mitre

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pyyaml 5.1.2-1 —
Debian 13 pyyaml 5.1.2-1 —
Debian 12 pyyaml 5.1.2-1 —
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS pyyaml No fix yet —
Ubuntu 16.04 LTS pyyaml No fix yet —
Ubuntu 14.04 LTS pyyaml No fix yet —
ReleasePackageFixed inAdvisory
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-2026:11996-1, openSUSE-SU-2024:14089-1, openSUSE-SU-2024:11210-1
openSUSE Tumbleweed python-openapi-spec-validator 0.7.1-1.3 openSUSE-SU-2026:11192-1, openSUSE-SU-2024:14152-1

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 python3-olamkit +2 1.0.2-1.el8 ELSA-2022-9341

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI pyyaml < 5.1 5.1 GHSA-rprw-h62v-c2w7

Advisories 9

References