What’s Vulnerable › Vulnerabilities
CVE-2021-4189
- Severity: medium (CVSS 5.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-08-24 · updated 2026-10-14
- Weakness: CWE-252
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.
Affected products
- Debian Linux: 10.0, 11.0
- NetApp ONTAP Select Deploy administration utility: all versions
- Python: from 3.6.0 before 3.6.14; from 3.7.0 before 3.7.11; from 3.8.0 before 3.8.9; from 3.9.0 before 3.9.3; 3.10.0 — fixed in 3.6.14, 3.7.11, 3.8.9, 3.9.3
- Red Hat Enterprise Linux: 8.0
- RedHat Software Collections: all versions
How to fix
Upgrade to a fixed version: Python 3.6.14, 3.7.11, 3.8.9, 3.9.3. Check the vendor advisory for mitigations.
References
- https://access.redhat.com/security/cve/CVE-2021-4189
- https://bugs.python.org/issue43285
- https://bugzilla.redhat.com/show_bug.cgi?id=2036020
- https://github.com/python/cpython/commit/0ab152c6b5d95caa2dc1a30fa96e10258b5f188e
- https://lists.debian.org/debian-lts-announce/2023/05/msg00024.html
- https://lists.debian.org/debian-lts-announce/2023/06/msg00039.html
- https://python-security.readthedocs.io/vuln/ftplib-pasv.html
- https://security-tracker.debian.org/tracker/CVE-2021-4189
- https://security.netapp.com/advisory/ntap-20221104-0004/
- https://access.redhat.com/security/cve/CVE-2021-4189
- https://bugs.python.org/issue43285
- https://bugzilla.redhat.com/show_bug.cgi?id=2036020
Get alerted when CVE-2021-4189 or the next vulnerability affects your stack