Skip to content
Fencer Vulns
medium 5.5

CVE-2019-20907 json

In Lib/tarfile.py in Python through 3.8.3, an attacker is able to craft a TAR archive leading to an infinite loop when opened by tarfile.op…

published 2020-07-13 6 y ago modified 2026-10-14 26 d ago also EUVD-2019-11441

cvss
5.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
3.0%
EPSS 3.0% chance of exploitation in 30 days, percentile 87%
public exploits
0
none known

Summary

In Lib/tarfile.py in Python through 3.8.3, an attacker is able to craft a TAR archive leading to an infinite loop when opened by tarfile.open, because _proc_pax lacks header validation.

Patch / fix

  • Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
  • Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP V3.1.5
  • Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP V3.1.5
  • pypy3 Debian 14, Debian 13, Debian 12 7.3.3+dfsg-1

debian advisories DEBIAN-CVE-2019-20907

  • python2.7 Ubuntu 16.04 LTS 2.7.12-1ubuntu0~16.04.12
  • python2.7 Ubuntu 18.04 LTS 2.7.17-1~18.04ubuntu1.1
  • python2.7 Ubuntu 20.04 LTS 2.7.18-1~20.04.1
  • python3.5 Ubuntu 16.04 LTS 3.5.2-2ubuntu0~16.04.11
  • python3.6 Ubuntu 18.04 LTS 3.6.9-1~18.04ubuntu1.1
  • python3.8 Ubuntu 20.04 LTS 3.8.2-1ubuntu1.2
  • python2.7 Ubuntu Pro 14.04 LTS 2.7.6-8ubuntu0.6+esm6
  • python3.4 Ubuntu Pro 14.04 LTS 3.4.3-1ubuntu1~14.04.7+esm7

ubuntu advisories UBUNTU-CVE-2019-20907

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • rh-python38-python RHEL 3 SOFTWARE_COLLECTIONS 3.8.6-1.el7
  • rh-python38-python-idle RHEL 3 SOFTWARE_COLLECTIONS 3.8.6-1.el7
  • rh-python38-python-libs RHEL 3 SOFTWARE_COLLECTIONS 3.8.6-1.el7
  • rh-python38-python-test RHEL 3 SOFTWARE_COLLECTIONS 3.8.6-1.el7
  • rh-python38-python-psutil RHEL 3 SOFTWARE_COLLECTIONS 5.6.4-5.el7
  • rh-python38-python-tkinter RHEL 3 SOFTWARE_COLLECTIONS 3.8.6-1.el7
  • rh-python38-python-urllib3 RHEL 3 SOFTWARE_COLLECTIONS 1.25.7-6.el7
  • rh-python38-python-rpm-macros RHEL 3 SOFTWARE_COLLECTIONS 3.8.6-1.el7

red hat advisories RHSA-2020:4299RHSA-2020:4641RHSA-2020:4285RHSA-2020:4433RHSA-2020:5010RHSA-2021:0881

  • python311 Linux Micro 6.0 3.11.13-1.1
  • python311-core Linux Micro 6.0 3.11.13-1.1
  • python311 Linux Micro 6.0 3.11.11-1.1
  • python311-core Linux Micro 6.0 3.11.11-1.1
  • python311 Linux Micro 6.0 3.11.8-3.1
  • python311-core Linux Micro 6.0 3.11.8-3.1
  • python3 SLES for SAP 15, SLES 15-LTSS, SLE Module for Basesystem 15 SP2 +3 more 3.6.12-3.67.2
  • python3-core SLES for SAP 15, SLES 15-LTSS, SLE Module for Development Tools 15 SP2 +5 more 3.6.12-3.67.2

