{"id":"CVE-2021-4189","details":"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.","aliases":["BIT-libpython-2021-4189","BIT-python-2021-4189","BIT-python-min-2021-4189"],"modified":"2026-09-12T18:26:43.409837991Z","published":"2022-08-24T16:15:09.827Z","related":["ALSA-2022:1821","ALSA-2022:1986","SUSE-SU-2022:0882-1","SUSE-SU-2022:1091-1","SUSE-SU-2022:1140-1","SUSE-SU-2026:22959-1","openSUSE-SU-2022:1091-1","openSUSE-SU-2024:11835-1","openSUSE-SU-2026:11101-1","openSUSE-SU-2026:11181-1","openSUSE-SU-2026:11342-1","openSUSE-SU-2026:11747-1","openSUSE-SU-2026:11756-1","openSUSE-SU-2026:11757-1","openSUSE-SU-2026:21459-1"],"database_specific":{"unresolved_ranges":[{"cpes":["cpe:2.3:a:python:python:*:*:*:*:*:*:*:*"],"extracted_events":[{"introduced":"3.6.0"},{"fixed":"3.6.14"},{"introduced":"3.7.0"},{"fixed":"3.7.11"},{"introduced":"3.8.0"},{"fixed":"3.8.9"},{"introduced":"3.9.0"},{"fixed":"3.9.3"}],"source":"CPE_RANGE","vendor_product":"python:python"},{"source":"CPE_STRING","vendor_product":"debian:debian_linux","cpes":["cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*"],"extracted_events":[{"introduced":"10.0"},{"last_affected":"10.0"},{"introduced":"11.0"},{"last_affected":"11.0"}]},{"source":"CPE_STRING","vendor_product":"python:python","cpes":["cpe:2.3:a:python:python:3.10.0:-:*:*:*:*:*:*"],"extracted_events":[{"introduced":"3.10.0-NA"},{"last_affected":"3.10.0-NA"}]},{"source":"CPE_STRING","vendor_product":"redhat:enterprise_linux","cpes":["cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*"],"extracted_events":[{"introduced":"8.0"},{"last_affected":"8.0"}]}]},"references":[{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2023/05/msg00024.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00039.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2021-4189"},{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2021-4189"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20221104-0004/"},{"type":"FIX","url":"https://bugs.python.org/issue43285"},{"type":"FIX","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2036020"},{"type":"FIX","url":"https://github.com/python/cpython/commit/0ab152c6b5d95caa2dc1a30fa96e10258b5f188e"},{"type":"FIX","url":"https://python-security.readthedocs.io/vuln/ftplib-pasv.html"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/python/cpython","events":[{"introduced":"0"},{"fixed":"0ab152c6b5d95caa2dc1a30fa96e10258b5f188e"}],"database_specific":{"source":"REFERENCES"}}],"versions":["v3.10.0a1","v3.9.0a2","v3.7.0a2","v3.6.0b1","v3.6.0a3","v3.5.0b1","v3.5.0a4","v3.5.0a3","v3.5.0a2","v3.5.0a1","v3.4.0b3","v3.4.0b2","v3.4.0b1","v3.4.0a4","v3.4.0a3","v3.4.0a2","v3.4.0a1","v3.3.0rc3","v3.3.0rc2","v3.3.0rc1","v3.3.0b2","v3.3.0b1","v3.3.0a4","v3.3.0a3","v3.3.0a2","v3.2rc3","v3.2rc2","v3.2rc1","v3.2b2","v3.2b1","v3.2a4","v3.2a3","v3.2a2","v3.2a1","v3.1","v3.1rc2","v3.1rc1","v3.1b1","v3.1a2","v3.1a1","v3.0rc3","v3.0rc2","v3.0rc1","v3.0b3","v3.0b2","v3.0b1","v3.0a5","v3.0a4","v3.0a3","v3.0a2","v3.0a1","v2.4","v2.4c1","v2.4b2","v2.4b1","v2.4a3","v2.4a2","v2.4a1","v2.3c2","v2.3c1","v2.2a3","v2.1","v2.1c2","v2.1c1","v2.1b2","v2.1b1","v2.1a2","v2.1a1","v2.0","v2.0c1","v2.0b2","v2.0b1","v1.6a2","v1.6a1","v1.5.2","v1.5.2c1","v1.5.2b2","v1.5.2b1","v1.5.2a2","v1.5.2a1","v1.5.1","v1.5","v1.5b2","v1.5b1","v1.5a4","v1.5a3","v1.5a2","v1.5a1","v1.4","v1.4b3","v1.4b2","v1.4b1","v1.3","v1.3b1","v1.2","v1.2b4","v1.2b3","v1.2b2","v1.2b1","v1.1.1","v1.1","v1.0.2","v1.0.1","v0.9.9","v0.9.8"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-4189.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"}]}