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.
CVE-2021-4189
Score 5.3 from GitHub Security Advisory published 2022-08-25. NVD baseline CVSS 5.3; sources differ by 0.0.
- Lower severity and no public exploit yet
A fix is available — apply it.
- CVSS v3
- 5.3
- EG Score
- 5.3(medium)
- EPSS
- 83.7%
- KEV
- Not listed
Published
August 24, 2022
Last Modified
December 17, 2025
References (19)
- secalert@redhathttps://access.redhat.com/security/cve/CVE-2021-4189
- secalert@redhathttps://bugs.python.org/issue43285
- secalert@redhathttps://bugzilla.redhat.com/show_bug.cgi?id=2036020
- secalert@redhathttps://github.com/python/cpython/commit/0ab152c6b5d95caa2dc1a30fa96e10258b5f188e
- secalert@redhathttps://lists.debian.org/debian-lts-announce/2023/05/msg00024.html
- secalert@redhathttps://lists.debian.org/debian-lts-announce/2023/06/msg00039.html
- secalert@redhathttps://python-security.readthedocs.io/vuln/ftplib-pasv.html
- secalert@redhathttps://security-tracker.debian.org/tracker/CVE-2021-4189
- secalert@redhathttps://security.netapp.com/advisory/ntap-20221104-0004/
- af854a3a-2127-422b-91ae-364da2661108https://access.redhat.com/security/cve/CVE-2021-4189
- af854a3a-2127-422b-91ae-364da2661108https://bugs.python.org/issue43285
- af854a3a-2127-422b-91ae-364da2661108https://bugzilla.redhat.com/show_bug.cgi?id=2036020
- af854a3a-2127-422b-91ae-364da2661108https://github.com/python/cpython/commit/0ab152c6b5d95caa2dc1a30fa96e10258b5f188e
- af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2023/05/msg00024.html
- af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2023/06/msg00039.html
Vendor Advisories for CVE-2021-4189(4)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
- RHSA-2022:1986Red Hat Product SecurityMedium
Red Hat Security Advisory: python3 security update
- RHSA-2022:1821Red Hat Product SecurityMedium
Red Hat Security Advisory: python27:2.7 security update
- RHSA-2022:1663Red Hat Product SecurityMedium
Red Hat Security Advisory: python27-python and python27-python-pip security update
- RHSA-2021:3254Red Hat Product SecurityMedium
Red Hat Security Advisory: rh-python38 security, bug fix, and enhancement update
Patch Availability(7)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | python3.11-venv (3.11.0~rc1-1~22.04.1~esm1) @ jammy | 2026-05-25 | ubuntu |
| ubuntu | libpython3.6 (3.6.9-1~18.04ubuntu1.7) @ bionic | 2026-05-25 | ubuntu |
| ubuntu | libpython2.7-stdlib (2.7.6-8ubuntu0.6+esm12) @ trusty | 2026-05-25 | ubuntu |
| redhat | python3-0:3.6.8-45.el8 | 2022-05-10 | redhat |
| redhat | python27:2.7-8060020220210185952.8cdc2268 | 2022-05-10 | redhat |
| redhat | python27-python-0:2.7.18-4.el7 | 2022-05-02 | redhat |
| redhat | rh-python38-python-urllib3-0:1.25.7-7.el7 | 2021-08-24 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(3)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
Data Freshness Timeline
(refreshed 11× in last 7d / 48× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 101 total refreshes for this CVE.
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-19 14:29 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-16 21:20 UTCOSV refresh
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 06:11 UTCEPSS rescore
- 2026-07-13 06:11 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-07 13:43 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-01 15:04 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-29 14:04 UTCEPSS rescore
- 2026-06-29 14:04 UTCEPSS rescore
- 2026-06-28 20:02 UTCOSV refresh
- 2026-06-28 14:05 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-27 03:07 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-22 14:24 UTCEPSS rescore
- 2026-06-21 14:55 UTCEPSS rescore
- 2026-06-21 01:58 UTCEPSS rescore
- 2026-06-21 01:58 UTCEPSS rescore
- 2026-06-19 19:24 UTCEPSS rescore
- 2026-06-19 19:24 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-16 17:51 UTCEPSS rescore
- 2026-06-15 17:46 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-12 23:10 UTCEPSS rescore
- 2026-06-11 13:58 UTCEPSS rescore
- 2026-06-11 13:55 UTCOSV refresh
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 13:20 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 06:09 UTCEPSS rescore
- 2026-06-05 06:09 UTCEPSS rescore
- 2026-06-04 13:11 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-06-01 13:50 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-29 13:42 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-26 13:43 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-25 16:40 UTCEG score recompute
- 2026-05-25 16:40 UTCVendor advisory
- 2026-05-25 16:39 UTCGHSA enrichment
Related CVEs(same vendor + same CWE)
Same vendor
10 shownredhat
Same CWE
10 shownCWE-252
Frequently asked(5)
What is CVE-2021-4189?
When was CVE-2021-4189 disclosed?
Is CVE-2021-4189 actively exploited?
What is the CVSS score of CVE-2021-4189?
How do I remediate CVE-2021-4189?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2021-4189
Is Your Infrastructure Affected by CVE-2021-4189?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.