Skip to main content
No exploitation reportedFix available

CVE-2021-4189

No exploitation reported by the sources we read.

  • Published2022-08-24
  • Fixed in3.10.1 · 3.9.3 · 3.8.9 · 3.7.11 · 3.6.14
  • WeaknessCWE-252

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-08-2416:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-10-23 21:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2021-4189?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2021-4189?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

OSV · NVD
Python
BranchAffectedFixed in
3.10≥ 3.10.0, < 3.10.13.10.1
3.9≥ 3.9.0, < 3.9.33.9.3
3.8≥ 3.8.0, < 3.8.93.8.9
3.7≥ 3.7.0, < 3.7.113.7.11
3.6≥ 3.6.0, < 3.6.143.6.14
3.10= 3.10.0no fix published
Debian debian linux
BranchAffectedFixed in
10.0= 10.0no fix published
11.0= 11.0no fix published
Netapp ontap select deploy administration utility
BranchAffectedFixed in
—all versionsno fix published

2 more products in the sources.

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • babelAlmaLinux:8all versions · fixed in 2.5.1-10.module_el8.6.0+2781+fed64c13and 1 other package
  • platform-pythonAlmaLinux:8all versions · fixed in 3.6.8-45.el8.almaand 6 other packages
  • python-nose-docsAlmaLinux:8all versions · fixed in 1.3.7-31.module_el8.5.0+2569+5c5719bc
  • python-sqlalchemy-docAlmaLinux:8all versions · fixed in 1.3.2-2.module_el8.5.0+2569+5c5719bc
  • python2AlmaLinux:8all versions · fixed in 2.7.18-10.module_el8.6.0+2781+fed64c13.almaand 6 other packages
  • python2-attrsAlmaLinux:8all versions · fixed in 17.4.0-10.module_el8.6.0+2781+fed64c13
  • python2-backportsAlmaLinux:8all versions · fixed in 1.0-16.module_el8.6.0+2781+fed64c13
  • python2-backports-ssl_match_hostnameAlmaLinux:8all versions · fixed in 3.5.0.1-12.module_el8.6.0+2781+fed64c13

37 more package ranges on OSV.dev

Full record on NVD

Fix

  1. Update Python to 3.10.1 · 3.9.3 · 3.8.9 · 3.7.11 · 3.6.14

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof-of-concept repositories
none listed
PoC-in-GitHub

Sources

  • CISA-ADPSSVC decisionnone2025-06-25
  • OpenCVESSVC decisionnone—
  • CISA-ADPCVSS 3.15.32025-06-25
  • NVDCVSS 3.15.3read 2026-10-23
  • CISA-ADPweakness (CWE)CWE-2522025-06-25
  • NVDweakness (CWE)CWE-252read 2026-10-23
  • FIRST EPSSEPSS score3.4 %2026-10-22
  • OSVaffected packages—

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Published
2022-08-24
Last Modified
2026-10-14
NVD status
Modified

Frequently asked questions

What is CVE-2021-4189?

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.

Is CVE-2021-4189 actively exploited?

Active exploitation of CVE-2021-4189 has not been confirmed. Its EPSS score was 3.4% on 2026-10-22, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-4189?

CVE-2021-4189 has a CVSS v3 base score of 5.3 (MEDIUM severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.

Running Python? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month