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
| # | CVE | CVSS | Published | Type | CISA KEV |
|---|---|---|---|---|---|
| 1 | CVE-2022-48565 | 9.8 Critical | 2023-08-22 | XML external entity (XXE) | No |
| 2 | CVE-2022-37454 | 9.8 Critical | 2022-10-21 | Integer overflow | No |
| 3 | CVE-2021-29921 | 9.8 Critical | 2021-05-06 | Critical security flaw | No |
| 4 | CVE-2021-3177 | 9.8 Critical | 2021-01-19 | Buffer overflow | No |
| 5 | CVE-2020-27619 | 9.8 Critical | 2020-10-22 | Critical security flaw | No |
| 6 | CVE-2020-15801 | 9.8 Critical | 2020-07-17 | Critical security flaw | No |
| 7 | CVE-2014-4650 | 9.8 Critical | 2020-02-20 | Path traversal | No |
| 8 | CVE-2019-12900 | 9.8 Critical | 2019-06-19 | Out-of-bounds write | No |
| 9 | CVE-2019-10160 | 9.8 Critical | 2019-06-07 | Critical security flaw | No |
| 10 | CVE-2019-9636 | 9.8 Critical | 2019-03-08 | Information disclosure | No |
Each Python CVE explained
1. CVE-2022-48565: XML external entity (XXE)
- 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)
2. CVE-2022-37454: Integer overflow
- 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)
3. CVE-2021-29921: Critical security flaw
- 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)
4. CVE-2021-3177: Buffer overflow
- 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).
5. CVE-2020-27619: Critical security flaw
- 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)
6. CVE-2020-15801: Critical security flaw
- 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)
7. CVE-2014-4650: Path traversal
- 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)
8. CVE-2019-12900: Out-of-bounds write
- 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)
9. CVE-2019-10160: Critical security flaw
- 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)
10. CVE-2019-9636: Information disclosure
- 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)
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.
| Release | Released | End of life | Latest | Status |
|---|---|---|---|---|
| Python 3.15 | Oct 9, 2026 | Oct 31, 2031 | 3.15.2 | Supported |
| Python 3.14 | Oct 7, 2025 | Oct 31, 2030 | 3.14.10 | Supported |
| Python 3.13 | Oct 7, 2024 | Oct 31, 2029 | 3.13.18 | Supported |
| Python 3.12 | Oct 2, 2023 | Oct 31, 2028 | 3.12.16 | Supported |
| Python 3.11 | Oct 24, 2022 | Oct 31, 2027 | 3.11.18 | Supported |
| Python 3.10 | Oct 4, 2021 | Oct 1, 2026 | 3.10.22 | End of life |
| Python 3.9 | Oct 5, 2020 | Oct 31, 2025 | 3.9.25 | End of life |
| Python 3.8 | Oct 14, 2019 | Oct 7, 2024 | 3.8.20 | End 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
- Run a supported release and move to the next branch before the current one reaches end of life.
- Apply patch releases promptly.
- Pin and audit your dependencies, and update the vulnerable ones.
- Run applications as an unprivileged user.
- 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.
Related security guides
Few stacks run Python alone. These guides cover the technologies it is most often deployed with.
- Django vulnerabilities: Django is a high-level Python web framework.
- Flask vulnerabilities: Flask is a lightweight Python web framework.
- FastAPI vulnerabilities: FastAPI is a modern Python web framework for building APIs.
- Ubuntu vulnerabilities: Ubuntu is the most popular Linux distribution for cloud servers and VPS.
- SQLite vulnerabilities: SQLite is an embedded SQL database engine found in countless applications.
- Odoo vulnerabilities: Odoo is an open-source business application suite (ERP, CRM, e-commerce).
- Apache Airflow vulnerabilities: Apache Airflow is a platform for scheduling and monitoring data workflows.
- Ansible vulnerabilities: Ansible is an agentless IT automation tool.
- libxml2 vulnerabilities: libxml2 is the XML parsing library embedded in countless applications.
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
- National Vulnerability Database (NVD) (opens in a new tab), CVE records, CVSS scores and CPE counts, checked Nov 3, 2026.
- CISA Known Exploited Vulnerabilities (KEV) catalog (opens in a new tab), checked Nov 3, 2026.
- endoflife.date: Python (opens in a new tab), release and support dates, checked Nov 3, 2026.
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.