CVE & CISA-KEV Catalog

CVE-2021-4189

MEDIUMEPSS 87th pctl
5.3
CVSS v3
NVD

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.

How to fix

Remediation Available
pythonAmazon
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
python-debugAmazon
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
python-debuginfoAmazon
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
python-develAmazon
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
python-libsAmazon
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
python-testAmazon
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
python-toolsAmazon
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
tkinterAmazon
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
Fixed in:0:2.7.18-1.amzn2.0.5
pypy3Debian
Fixed in:7.3.5+dfsg-2CVE-2021-4189
Fixed in:7.3.5+dfsg-2CVE-2021-4189
Fixed in:7.3.5+dfsg-2CVE-2021-4189
libpython3.10Ubuntu
Fixed in:3.10.12-1~22.04.16USN-8509-1
libpython3.12t64Ubuntu
Fixed in:3.12.3-1ubuntu0.15USN-8509-1
python2.7Ubuntu
Fixed in:2.7.6-8ubuntu0.6+esm12USN-5342-2

This Ubuntu release reached end-of-life on 2019-04-02.

Fixed in:2.7.12-1ubuntu0~16.04.18+esm1USN-5342-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:2.7.17-1~18.04ubuntu1.7USN-5342-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:2.7.18-1~20.04.3+esm1USN-5342-2

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

Fixed in:2.7.18-13ubuntu1.1+esm2USN-5342-2
python2.7-minimalUbuntu
Fixed in:2.7.6-8ubuntu0.6+esm12USN-5342-2

This Ubuntu release reached end-of-life on 2019-04-02.

Fixed in:2.7.12-1ubuntu0~16.04.18+esm1USN-5342-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:2.7.17-1~18.04ubuntu1.7USN-5342-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:2.7.18-1~20.04.3+esm1USN-5342-2

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

Fixed in:2.7.18-13ubuntu1.1+esm2USN-5342-2
python3.10Ubuntu
Fixed in:3.10.12-1~22.04.4USN-6891-1
Fixed in:3.10.12-1~22.04.16USN-8509-1
python3.10-minimalUbuntu
Fixed in:3.10.12-1~22.04.4USN-6891-1
python3.11Ubuntu
Fixed in:3.11.0~rc1-1~22.04.1~esm1USN-6891-1
Fixed in:3.11.6-3ubuntu0.1USN-6891-1

This Ubuntu release reached end-of-life on 2024-07-12.

python3.11-minimalUbuntu
Fixed in:3.11.0~rc1-1~22.04.1~esm1USN-6891-1
Fixed in:3.11.6-3ubuntu0.1USN-6891-1

This Ubuntu release reached end-of-life on 2024-07-12.

python3.12Ubuntu
Fixed in:3.12.0-1ubuntu0.1USN-6891-1

This Ubuntu release reached end-of-life on 2024-07-12.

Fixed in:3.12.3-1ubuntu0.15USN-8509-1
python3.12-minimalUbuntu
Fixed in:3.12.0-1ubuntu0.1USN-6891-1

This Ubuntu release reached end-of-life on 2024-07-12.

python3.4Ubuntu
Fixed in:3.4.3-1ubuntu1~14.04.7+esm12USN-5342-1

This Ubuntu release reached end-of-life on 2019-04-02.

python3.4-minimalUbuntu
Fixed in:3.4.3-1ubuntu1~14.04.7+esm12USN-5342-1

This Ubuntu release reached end-of-life on 2019-04-02.

python3.5Ubuntu
Fixed in:3.5.2-2ubuntu0~16.04.4~14.04.1+esm1USN-6891-1

This Ubuntu release reached end-of-life on 2019-04-02.

Fixed in:3.5.2-2ubuntu0~16.04.13+esm13USN-6891-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:3.5.2-2ubuntu0~16.04.13+esm2USN-5342-1

This Ubuntu release reached end-of-life on 2021-04-02.

python3.5-minimalUbuntu
Fixed in:3.5.2-2ubuntu0~16.04.4~14.04.1+esm1USN-6891-1

This Ubuntu release reached end-of-life on 2019-04-02.

Fixed in:3.5.2-2ubuntu0~16.04.13+esm13USN-6891-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:3.5.2-2ubuntu0~16.04.13+esm2USN-5342-1

This Ubuntu release reached end-of-life on 2021-04-02.

python3.6Ubuntu
Fixed in:3.6.9-1~18.04ubuntu1.7USN-5342-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:3.6.9-1~18.04ubuntu1.13+esm2USN-6891-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

python3.6-minimalUbuntu
Fixed in:3.6.9-1~18.04ubuntu1.7USN-5342-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:3.6.9-1~18.04ubuntu1.13+esm2USN-6891-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

python3.7Ubuntu
Fixed in:3.7.5-2ubuntu1~18.04.2+esm3USN-6891-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

python3.7-minimalUbuntu
Fixed in:3.7.5-2ubuntu1~18.04.2+esm3USN-6891-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

python3.8Ubuntu
Fixed in:3.8.0-3ubuntu1~18.04.2+esm2USN-6891-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:3.8.10-0ubuntu1~20.04.4USN-5342-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

Fixed in:3.8.10-0ubuntu1~20.04.10USN-6891-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

python3.8-minimalUbuntu
Fixed in:3.8.0-3ubuntu1~18.04.2+esm2USN-6891-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:3.8.10-0ubuntu1~20.04.10USN-6891-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

Fixed in:3.8.10-0ubuntu1~20.04.4USN-5342-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

python3.9Ubuntu
Fixed in:3.9.5-3ubuntu0~20.04.1+esm2USN-6891-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

This vulnerability affects an unusually large number of packages. The highest-confidence fixes are shown above; the full list is longer. Check the referenced advisories for complete coverage.

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityLow
IntegrityNone
AvailabilityNone

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Exploit Intelligence

3.20%probability of exploitation in 30 days
87thpercentile

Elevated risk: more likely to be exploited than 87% of all known CVEs.

References

Related Vulnerabilities

Other CWE-252 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2005-4360High7.887%--
CVE-2007-3798Critical9.870%-Fix
CVE-2010-0211Critical9.828%-Fix
CVE-2022-23626High8.59.9%-Fix
CVE-2019-10902High7.54.7%--
CVE-2018-20216High7.53.9%-Fix

Common questions

How do I fix CVE-2021-4189?

Published advisories record a fix for 37 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.

Is CVE-2021-4189 being actively exploited?

Not that we know of. CVE-2021-4189 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 3.2% is the estimated probability that it will be exploited in the next 30 days. That is higher than 87% of all scored CVEs.

How severe is CVE-2021-4189?

CVE-2021-4189 has a CVSS v3 base score of 5.3, rated medium. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2021-4189 affect?

Published advisories record a fix for python (Amazon), python-debug (Amazon), python-debuginfo (Amazon), python-devel (Amazon), and 33 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2021-4189
CVE-2021-4189 severity badge

Markdown

[![CVE-2021-4189](https://tridentstack.com/cve/badge/CVE-2021-4189.svg)](https://tridentstack.com/cve/CVE-2021-4189)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-4189"><img src="https://tridentstack.com/cve/badge/CVE-2021-4189.svg" alt="CVE-2021-4189"></a>

Check your Linux endpoints for this class of vulnerability

TridentStack Control continuously scans Linux endpoints for known vulnerabilities and deploys the fixes from the same console. 200 endpoints free forever, no credit card.

Patch your fleet freeStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-06-17.