VulnarioBlogPython vulnerabilities

Python Vulnerabilities: The 10 Most Critical Python Security Bugs (CVEs)

Python vulnerabilities are security flaws in Python that attackers can abuse to steal data, take over a server or interrupt a service. Python is one of the most popular programming languages for web, data and automation. The National Vulnerability Database (NVD) lists 140 CVEs for Python, 17 of them rated critical, and 14 were published in the last 12 months. None of them is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog for the product entries we checked.

This guide lists the 10 most critical Python security bugs, with the CVE number, CVSS score, affected versions and what to do about each one. It also covers Python security basics, the current end-of-life dates and a free way to be told about the next Python CVE as soon as it is published.

Key takeaways

  • No Python CVE is currently in CISA's KEV catalog for the entries we checked, but critical flaws still get exploited quickly once details are public.
  • 17 Python CVEs are rated critical (CVSS v3), and 14 new ones were published in the last 12 months.
  • The newest CVE in this guide is CVE-2022-48565, published Aug 22, 2023.
  • Supported Python releases today (per endoflife.date): 3.15, 3.14, 3.13, 3.12, 3.11. Releases not on the list are past their announced end of life.
  • You can monitor Python for free. Vulnario emails you when a new CVE matches your version and the rest of your stack.

How we ranked these Python CVEs

We ranked CVEs first by whether CISA lists them as exploited, then by CVSS score (v3 scores before the older v2 scale, which is marked when used), then by publication date (newest first). When a technology has several product entries in NVD, we combined them and removed duplicates. This favors the bugs that matter most in practice, so the guide is a list of the most critical flaws we found, not a complete history.

Every CVE number, score, date and affected version below comes from the NVD record and the CISA KEV catalog, checked on Nov 3, 2026. Scores can change when NVD reanalyzes a record, so open the linked record if you need the current value.

The 10 most critical Python CVEs at a glance

Most critical Python vulnerabilities (data from NVD and CISA KEV)
#CVECVSSPublishedTypeCISA KEV
1CVE-2022-485659.8 Critical2023-08-22XML external entity (XXE)No
2CVE-2022-374549.8 Critical2022-10-21Integer overflowNo
3CVE-2021-299219.8 Critical2021-05-06Critical security flawNo
4CVE-2021-31779.8 Critical2021-01-19Buffer overflowNo
5CVE-2020-276199.8 Critical2020-10-22Critical security flawNo
6CVE-2020-158019.8 Critical2020-07-17Critical security flawNo
7CVE-2014-46509.8 Critical2020-02-20Path traversalNo
8CVE-2019-129009.8 Critical2019-06-19Out-of-bounds writeNo
9CVE-2019-101609.8 Critical2019-06-07Critical security flawNo
10CVE-2019-96369.8 Critical2019-03-08Information disclosureNo

Each Python CVE explained

1. CVE-2022-48565: XML external entity (XXE)

  • CVSS 9.8 Critical
  • Published 2023-08-22
  • CWE-611
What NVD says
An XML External Entity (XXE) issue was discovered in Python through 3.9.1. The plistlib module no longer accepts entity declarations in XML plist files to avoid XML vulnerabilities.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 3.6.13; 3.7.0 to before 3.7.10; 3.8.0 to before 3.8.7; 3.9.0 to before 3.9.1
What to do
Upgrade to the fixed release for your branch (3.6.13, 3.7.10, 3.8.7) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2022-48565 (opens in a new tab)

2. CVE-2022-37454: Integer overflow

  • CVSS 9.8 Critical
  • Published 2022-10-21
  • CWE-190
What NVD says
The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and resultant buffer overflow that allows attackers to execute arbitrary code or eliminate expected cryptographic properties. This occurs in the sponge function interface.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
3.6.0 to before 3.7.16; 3.8.0 to before 3.8.16; 3.9.0 to before 3.9.16; 3.10.0 to before 3.10.9
What to do
Upgrade to the fixed release for your branch (3.7.16, 3.8.16, 3.9.16) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2022-37454 (opens in a new tab)

3. CVE-2021-29921: Critical security flaw

  • CVSS 9.8 Critical
  • Published 2021-05-06
What NVD says
In Python before 3,9,5, the ipaddress library mishandles leading zero characters in the octets of an IP address string. This (in some situations) allows attackers to bypass access control that is based on IP addresses.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
3.8.0 to before 3.8.12; 3.9.0 to before 3.9.5
What to do
Upgrade to the fixed release for your branch (3.8.12, 3.9.5) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2021-29921 (opens in a new tab)

4. CVE-2021-3177: Buffer overflow

  • CVSS 9.8 Critical
  • Published 2021-01-19
  • CWE-120
