Skip to content
OpenAdvisories
Critical · 9.8 CVE-2020-1747 EUVD-2020-0160GHSA-6757-jp84-gxfxPYSEC-2020-96

Improper Input Validation in PyYAML

Published Mar 24, 2020 · Updated Aug 4, 2024 · Assigned by redhat

Description

A vulnerability was discovered in the PyYAML library in versions before 5.3.1, where it is susceptible to arbitrary code execution when it processes untrusted YAML files through the full_load method or with the FullLoader loader. Applications that use the library to process untrusted input may be vulnerable to this flaw. An attacker could use this flaw to execute arbitrary code on the system by abusing the python/object/new constructor.

Affected products

VendorProductAffectedFixed
Red Hat PyYAML 5.3.1 —

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.3-2 —
Debian 13 pyyaml 5.3-2 —
Debian 12 pyyaml 5.3-2 —
ReleasePackageFixed inAdvisory
RHEL 8 Cython +1 0.29.14-4.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 PyYAML +1 5.3.1-1.module+el8.3.0+7187+a27ec44b RHSA-2020:4641
RHEL 8 babel +1 2.7.0-10.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 mod_wsgi +1 4.6.8-3.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 numpy +3 1.17.3-5.module+el8.3.0+7187+a27ec44b RHSA-2020:4641
RHEL 8 python-PyMySQL +1 0.9.3-3.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-asn1crypto +1 1.2.0-3.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-cffi +1 1.13.2-3.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-chardet +1 3.0.4-19.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-cryptography +1 2.8-3.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-idna +1 2.8-6.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-jinja2 +1 2.10.3-4.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-lxml +1 4.4.1-4.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-markupsafe +1 1.1.1-6.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-ply +1 3.11-8.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-psutil +1 5.6.4-3.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-psycopg2 +3 2.8.4-4.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-pycparser +1 2.19-3.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-pysocks +1 1.7.1-4.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-requests +1 2.22.0-9.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-six +1 1.12.0-9.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-urllib3 +1 1.25.7-4.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 python-wheel +2 0.33.6-5.module+el8.3.0+7187+a27ec44b RHSA-2020:4641
RHEL 8 python38 +7 3.8.3-3.module+el8.3.0+7680+79e7e61a RHSA-2020:4641
RHEL 8 python38-pip +2 19.3.1-1.module+el8.3.0+7187+a27ec44b RHSA-2020:4641
RHEL 8 python38-setuptools +2 41.6.0-4.module+el8.3.0+7187+a27ec44b RHSA-2020:4641
RHEL 8 pytz +1 2019.3-3.module+el8.2.0+5234+f98739b6 RHSA-2020:4641
RHEL 8 scipy +1 1.3.1-4.module+el8.2.0+5234+f98739b6 RHSA-2020:4641

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 python38-Cython 0.29.14-4.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-PyMySQL 0.10.1-1.module_el8.6.0+2778+cd494b30 ALSA-2021:2583
AlmaLinux 8 python38-asn1crypto 1.2.0-3.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-atomicwrites 1.3.0-8.module_el8.4.0+2510+cb4d423d ALSA-2021:2583
AlmaLinux 8 python38-attrs 19.3.0-3.module_el8.4.0+2510+cb4d423d ALSA-2021:2583
AlmaLinux 8 python38-cffi 1.13.2-3.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-chardet 3.0.4-19.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-cryptography 2.8-3.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-idna 2.8-6.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-markupsafe 1.1.1-6.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-mod_wsgi 4.6.8-3.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-more-itertools 7.2.0-5.module_el8.4.0+2510+cb4d423d ALSA-2021:2583
AlmaLinux 8 python38-packaging 19.2-3.module_el8.4.0+2510+cb4d423d ALSA-2021:2583
AlmaLinux 8 python38-pluggy 0.13.0-3.module_el8.4.0+2510+cb4d423d ALSA-2021:2583
AlmaLinux 8 python38-ply 3.11-10.module_el8.6.0+2778+cd494b30 ALSA-2021:2583
AlmaLinux 8 python38-psycopg2 +2 2.8.4-4.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-py 1.8.0-8.module_el8.4.0+2510+cb4d423d ALSA-2021:2583
AlmaLinux 8 python38-pycparser 2.19-3.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-pyparsing 2.4.5-3.module_el8.4.0+2510+cb4d423d ALSA-2021:2583
AlmaLinux 8 python38-pysocks 1.7.1-4.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-pytest 4.6.6-3.module_el8.4.0+2510+cb4d423d ALSA-2021:2583
AlmaLinux 8 python38-pytz 2019.3-3.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-pyyaml 5.4.1-1.module_el8.6.0+2778+cd494b30 ALSA-2021:2583
AlmaLinux 8 python38-requests 2.22.0-9.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-scipy 1.3.1-4.module_el8.6.0+2778+cd494b30 ALSA-2021:2583, ALSA-2020:4641
AlmaLinux 8 python38-six 1.12.0-10.module_el8.6.0+2778+cd494b30 ALSA-2021:2583
AlmaLinux 8 python38-wcwidth 0.1.7-16.module_el8.4.0+2510+cb4d423d ALSA-2021:2583

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 Cython 0.29.14-4.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 PyYAML 5.3.1-1.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 babel 2.7.0-10.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 mod_wsgi 4.6.8-3.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 numpy 1.17.3-5.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-asn1crypto 1.2.0-3.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-cffi 1.13.2-3.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-chardet 3.0.4-19.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-cryptography 2.8-3.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-idna 2.8-6.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-jinja2 2.10.3-4.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-markupsafe 1.1.1-6.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-psutil 5.6.4-3.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-psycopg2 2.8.4-4.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-pycparser 2.19-3.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-pysocks 1.7.1-4.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-requests 2.22.0-9.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-urllib3 1.25.7-4.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python-wheel 0.33.6-5.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python3x-pip 19.3.1-1.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 python3x-setuptools 41.6.0-4.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 pytz 2019.3-3.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
Rocky Linux 8 scipy 1.3.1-4.module+el8.4.0+570+c2eaf144 RLSA-2020:4641
ReleasePackageFixed inAdvisory
SLES 15 SP1 python-PyYAML 5.1.2-6.6.1 SUSE-SU-2020:0959-1
SLES 15 python-PyYAML 5.1.2-150000.3.6.1 SUSE-SU-2022:2841-1
SLES 12 SP5 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SLES 12 SP4 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SLES 12 SP3 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
Show 19 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP2 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SLES 12 SP1 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SLES 12 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SLES 2 python-PyYAML 5.1.2-6.6.1 SUSE-SU-2020:0959-1
SLES for SAP 15 python-PyYAML 5.1.2-150000.3.6.1 SUSE-SU-2022:2841-1
SLES for SAP 12 SP5 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SLES for SAP 12 SP4 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SLES for SAP 12 SP3 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SLE HPC 15 python-PyYAML 5.1.2-150000.3.6.1 SUSE-SU-2022:2841-1
SUSE OpenStack Cloud Crowbar 8 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE OpenStack Cloud 8 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE OpenStack Cloud 7 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE OpenStack Cloud 6 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE Manager Server 3.2 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE Manager Proxy 3.2 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE Manager Client Tools 12 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE Linux Enterprise Point of Sale 12 SP2 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE HPE Helion OpenStack 8 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
SUSE Enterprise Storage 5 python-PyYAML 5.1.2-26.12.1 SUSE-SU-2020:1285-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.1 python-PyYAML 5.1.2-lp151.2.6.1 openSUSE-SU-2020:0630-1, openSUSE-SU-2020:0507-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-yaml 5.3.1-r0 —
Alpine v3.23 py3-yaml 5.3.1-r0 —
Alpine v3.22 py3-yaml 5.3.1-r0 —
Alpine v3.21 py3-yaml 5.3.1-r0 —
Alpine v3.20 py3-yaml 5.3.1-r0 —
Show 9 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 py3-yaml 5.3.1-r0 —
Alpine v3.18 py3-yaml 5.3.1-r0 —
Alpine v3.17 py3-yaml 5.3.1-r0 —
Alpine v3.16 py3-yaml 5.3.1-r0 —
Alpine v3.15 py3-yaml 5.3.1-r0 —
Alpine v3.14 py3-yaml 5.3.1-r0 —
Alpine v3.13 py3-yaml 5.3.1-r0 —
Alpine v3.12 py3-yaml 5.3.1-r0 —
Alpine v3.11 py3-yaml 5.3.1-r0 —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) PyYAML 5.4.1-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 python38 +7 3.8.3-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-Cython 0.29.14-4.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-PyMySQL 0.9.3-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-asn1crypto 1.2.0-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-babel 2.7.0-10.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-cffi 1.13.2-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-chardet 3.0.4-19.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-cryptography 2.8-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-idna 2.8-6.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-jinja2 2.10.3-4.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-lxml 4.4.1-4.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-markupsafe 1.1.1-6.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-mod_wsgi 4.6.8-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-numpy +2 1.17.3-5.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-pip +1 19.3.1-1.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-ply 3.11-8.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-psutil 5.6.4-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-psycopg2 +2 2.8.4-4.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-pycparser 2.19-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-pysocks 1.7.1-4.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-pytz 2019.3-3.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-pyyaml 5.3.1-1.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-requests 2.22.0-9.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-scipy 1.3.1-4.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-setuptools +1 41.6.0-4.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-six 1.12.0-9.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-urllib3 1.25.7-4.module+el8.3.0+7824+e0098946 ELSA-2020-4641
Oracle Linux 8 python38-wheel +1 0.33.6-5.module+el8.3.0+7824+e0098946 ELSA-2020-4641

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI pyyaml >= 5.1b7, < 5.3.1 5.3.1 GHSA-6757-jp84-gxfx
PyPI pyyaml >= 5.1, < 5.3.1 5.3.1 PYSEC-2020-96

Advisories 10

References