Skip to content
Fencer Vulns
medium 5.3

CVE-2021-4189 json

A flaw was found in Python, specifically in the FTP (File Transfer Protocol) client library in PASV (passive) mode.

published 2022-08-24 4 y ago modified 2026-10-14 25 d ago also BIT-libpython-2021-4189 , BIT-python-2021-4189 , BIT-python-min-2021-4189 , EUVD-2021-34049

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

Summary

A flaw was found in Python, specifically in the FTP (File Transfer Protocol) client library in PASV (passive) mode. The issue is how the FTP client trusts the host from the PASV response by default. This flaw allows an attacker to set up a malicious FTP server that can trick FTP clients into connecting back to a given IP address and port. This vulnerability could lead to FTP client scanning ports, which otherwise would not have been possible.

Patch / fix

  • bitnami libpython 3.6.14, 3.7.11, 3.8.9, 3.9.3, 3.10.1
  • bitnami python 3.6.14, 3.7.11, 3.8.9, 3.9.3, 3.10.1
  • bitnami python-min 3.6.14, 3.7.11, 3.8.9, 3.9.3, 3.10.1
  • 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.5+dfsg-2

debian advisories DEBIAN-CVE-2021-4189

  • python2.7 Ubuntu 18.04 LTS 2.7.17-1~18.04ubuntu1.7
  • python3.6 Ubuntu 18.04 LTS 3.6.9-1~18.04ubuntu1.7
  • python2.7 Ubuntu Pro 14.04 LTS 2.7.6-8ubuntu0.6+esm12
  • python2.7 Ubuntu Pro 16.04 LTS 2.7.12-1ubuntu0~16.04.18+esm1
  • python2.7 Ubuntu Pro 20.04 LTS 2.7.18-1~20.04.3+esm1
  • python2.7 Ubuntu Pro 22.04 LTS 2.7.18-13ubuntu1.1+esm2
  • python3.4 Ubuntu Pro 14.04 LTS 3.4.3-1ubuntu1~14.04.7+esm12
  • python3.5 Ubuntu Pro 14.04 LTS 3.5.2-2ubuntu0~16.04.4~14.04.1+esm1

ubuntu advisories UBUNTU-CVE-2021-4189

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-babel RHEL 3 SOFTWARE_COLLECTIONS 2.7.0-12.el7
  • rh-python38-python RHEL 3 SOFTWARE_COLLECTIONS 3.8.11-2.el7
  • rh-python38-python-pip RHEL 3 SOFTWARE_COLLECTIONS 19.3.1-2.el7
  • rh-python38-python-idle RHEL 3 SOFTWARE_COLLECTIONS 3.8.11-2.el7
  • rh-python38-python-libs RHEL 3 SOFTWARE_COLLECTIONS 3.8.11-2.el7
  • rh-python38-python-lxml RHEL 3 SOFTWARE_COLLECTIONS 4.4.1-7.el7
  • rh-python38-python-test RHEL 3 SOFTWARE_COLLECTIONS 3.8.11-2.el7
  • rh-python38-python-babel RHEL 3 SOFTWARE_COLLECTIONS 2.7.0-12.el7

red hat advisories RHSA-2021:3254RHSA-2022:1821RHSA-2022:1663RHSA-2022:1986

  • python311 Linux Micro 6.1 3.11.16-slfo.1.1_1.1
  • python311-core Linux Micro 6.1 3.11.16-slfo.1.1_1.1
  • python3 Linux Micro 6.2 3.13.14-160000.1.1
  • python313 Linux Micro 6.2 3.13.14-160000.1.1
  • python313-core Linux Micro 6.2 3.13.14-160000.1.1
  • python SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES 12 SP5 +3 more 2.7.18-33.8.1
  • python-base SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES 12 SP5 +4 more 2.7.18-33.8.1
  • python SLE Real Time 15 SP2, SLE Module for Python 2 15 SP3, SLE Module for Desktop Applications 15 SP3 +1 more 2.7.18-150000.38.1

suse advisories SUSE-SU-2026:4534-1SUSE-SU-2026:23743-1SUSE-SU-2026:22959-1SUSE-SU-2022:1140-1SUSE-SU-2022:1091-1SUSE-SU-2022:0882-1

  • python316 openSUSE Tumbleweed 3.16.0~a1-1.1
  • python311 openSUSE Tumbleweed 3.11.16-1.1
  • python312 openSUSE Tumbleweed 3.12.14-1.1
  • python310 openSUSE Tumbleweed 3.10.21-1.1
  • python3 openSUSE Leap 16.0 3.13.14-160000.1.1
  • python313 openSUSE Leap 16.0 3.13.14-160000.1.1
  • python313-core openSUSE Leap 16.0 3.13.14-160000.1.1
  • python313-nogil openSUSE Leap 16.0 3.13.14-160000.1.1

