CVE-2021-4189

published 24 Aug 2022 · updated 10 Nov 2026

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

5.3MediumCVSS 5.3EPSS 4%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 4%. Fixed in 3.8.9, 3.6.14, 3.7.11 and 1 more.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Pythonpython>=3.8.0 <3.8.9, >=3.6.0 <3.6.14, >=3.7.0 <3.7.11, >=3.9.0 <3.9.3, =3.10.03.8.9, 3.6.14, 3.7.11, 3.9.3
debiandebian_linux=10.0, =11.0
netappontap_select_deploy_administration_utility
redhatsoftware_collections
redhatenterprise_linux=8.0
=Fixed in python 3.6.14, python 3.7.11, python 3.8.9, python 3.9.3, python 3.10.0

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2021-4189 severity on Zeptric[![CVE-2021-4189](https://zeptric.io/badge/cve/CVE-2021-4189.svg)](https://zeptric.io/cve/CVE-2021-4189)