What NVD says
Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Python applications that accept floating-point numbers as untrusted input, as demonstrated by a 1e300 argument to c_double.from_param. This occurs because sprintf is used unsafely.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
3.6.0 through 3.6.12; 3.7.0 through 3.7.9; 3.8.0 through 3.8.7; 3.9.0 through 3.9.1
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2021-3177 (opens in a new tab)

5. CVE-2020-27619: Critical security flaw

  • CVSS 9.8 Critical
  • Published 2020-10-22
What NVD says
In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
3.0.0 to before 3.6.13; 3.7.0 to before 3.7.10; 3.8.0 to before 3.8.7; 3.9.0 to before 3.9.1
What to do
Upgrade to the fixed release for your branch (3.6.13, 3.7.10, 3.8.7) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2020-27619 (opens in a new tab)

6. CVE-2020-15801: Critical security flaw

  • CVSS 9.8 Critical
  • Published 2020-07-17
  • CWE-426
What NVD says
In Python 3.8.4, sys.path restrictions specified in a python38._pth file are ignored, allowing code to be loaded from arbitrary locations. The <executable-name>._pth file (e.g., the python._pth file) is not affected.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
3.7.0 to before 3.7.9; 3.8.0 to before 3.8.5
What to do
Upgrade to the fixed release for your branch (3.7.9, 3.8.5) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2020-15801 (opens in a new tab)

7. CVE-2014-4650: Path traversal

  • CVSS 9.8 Critical
  • Published 2020-02-20
  • CWE-22
What NVD says
The CGIHTTPServer module in Python 2.7.5 and 3.3.4 does not properly handle URLs in which URL encoding is used for path separators, which allows remote attackers to read script source code or conduct directory traversal attacks and execute unintended code via a crafted character sequence, as demonstrated by a %2f separator.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
2.7.0 to before 2.7.8; 3.2.0 to before 3.2.6; 3.3.0 to before 3.3.6; 3.4.0 to before 3.4.2
What to do
Upgrade to the fixed release for your branch (2.7.8, 3.2.6, 3.3.6) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2014-4650 (opens in a new tab)

8. CVE-2019-12900: Out-of-bounds write

  • CVSS 9.8 Critical
  • Published 2019-06-19
  • CWE-787
What NVD says
BZ2_decompress in decompress.c in bzip2 through 1.0.6 has an out-of-bounds write when there are many selectors.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
3.7.0 to before 3.7.13; 3.8.0 to before 3.8.13; 3.9.0 to before 3.9.11; 3.10.0 to before 3.10.3
What to do
Upgrade to the fixed release for your branch (3.7.13, 3.8.13, 3.9.11) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2019-12900 (opens in a new tab)

9. CVE-2019-10160: Critical security flaw

  • CVSS 9.8 Critical
  • Published 2019-06-07
  • CWE-172
What NVD says
A security regression of CVE-2019-9636 was discovered in python since commit d537ab0ff9767ef024f26246899728f0116b1ec3 affecting versions 2.7, 3.5, 3.6, 3.7 and from v3.8.0a4 through v3.8.0b1, which still allows an attacker to exploit CVE-2019-9636 by abusing the user and password parts of a URL.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
2.7.0 to before 2.7.17; 3.5.0 to before 3.5.8; 3.6.0 to before 3.6.9; 3.7.0 to before 3.7.4
What to do
Upgrade to the fixed release for your branch (2.7.17, 3.5.8, 3.6.9) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2019-10160 (opens in a new tab)

10. CVE-2019-9636: Information disclosure

  • CVSS 9.8 Critical
  • Published 2019-03-08
  • CWE-173
What NVD says
Python 2.7.x through 2.7.16 and 3.x through 3.7.2 is affected by: Improper Handling of Unicode Encoding (with an incorrect netloc) during NFKC normalization. The impact is: Information disclosure (credentials, cookies, etc. that are cached against a given hostname). The components are: urllib.parse.urlsplit, urllib.parse.urlparse.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
2.7.0 to before 2.7.17; 3.0.0 to before 3.4.10; 3.5.0 to before 3.5.7; 3.6.0 to before 3.6.9
What to do
Upgrade to the fixed release for your branch (2.7.17, 3.4.10, 3.5.7) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2019-9636 (opens in a new tab)

Python end of life: which versions still get security fixes

Running a release that still receives security fixes is the most effective way to avoid Python vulnerabilities. After a release reaches end of life, newly published CVEs stay unpatched. As of Nov 3, 2026 the supported Python releases are 3.15, 3.14, 3.13, 3.12, 3.11.

Python release support (source: endoflife.date, checked Nov 3, 2026)
ReleaseReleasedEnd of lifeLatestStatus
Python 3.15Oct 9, 2026Oct 31, 20313.15.2Supported
Python 3.14Oct 7, 2025Oct 31, 20303.14.10Supported
Python 3.13Oct 7, 2024Oct 31, 20293.13.18Supported
Python 3.12Oct 2, 2023Oct 31, 20283.12.16Supported
Python 3.11Oct 24, 2022Oct 31, 20273.11.18Supported
Python 3.10Oct 4, 2021Oct 1, 20263.10.22End of life
Python 3.9Oct 5, 2020Oct 31, 20253.9.25End of life
Python 3.8Oct 14, 2019Oct 7, 20243.8.20End of life