suse advisories SUSE-SU-2025:20492-1SUSE-SU-2025:20154-1SUSE-SU-2025:20025-1SUSE-SU-2020:3930-1SUSE-SU-2020:3563-1SUSE-SU-2020:2699-1

  • python315 openSUSE Tumbleweed 3.15.0~a1-1.1
  • python314 openSUSE Tumbleweed 3.14.0~a1-1.1
  • python313 openSUSE Tumbleweed 3.13.0~b3-1.1
  • python310 openSUSE Tumbleweed 3.10.0rc1-4.2
  • python36 openSUSE Tumbleweed 3.6.15-1.1
  • python38 openSUSE Tumbleweed 3.8.12-1.2
  • python39 openSUSE Tumbleweed 3.9.7-2.1
  • python openSUSE Tumbleweed 2.7.18-9.1

opensuse advisories openSUSE-SU-2025:15713-1openSUSE-SU-2024:14434-1openSUSE-SU-2024:14109-1openSUSE-SU-2024:11283-1openSUSE-SU-2024:11284-1openSUSE-SU-2024:11285-1

  • python2-py AlmaLinux 8 1.5.3-6.module_el8.6.0+2781+fed64c13
  • python2-dns AlmaLinux 8 1.15.0-10.module_el8.6.0+2781+fed64c13
  • python2-idna AlmaLinux 8 2.5-7.module_el8.6.0+2781+fed64c13
  • python2-mock AlmaLinux 8 2.0.0-13.module_el8.6.0+2781+fed64c13
  • python2-pytz AlmaLinux 8 2017.2-12.module_el8.6.0+2781+fed64c13
  • python2-attrs AlmaLinux 8 17.4.0-10.module_el8.6.0+2781+fed64c13
  • python2-Cython AlmaLinux 8 0.28.1-7.module_el8.6.0+2781+fed64c13
  • python2-pluggy AlmaLinux 8 0.6.0-8.module_el8.6.0+2781+fed64c13

almalinux advisories ALSA-2020:4654ALSA-2020:4641

  • pytz Rocky Linux 8 2017.2-12.module+el8.5.0+706+735ec4b3
  • pytz Rocky Linux 8 2017.2-12.module+el8.4.0+403+9ae17a31
  • babel Rocky Linux 8 2.5.1-9.module+el8.4.0+403+9ae17a31
  • scipy Rocky Linux 8 1.0.0-20.module+el8.3.0+120+426d8baf
  • Cython Rocky Linux 8 0.28.1-7.module+el8.5.0+706+735ec4b3
  • Cython Rocky Linux 8 0.28.1-7.module+el8.4.0+403+9ae17a31
  • pytest Rocky Linux 8 3.4.2-13.module+el8.5.0+706+735ec4b3
  • pytest Rocky Linux 8 3.4.2-13.module+el8.4.0+403+9ae17a31

rocky linux advisories RLSA-2020:4654RLSA-2020:4641

  • python3 Alpine 3.24, Alpine 3.23, Alpine 3.22 +10 more 3.8.5-r0

alpine advisories ALPINE-CVE-2019-20907

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python2 CBL-Mariner 2.0 2.7.18-8

azure linux advisories AZL-6825

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2019-20907 updated cvss 7.5

