CVE-2021-4189

Summary

CVECVE-2021-4189
StatePUBLISHED
Assignerredhat
Source PriorityCVE Program / NVD first with legacy fallback
Published2022-08-24 16:15:09 UTC
Updated2026-10-14 11:16:54 UTC
DescriptionA 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.

Risk And Classification

Primary CVSS: v3.1 5.3 MEDIUM from [email protected]

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Problem Types: CWE-252 | Not-Known | CWE-252 CWE-252 Unchecked Return Value


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary5.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
3.1ADPDECLARED5.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary5.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Python Python All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na Python affected Fixed in python 3.6.14, python 3.7.11, python 3.8.9, python 3.9.3, python 3.10.0 Not specified
ADP Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified
ADP Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified
ADP Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified
ADP Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified
ADP Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified

References

ReferenceSourceLinkTags
cert-portal.siemens.com/productcert/html/ssa-398330.html 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e cert-portal.siemens.com
Issue 43285: ftplib should not use the host from the PASV response - Python tracker af854a3a-2127-422b-91ae-364da2661108 bugs.python.org Patch, Vendor Advisory
lists.debian.org/debian-lts-announce/2024/12/msg00000.html af854a3a-2127-422b-91ae-364da2661108 lists.debian.org
[SECURITY] [DLA 3477-1] python3.7 security update af854a3a-2127-422b-91ae-364da2661108 lists.debian.org
CVE-2021-4189 Python Vulnerability in NetApp Products | NetApp Product Security af854a3a-2127-422b-91ae-364da2661108 security.netapp.com Third Party Advisory
bpo-43285 Make ftplib not trust the PASV response. (GH-24838) · python/cpython@0ab152c · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Patch, Third Party Advisory
Red Hat Customer Portal - Access to 24x7 support and knowledge af854a3a-2127-422b-91ae-364da2661108 access.redhat.com Third Party Advisory
ftplib should not use the host from the PASV response — Python Security 0.0 documentation af854a3a-2127-422b-91ae-364da2661108 python-security.readthedocs.io Patch, Third Party Advisory
2036020 – (CVE-2021-4189) CVE-2021-4189 python: ftplib should not use the host from the PASV response af854a3a-2127-422b-91ae-364da2661108 bugzilla.redhat.com Issue Tracking, Patch, Third Party Advisory
CVE-2021-4189 af854a3a-2127-422b-91ae-364da2661108 security-tracker.debian.org Third Party Advisory
[SECURITY] [DLA 3432-1] python2.7 security update af854a3a-2127-422b-91ae-364da2661108 lists.debian.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 159808 Oracle Enterprise Linux Security Update for python3 (ELSA-2022-1986)
  • 159819 Oracle Enterprise Linux Security Update for python27:2.7 (ELSA-2022-1821)
  • 179069 Debian Security Update for python2.7 (DLA 2919-1)
  • 181802 Debian Security Update for python2.7 (DLA 3432-1)
  • 198714 Ubuntu Security Notification for Python Vulnerabilities (USN-5342-1)
  • 240254 Red Hat Update for python27-python and python27-python-pip (RHSA-2022:1663)
  • 240302 Red Hat Update for python27:2.7 (RHSA-2022:1821)
  • 240313 Red Hat Update for python3 (RHSA-2022:1986)
  • 282427 Fedora Security Update for python2.7 (FEDORA-2022-18ad73aba6)
  • 282428 Fedora Security Update for python2.7 (FEDORA-2022-ef99a016f6)
  • 353942 Amazon Linux Security Advisory for python : ALAS2-2022-1802
  • 353955 Amazon Linux Security Advisory for python27 : ALAS-2022-1593
  • 6000019 Debian Security Update for python3.7 (DLA 3477-1)
  • 671550 EulerOS Security Update for python3 (EulerOS-SA-2022-1582)
  • 671614 EulerOS Security Update for python2 (EulerOS-SA-2022-1581)
  • 671634 EulerOS Security Update for python3 (EulerOS-SA-2022-1664)
  • 671643 EulerOS Security Update for python3 (EulerOS-SA-2022-1650)
  • 671674 EulerOS Security Update for python (EulerOS-SA-2022-1757)
  • 671858 EulerOS Security Update for python (EulerOS-SA-2022-1911)
  • 751895 SUSE Enterprise Linux Security Update for python3 (SUSE-SU-2022:0882-1)
  • 751961 OpenSUSE Security Update for python (openSUSE-SU-2022:1091-1)
  • 751976 SUSE Enterprise Linux Security Update for python (SUSE-SU-2022:1140-1)
  • 751979 SUSE Enterprise Linux Security Update for python (SUSE-SU-2022:1091-1)
  • 940499 AlmaLinux Security Update for python27:2.7 (ALSA-2022:1821)
  • 940530 AlmaLinux Security Update for python3 (ALSA-2022:1986)
  • 960259 Rocky Linux Security Update for python27:2.7 (RLSA-2022:1821)
  • 960408 Rocky Linux Security Update for python3 (RLSA-2022:1986)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report