opensuse advisories openSUSE-SU-2026:12477-1openSUSE-SU-2026:11756-1openSUSE-SU-2026:11757-1openSUSE-SU-2026:11747-1openSUSE-SU-2026:21459-1openSUSE-SU-2026:11342-1

  • python3-idle AlmaLinux 8 3.6.8-45.el8.alma
  • python3-libs AlmaLinux 8 3.6.8-45.el8.alma
  • python3-test AlmaLinux 8 3.6.8-45.el8.alma
  • platform-python AlmaLinux 8 3.6.8-45.el8.alma
  • python3-tkinter AlmaLinux 8 3.6.8-45.el8.alma
  • babel AlmaLinux 8 2.5.1-10.module_el8.6.0+2781+fed64c13
  • python2 AlmaLinux 8 2.7.18-10.module_el8.6.0+2781+fed64c13.alma
  • python2-py AlmaLinux 8 1.5.3-6.module_el8.6.0+2781+fed64c13

almalinux advisories ALSA-2022:1986ALSA-2022:1821

  • 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-10.module+el8.5.0+706+735ec4b3
  • numpy Rocky Linux 8 1:1.14.2-16.module+el8.5.0+706+735ec4b3
  • numpy Rocky Linux 8 1:1.14.2-16.module+el8.4.0+403+9ae17a31
  • scipy Rocky Linux 8 1.0.0-21.module+el8.5.0+671+195e4563
  • 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

rocky linux advisories RLSA-2022:1821

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-2021-4189 updated cvss 5.3

python: ftplib should not use the host from the PASV response

  • Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 7 python, python3, tkinter, python-libs, python-test, python-tools, +4 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux AppStream (v. 8) python3-idle 3.6.8-45.el8, python3-test 3.6.8-45.el8, platform-python 3.6.8-45.el8, python3-tkinter 3.6.8-45.el8, pytz 2017.2-12.module+el8.1.0+3111+de3f2d8e, PyYAML 3.12-16.module+el8.1.0+3111+de3f2d8e, +87 more
    fixed: vendor fix RHSA-2022:1821
  • Red Hat Enterprise Linux BaseOS (v. 8) python3 3.6.8-45.el8, python3-libs 3.6.8-45.el8, python3-test 3.6.8-45.el8, platform-python 3.6.8-45.el8
    fixed: vendor fix RHSA-2022:1986
  • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-python38-babel 2.7.0-12.el7, rh-python38-python 3.8.11-2.el7, rh-python38-python-lxml 4.4.1-7.el7, rh-python38-python-pip 19.3.1-2.el7, rh-python38-python-idle 3.8.11-2.el7, rh-python38-python-libs 3.8.11-2.el7, +9 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-python38-babel 2.7.0-12.el7, rh-python38-python 3.8.11-2.el7, rh-python38-python-lxml 4.4.1-7.el7, rh-python38-python-pip 19.3.1-2.el7, rh-python38-python-idle 3.8.11-2.el7, rh-python38-python-libs 3.8.11-2.el7, +9 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-python38-babel 2.7.0-12.el7, rh-python38-python 3.8.11-2.el7, rh-python38-python-lxml 4.4.1-7.el7, rh-python38-python-pip 19.3.1-2.el7, rh-python38-python-idle 3.8.11-2.el7, rh-python38-python-libs 3.8.11-2.el7, +9 more
    fixed: vendor fix RHSA-2021:3254
  • Red Hat Software Collections for RHEL Workstation(v. 7) python27-python 2.7.18-4.el7, python27-tkinter 2.7.18-4.el7, python27-python-libs 2.7.18-4.el7, python27-python-test 2.7.18-4.el7, python27-python-tools 2.7.18-4.el7 Red Hat Software Collections for RHEL(v. 7) python27-python 2.7.18-4.el7, python27-tkinter 2.7.18-4.el7, python27-python-libs 2.7.18-4.el7, python27-python-test 2.7.18-4.el7, python27-python-tools 2.7.18-4.el7
    fixed: vendor fix RHSA-2022:1663
  • Red Hat Enterprise Linux 8 pytz, babel, numpy, scipy, Cython, PyYAML, +116 more Red Hat Software Collections for RHEL Workstation(v. 7) python27-python-pip 8.1.2-7.el7 Red Hat Software Collections for RHEL(v. 7) python27-python-pip 8.1.2-7.el7
    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 5.3

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
yes
Technical impact
partial
Assessed
16 mo ago

Exploit prediction

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

CVSS scores

assigned by version score vector
CISA ADP 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
NVD 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
CNA 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
OSV 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected packages

ecosystem package affected fixed in
bitnami libpython
>=3.6.0, <3.6.14
>=3.7.0, <3.7.11
>=3.8.0, <3.8.9
>=3.9.0, <3.9.3
>=3.10.0, <3.10.1
3.6.14
3.7.11
3.8.9
3.9.3
3.10.1
bitnami python
>=3.6.0, <3.6.14
>=3.7.0, <3.7.11
>=3.8.0, <3.8.9
>=3.9.0, <3.9.3
>=3.10.0, <3.10.1
3.6.14
3.7.11
3.8.9
3.9.3
3.10.1
bitnami python-min
>=3.6.0, <3.6.14
>=3.7.0, <3.7.11
>=3.8.0, <3.8.9
>=3.9.0, <3.9.3
>=3.10.0, <3.10.1
3.6.14
3.7.11
3.8.9
3.9.3
3.10.1

Affected products

  • n/a python
  • 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

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.