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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | pyyaml | 5.3-2 | — |
| Debian 13 | pyyaml | 5.3-2 | — |
| Debian 12 | pyyaml | 5.3-2 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.1 | python-PyYAML | 5.1.2-lp151.2.6.1 | openSUSE-SU-2020:0630-1, openSUSE-SU-2020:0507-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 2 (CBL-Mariner) | PyYAML | 5.4.1-1 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| 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
- ALSA-2021:2583 Moderate: python38:3.8 and python38-devel:3.8 security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2020:4641 Moderate: python38:3.8 security, bug fix, and enhancement update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2020:4641 Red Hat Security Advisory: python38:3.8 security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Oct 8, 2026
- RLSA-2020:4641 Moderate: python38:3.8 security, bug fix, and enhancement update Rocky Linux Security Advisories · Feb 4, 2026
- SUSE-SU-2020:1285-1 Security update for python-PyYAML SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2020:0959-1 Security update for python-PyYAML SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2020:0630-1 Security update for python-PyYAML SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2020:0507-1 Security update for python-PyYAML SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:2841-1 Security update for python-PyYAML SUSE / openSUSE Security Updates · May 2, 2025
- ELSA-2020-4641 Moderate: python38:3.8 security, bug fix, and enhancement update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Nov 10, 2020
References
- FEDORA-2020-40c35d7b37 vendor-advisory
- FEDORA-2020-bdb0bfa928 vendor-advisory
- FEDORA-2020-e9741a6a15 vendor-advisory
- openSUSE-SU-2020:0507 vendor-advisory
- openSUSE-SU-2020:0630 vendor-advisory
- FEDORA-2021-3342569a0f vendor-advisory
- FEDORA-2021-eed7193502 vendor-advisory
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2020-1747
- https://github.com/yaml/pyyaml/pull/386