Dates come from endoflife.date (opens in a new tab), which tracks each project's own support policy. Confirm them with the vendor before planning an upgrade.

How to check if your Python is vulnerable

Find the exact version first, then compare it with the affected and fixed versions in each CVE above.

python3 --version

On Linux, Debian, Ubuntu and RHEL-based distributions often backport security fixes and keep the old version number, so a package that looks old can already be patched. Check your distribution's own security tracker or the package changelog before concluding that a server is exposed.

Python security checklist

  1. Run a supported release and move to the next branch before the current one reaches end of life.
  2. Apply patch releases promptly.
  3. Pin and audit your dependencies, and update the vulnerable ones.
  4. Run applications as an unprivileged user.
  5. Disable features and functions your application does not need.

Where you run Python matters as much as how you patch it. Whether your site lives on a VPS, a dedicated server or shared hosting (opens in a new tab), check who is responsible for updating Python: on most plans the operating system and applications are yours to patch unless the plan says otherwise.

Your stack is bigger than Python. A flaw anywhere in the chain can be the way in, so also review our guides to Django vulnerabilities, Flask vulnerabilities and FastAPI vulnerabilities.

How to get alerted about new Python vulnerabilities

NVD received 14 new Python CVEs in the last twelve months, and critical ones can be exploited within days. Reading advisories by hand is easy to forget, so most teams automate it. You have three practical options:

  • Follow the vendor's announcements and your distribution's security list. They are accurate but cover only one product and you read them manually.
  • Query the NVD feed yourself. It is complete and needs scripting, filtering and a mail or chat integration to maintain.
  • Use a stack-based alert service. You pick your technologies once and receive an email when a matching CVE appears.

Vulnario is the third option, and it is free to start. It scans the National Vulnerability Database, the CISA KEV catalog and GitHub Security Advisories every hour. You choose Python and the rest of your stack, confirm your email with a code, and the alerts begin. Each email includes the CVE number, the CVSS score, a marker when CISA lists the flaw as actively exploited, the attack vector, a patch or advisory link and a suggested time frame to fix it.

  • Free: all technologies, alerts grouped at most every 12 hours.
  • Pro ($29/month): alerts are sent on the next hourly scan, so you hear about a new CVE up to 12 hours earlier.

Few stacks run Python alone. These guides cover the technologies it is most often deployed with.

Frequently asked questions about Python vulnerabilities

What are the most critical Python vulnerabilities?

Based on NVD scores and CISA's exploited-vulnerability catalog, the most critical Python CVEs include CVE-2022-48565 (CVSS 9.8), CVE-2022-37454 (CVSS 9.8), CVE-2021-29921 (CVSS 9.8). The guide above ranks the 10 most critical with affected versions and fixes.

Have Python vulnerabilities been exploited in real attacks?

For the Python product entries we checked, none of the CVEs is currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. A CVE can still be exploited before it is added, so keep Python patched.

How many vulnerabilities does Python have?

As of Nov 3, 2026 the National Vulnerability Database lists 140 CVEs for Python, with 17 rated critical by CVSS v3. 14 were published in the previous twelve months.

Which Python versions are still supported?

As of Nov 3, 2026, endoflife.date lists these Python releases as supported: 3.15, 3.14, 3.13, 3.12, 3.11. Releases that are not listed are past their announced end of life.

How do I check which Python version I run?

Run python3 --version on the server and compare the result with the fixed versions in each CVE. On Debian, Ubuntu and RHEL-based systems, fixes are often backported without changing the version number, so also check your distribution's security tracker.

How can I get alerted when a new Python CVE is published?

Add Python to a service that watches the National Vulnerability Database, CISA KEV and GitHub Security Advisories. Vulnario does this for free: choose Python and the rest of your stack, verify your email, and you receive an alert when a new CVE matches. Free alerts are grouped at most every 12 hours, and Pro sends them on the next hourly scan.

Is Python secure?

Python is as secure as its patch level. NVD published 14 new Python CVEs in the last twelve months, so running a current, supported release and applying security updates promptly is the most effective protection.

What is CVE-2022-48565?

CVE-2022-48565 is a critical Python vulnerability with a CVSS score of 9.8, published Aug 22, 2023. An XML External Entity (XXE) issue was discovered in Python through 3.9.1. The plistlib module no longer accepts entity declarations in XML plist files to avoid XML vulnerabilities.

Sources

This article is informational and not a substitute for your own risk assessment. CVSS scores and affected versions may change when NVD updates a record.