CVE-2021-4189
Summary
| CVE | CVE-2021-4189 |
|---|---|
| State | PUBLISHED |
| Assigner | redhat |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2022-08-24 16:15:09 UTC |
| Updated | 2026-10-14 11:16:54 UTC |
| Description | 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. |
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
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 5.3 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| 3.1 | ADP | DECLARED | 5.3 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| 3.1 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | Secondary | 5.3 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
LowIntegrity
NoneAvailability
NoneCVSS: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)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| 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
| Reference | Source | Link | Tags |
|---|---|---|---|
| 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 |
No vendor comments have been submitted for this CVE.
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)