CVE-2021-4189

5.3 MEDIUM
Published: August 24, 2022 Modified: December 17, 2025

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.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://access.redhat.com/security/cve/CVE-2021-4189
Source: secalert@redhat.com
Third Party Advisory
https://bugs.python.org/issue43285
Source: secalert@redhat.com
Patch Vendor Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2036020
Source: secalert@redhat.com
Issue Tracking Patch Third Party Advisory
https://python-security.readthedocs.io/vuln/ftplib-pasv.html
Source: secalert@redhat.com
Patch Third Party Advisory
https://security-tracker.debian.org/tracker/CVE-2021-4189
Source: secalert@redhat.com
Third Party Advisory
https://security.netapp.com/advisory/ntap-20221104-0004/
Source: secalert@redhat.com
Third Party Advisory
https://access.redhat.com/security/cve/CVE-2021-4189
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory
https://bugs.python.org/issue43285
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Vendor Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2036020
Source: af854a3a-2127-422b-91ae-364da2661108
Issue Tracking Patch Third Party Advisory
https://github.com/python/cpython/commit/0ab152c6b5d95caa2dc1a30fa96e10258b5f188e
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory
https://python-security.readthedocs.io/vuln/ftplib-pasv.html
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory
https://security-tracker.debian.org/tracker/CVE-2021-4189
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory
https://security.netapp.com/advisory/ntap-20221104-0004/
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory

19 reference(s) from NVD

Quick Stats

CVSS v3 Score
5.3 / 10.0
EPSS (Exploit Probability)
0.7%
71th percentile
Exploitation Status
Not in CISA KEV

Weaknesses (CWE)

Affected Vendors

netapp debian redhat python