{"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-04-16T04:39:40.004006153Z","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","openSUSE-SU-2022:1091-1","openSUSE-SU-2024:11835-1"],"references":[{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00039.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2023/05/msg00024.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":"5c4568a05a0a62b5947c55f68f9f2ecfb90a4f12"},{"fixed":"9a0099d1bf14bce417370aae6d55527417cda354"},{"introduced":"1bf9cc509326bc42cd8cb1650eb9bf64550d817e"},{"fixed":"9da28d2b3429d1bb30e082e4c9cb544d81fdae20"},{"introduced":"fa919fdf2583bdfead1df00e842f24f30b2a34bf"},{"fixed":"a743f8192b3b322b2c23b13926f1c7f288cb2206"},{"introduced":"9cf6752276e6fcfd0c23fdb064ad27f448aaaf75"},{"fixed":"e723086bc33c19c6c52046d515eb3c2aab1b8f97"},{"introduced":"0"},{"last_affected":"b494f5935c92951e75597bfe1c8b1f3112fec270"},{"fixed":"0ab152c6b5d95caa2dc1a30fa96e10258b5f188e"}],"database_specific":{"versions":[{"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"},{"introduced":"0"},{"last_affected":"3.10.0-NA"}]}}],"versions":["v0.9.8","v0.9.9","v1.0.1","v1.0.2","v1.1","v1.1.1","v1.2","v1.2b1","v1.2b2","v1.2b3","v1.2b4","v1.3","v1.3b1","v1.4","v1.4b1","v1.4b2","v1.4b3","v1.5","v1.5.1","v1.5.2","v1.5.2a1","v1.5.2a2","v1.5.2b1","v1.5.2b2","v1.5.2c1","v1.5a1","v1.5a2","v1.5a3","v1.5a4","v1.5b1","v1.5b2","v1.6a1","v1.6a2","v2.0","v2.0b1","v2.0b2","v2.0c1","v2.1","v2.1a1","v2.1a2","v2.1b1","v2.1b2","v2.1c1","v2.1c2","v2.2a3","v2.3c1","v2.3c2","v2.4","v2.4a1","v2.4a2","v2.4a3","v2.4b1","v2.4b2","v2.4c1","v3.0a1","v3.0a2","v3.0a3","v3.0a4","v3.0a5","v3.0b1","v3.0b2","v3.0b3","v3.0rc1","v3.0rc2","v3.0rc3","v3.1","v3.10.0","v3.10.0a1","v3.10.0a7","v3.10.0b1","v3.10.0b2","v3.10.0b3","v3.10.0b4","v3.10.0rc1","v3.10.0rc2","v3.1a1","v3.1a2","v3.1b1","v3.1rc1","v3.1rc2","v3.2a1","v3.2a2","v3.2a3","v3.2a4","v3.2b1","v3.2b2","v3.2rc1","v3.2rc2","v3.2rc3","v3.3.0a2","v3.3.0a3","v3.3.0a4","v3.3.0b1","v3.3.0b2","v3.3.0rc1","v3.3.0rc2","v3.3.0rc3","v3.4.0a1","v3.4.0a2","v3.4.0a3","v3.4.0a4","v3.4.0b1","v3.4.0b2","v3.4.0b3","v3.5.0a1","v3.5.0a2","v3.5.0a3","v3.5.0a4","v3.5.0b1","v3.6.0a3","v3.6.0b1","v3.6.0b3","v3.6.0b4","v3.6.0rc1","v3.6.10","v3.6.10rc1","v3.6.11","v3.6.11rc1","v3.6.12","v3.6.13","v3.6.2rc1","v3.6.6rc1","v3.6.8","v3.6.8rc1","v3.6.9","v3.6.9rc1","v3.7.0a2","v3.7.0b1","v3.7.0b2","v3.7.0b3","v3.7.0b4","v3.7.0b5","v3.7.0rc1","v3.7.10","v3.7.2rc1","v3.7.3rc1","v3.7.6rc1","v3.7.7rc1","v3.7.8","v3.7.8rc1","v3.7.9","v3.8.0rc1","v3.8.3","v3.8.3rc1","v3.8.5","v3.8.8","v3.8.8rc1","v3.9.0a2","v3.9.0b1","v3.9.0b3","v3.9.0b5","v3.9.2","v3.9.2rc1"],"database_specific":{"unresolved_ranges":[{"events":[{"introduced":"0"},{"last_affected":"10.0"}]},{"events":[{"introduced":"0"},{"last_affected":"11.0"}]},{"events":[{"introduced":"0"},{"last_affected":"8.0"}]}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-4189.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"}]}