python: infinite loop in the tarfile module via crafted TAR archive

  • Red Hat Enterprise Linux 5 python Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools
    affected: workaround, no fix planned “This flaw can be mitigated by not opening untrusted files with tarfile.”
  • Red Hat Quay 3 python27
    affected: workaround, no fix available “This flaw can be mitigated by not opening untrusted files with tarfile.”
  • Red Hat OpenShift Do 1 openshiftdo/odo-init-image-rhel7 1.1.3-2
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0949
  • Red Hat Enterprise Linux AppStream (v. 8) python3-idle 3.6.8-31.el8, python3-test 3.6.8-31.el8, platform-python 3.6.8-31.el8, python3-tkinter 3.6.8-31.el8, babel 2.5.1-9.module+el8.1.0+3111+de3f2d8e, pytz 2019.3-3.module+el8.2.0+5234+f98739b6, +153 more
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2020:4654
  • Red Hat Enterprise Linux BaseOS (v. 8) python3 3.6.8-31.el8, python3-libs 3.6.8-31.el8, python3-test 3.6.8-31.el8, platform-python 3.6.8-31.el8
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2020:4433
  • Red Hat Enterprise Linux Client (v. 7) python 2.7.5-90.el7, python3 3.6.8-18.el7, python-libs 2.7.5-90.el7, python3-libs 3.6.8-18.el7 Red Hat Enterprise Linux Client Optional (v. 7) python3 3.6.8-18.el7, tkinter 2.7.5-90.el7, python-test 2.7.5-90.el7, python-tools 2.7.5-90.el7, python3-idle 3.6.8-18.el7, python3-test 3.6.8-18.el7, +1 more
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2020:5009
  • Red Hat Enterprise Linux ComputeNode EUS (v. 7.6) python 2.7.5-84.el7_6, python-libs 2.7.5-84.el7_6
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0881
  • Red Hat Enterprise Linux ComputeNode EUS (v. 7.7) python 2.7.5-88.el7_7, python-libs 2.7.5-88.el7_7
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0528
show 16 more
  • Red Hat Enterprise Linux ComputeNode Optional (v. 7) python3 3.6.8-18.el7, tkinter 2.7.5-90.el7, python-test 2.7.5-90.el7, python-tools 2.7.5-90.el7, python3-idle 3.6.8-18.el7, python3-test 3.6.8-18.el7, +1 more
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2020:5009
  • Red Hat Enterprise Linux ComputeNode Optional EUS (v. 7.6) tkinter 2.7.5-84.el7_6, python-test 2.7.5-84.el7_6, python-tools 2.7.5-84.el7_6
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0881
  • Red Hat Enterprise Linux ComputeNode Optional EUS (v. 7.7) tkinter 2.7.5-88.el7_7, python-test 2.7.5-88.el7_7, python-tools 2.7.5-88.el7_7
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0528
  • Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server (v. 7) python 2.7.5-84.el7_6, python-libs 2.7.5-84.el7_6 Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server Optional (v. 7) tkinter 2.7.5-84.el7_6, python-test 2.7.5-84.el7_6, python-tools 2.7.5-84.el7_6
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0881
  • Red Hat Enterprise Linux Server (v. 7) python 2.7.5-90.el7, python3 3.6.8-18.el7, python-libs 2.7.5-90.el7, python3-libs 3.6.8-18.el7
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2020:5009
  • Red Hat Enterprise Linux Server AUS (v. 7.4) python 2.7.5-64.el7_4, python-libs 2.7.5-64.el7_4 Red Hat Enterprise Linux Server E4S (v. 7.4) python 2.7.5-64.el7_4, python-libs 2.7.5-64.el7_4
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0761
  • Red Hat Enterprise Linux Server EUS (v. 7.6) python 2.7.5-84.el7_6, python-libs 2.7.5-84.el7_6
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0881
  • Red Hat Enterprise Linux Server EUS (v. 7.7) python 2.7.5-88.el7_7, python-libs 2.7.5-88.el7_7
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0528
  • Red Hat Enterprise Linux Server Optional (v. 7) python3 3.6.8-18.el7, tkinter 2.7.5-90.el7, python-test 2.7.5-90.el7, python-tools 2.7.5-90.el7, python3-idle 3.6.8-18.el7, python3-test 3.6.8-18.el7, +1 more
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2020:5009
  • Red Hat Enterprise Linux Server Optional AUS (v. 7.4) tkinter 2.7.5-64.el7_4, python-test 2.7.5-64.el7_4, python-tools 2.7.5-64.el7_4 Red Hat Enterprise Linux Server Optional E4S (v. 7.4) tkinter 2.7.5-64.el7_4, python-test 2.7.5-64.el7_4, python-tools 2.7.5-64.el7_4
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0761
  • Red Hat Enterprise Linux Server Optional EUS (v. 7.6) tkinter 2.7.5-84.el7_6, python-test 2.7.5-84.el7_6, python-tools 2.7.5-84.el7_6
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0881
  • Red Hat Enterprise Linux Server Optional EUS (v. 7.7) tkinter 2.7.5-88.el7_7, python-test 2.7.5-88.el7_7, python-tools 2.7.5-88.el7_7
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0528
  • Red Hat Enterprise Linux Server Optional TUS (v. 7.4) tkinter 2.7.5-64.el7_4, python-test 2.7.5-64.el7_4, python-tools 2.7.5-64.el7_4 Red Hat Enterprise Linux Server TUS (v. 7.4) python 2.7.5-64.el7_4, python-libs 2.7.5-64.el7_4
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2021:0761
  • Red Hat Enterprise Linux Workstation (v. 7) python 2.7.5-90.el7, python3 3.6.8-18.el7, python-libs 2.7.5-90.el7, python3-libs 3.6.8-18.el7 Red Hat Enterprise Linux Workstation Optional (v. 7) python3 3.6.8-18.el7, tkinter 2.7.5-90.el7, python-test 2.7.5-90.el7, python-tools 2.7.5-90.el7, python3-idle 3.6.8-18.el7, python3-test 3.6.8-18.el7, +1 more
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2020:5009
  • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-python36-python 3.6.12-1.el6, rh-python36-python-pip 9.0.1-5.el6, rh-python36-python-libs 3.6.12-1.el6, rh-python36-python-test 3.6.12-1.el6, rh-python36-python-tools 3.6.12-1.el6, rh-python36-python-tkinter 3.6.12-1.el6, +1 more Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) python27-python 2.7.18-2.el7, python27-tkinter 2.7.18-2.el7, rh-python38-python 3.8.6-1.el7, python27-python-pip 8.1.2-6.el7, rh-python36-python 3.6.12-1.el7, python27-python-libs 2.7.18-2.el7, +17 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) python27-python 2.7.18-2.el7, python27-tkinter 2.7.18-2.el7, rh-python38-python 3.8.6-1.el7, python27-python-pip 8.1.2-6.el7, rh-python36-python 3.6.12-1.el7, python27-python-libs 2.7.18-2.el7, +17 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) python27-python 2.7.18-2.el7, python27-tkinter 2.7.18-2.el7, rh-python38-python 3.8.6-1.el7, python27-python-pip 8.1.2-6.el7, rh-python36-python 3.6.12-1.el7, python27-python-libs 2.7.18-2.el7, +17 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-python36-python 3.6.12-1.el6, rh-python36-python-pip 9.0.1-5.el6, rh-python36-python-libs 3.6.12-1.el6, rh-python36-python-test 3.6.12-1.el6, rh-python36-python-tools 3.6.12-1.el6, rh-python36-python-tkinter 3.6.12-1.el6, +1 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) python27-python 2.7.18-2.el7, python27-tkinter 2.7.18-2.el7, rh-python38-python 3.8.6-1.el7, python27-python-pip 8.1.2-6.el7, rh-python36-python 3.6.12-1.el7, python27-python-libs 2.7.18-2.el7, +17 more
    fixed: vendor fix “This flaw can be mitigated by not opening untrusted files with tarfile.” RHSA-2020:4285
  • Red Hat Enterprise Linux 8 scipy, python36, python-nose, python-wheel, python3-bson, python3-nose, +19 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

cisa ICSA-23-348-10 updated cvss 7.5

Siemens SIMATIC S7-1500

  • Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= 3.1.0, < 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= 3.1.0, < 3.1.5 Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= 3.1.0, < 3.1.5
    affected: fixed in V3.1.5, mitigation support.industry.siemens.com

Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
32 d ago

Exploit prediction

2.96% chance of exploitation in the next 30 days, higher than 87% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CNA 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P

Affected products

  • Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
  • Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP
  • Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP

Classification

Weakness
  • CWE-835 Loop with Unreachable Exit Condition

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.