Python 2.x — End of Life

EOL Critical risk
EOL: Jan 1, 20207 releases in this series44 CVEs

Python 2.x reached end of life on Jan 1, 2020, 2530 days ago, and no longer receives security fixes. The most recent release in this series is 2.7.18. 44 CVEs are tracked for this series, including 9 critical. 31 of them were published after the end of life of the affected cycle and will not get an official patch. The next major version is Python 3. See Python 3 →

Python 2.x — All releases

VersionReleasedActive supportEOL dateLatest patchStatusAlert me
2.7Jul 3, 2010—Jan 1, 20202.7.18EOL
2.6Oct 1, 2008—Oct 29, 20132.6.9EOL
2.5Sep 19, 2006—May 26, 20112.5.6EOL
2.4Nov 30, 2004—Dec 19, 20082.4.6EOL
2.3Jul 29, 2003—Mar 11, 20082.3.7EOL
2.2Dec 21, 2001—May 30, 20032.2.3EOL
2.1Apr 17, 2001—Apr 9, 20022.1.3EOL

CVEs affecting Python 2.x (89)

CVESeverityCVSSEPSSKEVCycleDescriptionPublished
CVE-2026-15308HIGH7.51.30%—2.6The incremental HTML parser (html.parser.HTMLParser) allows for CPU denial-of-service through repeated unterminated mark…Jul 9, 2026
CVE-2026-15308HIGH7.51.30%—2.7The incremental HTML parser (html.parser.HTMLParser) allows for CPU denial-of-service through repeated unterminated mark…Jul 9, 2026
CVE-2026-4360MEDIUM5.30.48%—2.7In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected sy…Jun 30, 2026
CVE-2026-4360MEDIUM5.30.48%—2.6In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected sy…Jun 30, 2026
CVE-2026-0864MEDIUM5.50.18%—2.6When using the "configparser" module to write configuration files containing multi-line text values with carriage return…Jun 23, 2026
CVE-2026-0864MEDIUM5.50.18%—2.7When using the "configparser" module to write configuration files containing multi-line text values with carriage return…Jun 23, 2026
CVE-2026-7210CRITICAL9.81.35%—2.7`xml.parsers.expat` and `xml.etree.ElementTree` use insufficient entropy for Expat hash-flooding protection, which allow…May 11, 2026
CVE-2026-7210CRITICAL9.81.35%—2.6`xml.parsers.expat` and `xml.etree.ElementTree` use insufficient entropy for Expat hash-flooding protection, which allow…May 11, 2026
CVE-2026-3087HIGH7.50.75%—2.7If `shutil.unpack_archive()` is given a ZIP archive with an absolute Windows path containing a drive (`C:\\...`) then th…Apr 27, 2026
CVE-2026-3087HIGH7.50.75%—2.6If `shutil.unpack_archive()` is given a ZIP archive with an absolute Windows path containing a drive (`C:\\...`) then th…Apr 27, 2026
CVE-2026-6019MEDIUM6.10.60%—2.6http.cookies.Morsel.js_output() returns an inline <script> snippet and only escapes " for JavaScript string context. It …Apr 22, 2026
CVE-2026-6019MEDIUM6.10.60%—2.7http.cookies.Morsel.js_output() returns an inline <script> snippet and only escapes " for JavaScript string context. It …Apr 22, 2026
CVE-2026-4786HIGH7.1——2.6Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b…Apr 13, 2026
CVE-2026-4786HIGH7.1——2.7Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b…Apr 13, 2026
CVE-2026-4786HIGH7.1——2.1Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b…Apr 13, 2026
CVE-2026-4786HIGH7.1——2.2Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b…Apr 13, 2026
CVE-2026-4786HIGH7.1——2.3Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b…Apr 13, 2026
CVE-2026-4786HIGH7.1——2.4Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b…Apr 13, 2026
CVE-2026-4786HIGH7.1——2.5Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b…Apr 13, 2026
CVE-2026-6100HIGH8.1——2.6Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo…Apr 13, 2026
CVE-2026-6100HIGH8.1——2.7Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo…Apr 13, 2026
CVE-2026-6100HIGH8.1——2.1Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo…Apr 13, 2026
CVE-2026-6100HIGH8.1——2.5Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo…Apr 13, 2026
CVE-2026-6100HIGH8.1——2.4Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo…Apr 13, 2026
CVE-2026-6100HIGH8.1——2.3Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo…Apr 13, 2026
CVE-2026-6100HIGH8.1——2.2Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo…Apr 13, 2026
CVE-2026-4519LOW3.30.46%—2.7The webbrowser.open() API would accept leading dashes in the URL which could be handled as command line options for cer…Mar 20, 2026
CVE-2026-4519LOW3.30.46%—2.6The webbrowser.open() API would accept leading dashes in the URL which could be handled as command line options for cer…Mar 20, 2026
CVE-2026-4224HIGH7.50.92%—2.7When an Expat parser with a registered ElementDeclHandler parses an inline document type definition containing a deeply …Mar 16, 2026
CVE-2026-4224HIGH7.50.92%—2.6When an Expat parser with a registered ElementDeclHandler parses an inline document type definition containing a deeply …Mar 16, 2026
CVE-2026-3644HIGH7.50.75%—2.7The fix for CVE-2026-0672, which rejected control characters in http.cookies.Morsel, was incomplete. The Morsel.update()…Mar 16, 2026
CVE-2026-3644HIGH7.50.75%—2.6The fix for CVE-2026-0672, which rejected control characters in http.cookies.Morsel, was incomplete. The Morsel.update()…Mar 16, 2026
CVE-2025-13462CRITICAL9.80.29%—2.6The "tarfile" module would still apply normalization of AREGTYPE (\x00) blocks to DIRTYPE, even while processing a multi…Mar 12, 2026
CVE-2025-13462CRITICAL9.80.29%—2.7The "tarfile" module would still apply normalization of AREGTYPE (\x00) blocks to DIRTYPE, even while processing a multi…Mar 12, 2026
CVE-2026-2297MEDIUM5.50.21%—2.4The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (…Mar 4, 2026
CVE-2026-2297MEDIUM5.50.21%—2.7The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (…Mar 4, 2026
CVE-2026-2297MEDIUM5.50.21%—2.1The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (…Mar 4, 2026
CVE-2026-2297MEDIUM5.50.21%—2.2The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (…Mar 4, 2026
CVE-2026-2297MEDIUM5.50.21%—2.3The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (…Mar 4, 2026
CVE-2026-2297MEDIUM5.50.21%—2.5The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (…Mar 4, 2026
CVE-2026-2297MEDIUM5.50.21%—2.6The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (…Mar 4, 2026
CVE-2025-12781MEDIUM5.30.85%—2.6When passing data to the b64decode(), standard_b64decode(), and urlsafe_b64decode() functions in the "base64" module the…Jan 21, 2026
CVE-2025-12781MEDIUM5.30.85%—2.7When passing data to the b64decode(), standard_b64decode(), and urlsafe_b64decode() functions in the "base64" module the…Jan 21, 2026
CVE-2025-13837MEDIUM5.50.36%—2.7When loading a plist file, the plistlib module reads data in size specified by the file itself, meaning a malicious file…Dec 1, 2025
CVE-2025-13837MEDIUM5.50.36%—2.6When loading a plist file, the plistlib module reads data in size specified by the file itself, meaning a malicious file…Dec 1, 2025
CVE-2025-13836HIGH7.51.66%—2.6When reading an HTTP response from a server, if no read amount is specified, the default behavior will be to use Content…Dec 1, 2025
CVE-2025-13836HIGH7.51.66%—2.7When reading an HTTP response from a server, if no read amount is specified, the default behavior will be to use Content…Dec 1, 2025
CVE-2025-6075MEDIUM5.50.22%—2.7If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding env…Oct 31, 2025
CVE-2025-6075MEDIUM5.50.22%—2.6If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding env…Oct 31, 2025
CVE-2024-9287HIGH7.80.46%—2.6A vulnerability has been found in the CPython `venv` module and CLI where path names provided when creating a virtual en…Oct 22, 2024
CVE-2024-9287HIGH7.80.46%—2.7A vulnerability has been found in the CPython `venv` module and CLI where path names provided when creating a virtual en…Oct 22, 2024
CVE-2022-48564MEDIUM6.51.57%—2.6read_ints in plistlib.py in Python through 3.9.1 is vulnerable to a potential DoS attack via CPU and RAM exhaustion when…Aug 22, 2023
CVE-2022-48564MEDIUM6.51.57%—2.7read_ints in plistlib.py in Python through 3.9.1 is vulnerable to a potential DoS attack via CPU and RAM exhaustion when…Aug 22, 2023
CVE-2022-48560HIGH7.51.88%—2.7A use-after-free exists in Python through 3.9 via heappushpop in heapq.Aug 22, 2023
CVE-2022-48560HIGH7.51.88%—2.6A use-after-free exists in Python through 3.9 via heappushpop in heapq.Aug 22, 2023
CVE-2022-26488HIGH7.00.68%—2.6In Python before 3.10.3 on Windows, local users can gain privileges because the search path is inadequately secured. The…Mar 10, 2022
CVE-2022-26488HIGH7.00.68%—2.7In Python before 3.10.3 on Windows, local users can gain privileges because the search path is inadequately secured. The…Mar 10, 2022
CVE-2021-3733MEDIUM6.54.79%—2.6There's a flaw in urllib's AbstractBasicAuthHandler class. An attacker who controls a malicious HTTP server that an HTTP…Mar 10, 2022
CVE-2021-3733MEDIUM6.54.79%—2.7There's a flaw in urllib's AbstractBasicAuthHandler class. An attacker who controls a malicious HTTP server that an HTTP…Mar 10, 2022
CVE-2020-8492MEDIUM6.56.61%—2.7Python 2.7 through 2.7.17, 3.5 through 3.5.9, 3.6 through 3.6.10, 3.7 through 3.7.6, and 3.8 through 3.8.1 allows an HTT…Jan 30, 2020
CVE-2019-5010HIGH7.520.74%—2.7An exploitable denial-of-service vulnerability exists in the X509 certificate parser of Python.org Python 2.7.11 / 3.6.6…Oct 31, 2019
CVE-2019-18348MEDIUM6.13.38%—2.7An issue was discovered in urllib2 in Python 2.x through 2.7.17 and urllib in Python 3.x through 3.8.0. CRLF injection i…Oct 23, 2019
CVE-2019-18348MEDIUM6.13.38%—2.6An issue was discovered in urllib2 in Python 2.x through 2.7.17 and urllib in Python 3.x through 3.8.0. CRLF injection i…Oct 23, 2019
CVE-2019-16935MEDIUM6.14.65%—2.7The documentation XML-RPC server in Python through 2.7.16, 3.x through 3.6.9, and 3.7.x through 3.7.4 has XSS via the se…Sep 28, 2019
CVE-2019-16056HIGH7.54.60%—2.6An issue was discovered in Python through 2.7.16, 3.x through 3.5.7, 3.6.x through 3.6.9, and 3.7.x through 3.7.4. The e…Sep 6, 2019
CVE-2019-16056HIGH7.54.60%—2.7An issue was discovered in Python through 2.7.16, 3.x through 3.5.7, 3.6.x through 3.6.9, and 3.7.x through 3.7.4. The e…Sep 6, 2019
CVE-2018-20852MEDIUM4.33.66%—2.7http.cookiejar.DefaultPolicy.domain_return_ok in Lib/http/cookiejar.py in Python before 3.7.3 does not correctly validat…Jul 13, 2019
CVE-2018-20852MEDIUM4.33.66%—2.6http.cookiejar.DefaultPolicy.domain_return_ok in Lib/http/cookiejar.py in Python before 3.7.3 does not correctly validat…Jul 13, 2019
CVE-2019-10160CRITICAL9.85.22%—2.7A security regression of CVE-2019-9636 was discovered in python since commit d537ab0ff9767ef024f26246899728f0116b1ec3 af…Jun 7, 2019
CVE-2019-9948CRITICAL9.111.93%—2.7urllib in Python 2.x through 2.7.16 supports the local_file: scheme, which makes it easier for remote attackers to bypas…Mar 23, 2019
CVE-2019-9948CRITICAL9.111.93%—2.6urllib in Python 2.x through 2.7.16 supports the local_file: scheme, which makes it easier for remote attackers to bypas…Mar 23, 2019
CVE-2019-9947MEDIUM6.15.25%—2.7An issue was discovered in urllib2 in Python 2.x through 2.7.16 and urllib in Python 3.x through 3.7.3. CRLF injection i…Mar 23, 2019
CVE-2019-9740MEDIUM6.15.40%—2.7An issue was discovered in urllib2 in Python 2.x through 2.7.16 and urllib in Python 3.x through 3.7.3. CRLF injection i…Mar 13, 2019
CVE-2019-9740MEDIUM6.15.40%—2.6An issue was discovered in urllib2 in Python 2.x through 2.7.16 and urllib in Python 3.x through 3.7.3. CRLF injection i…Mar 13, 2019
CVE-2019-9636CRITICAL9.87.01%—2.7Python 2.7.x through 2.7.16 and 3.x through 3.7.2 is affected by: Improper Handling of Unicode Encoding (with an incorre…Mar 8, 2019
CVE-2018-14647HIGH7.510.91%—2.7Python's elementtree C accelerator failed to initialise Expat's hash salt during initialization. This could make it easy…Sep 25, 2018
CVE-2018-1000802CRITICAL9.820.12%—2.7Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements u…Sep 18, 2018
CVE-2018-1061MEDIUM6.54.65%—2.6python before versions 2.7.15, 3.4.9, 3.5.6rc1, 3.6.5rc1 and 3.7.0 is vulnerable to catastrophic backtracking in the dif…Jun 19, 2018
CVE-2018-1061MEDIUM6.54.65%—2.7python before versions 2.7.15, 3.4.9, 3.5.6rc1, 3.6.5rc1 and 3.7.0 is vulnerable to catastrophic backtracking in the dif…Jun 19, 2018
CVE-2018-1060HIGH7.54.94%—2.7python before versions 2.7.15, 3.4.9, 3.5.6rc1, 3.6.5rc1 and 3.7.0 is vulnerable to catastrophic backtracking in pop3lib…Jun 18, 2018
CVE-2016-9063CRITICAL9.85.32%—2.7An integer overflow during the parsing of XML using the Expat library. This vulnerability affects Firefox < 50.Jun 11, 2018
CVE-2018-1000030LOW3.61.18%—2.6Python 2.7.14 is vulnerable to a Heap-Buffer-Overflow as well as a Heap-Use-After-Free. Python versions prior to 2.7.14 …Feb 8, 2018
CVE-2018-1000030LOW3.61.18%—2.7Python 2.7.14 is vulnerable to a Heap-Buffer-Overflow as well as a Heap-Use-After-Free. Python versions prior to 2.7.14 …Feb 8, 2018
CVE-2017-1000158CRITICAL9.87.94%—2.6CPython (aka Python) up to 2.7.13 is vulnerable to an integer overflow in the PyString_DecodeEscape function in stringob…Nov 17, 2017
CVE-2017-1000158CRITICAL9.87.94%—2.7CPython (aka Python) up to 2.7.13 is vulnerable to an integer overflow in the PyString_DecodeEscape function in stringob…Nov 17, 2017
CVE-2017-9233HIGH7.58.73%—2.7XML External Entity vulnerability in libexpat 2.2.0 and earlier (Expat XML Parser Library) allows attackers to put the p…Jul 25, 2017
CVE-2016-2183HIGH7.599.69%—2.7The DES and Triple DES ciphers, as used in the TLS, SSH, and IPSec protocols and other protocols and products, have a bi…Sep 1, 2016
CVE-2016-4472HIGH8.111.94%—2.7The overflow protection in Expat is removed by compilers with certain optimization settings, which allows remote attacke…Jun 30, 2016
CVE-2016-0718CRITICAL9.813.25%—2.7Expat allows context-dependent attackers to cause a denial of service (crash) or possibly execute arbitrary code via a m…May 26, 2016

Python 2.x is EOL — migrate to Python 3.x

Python 3.x is the next major release. Plan your upgrade before Python 2.x stops receiving security patches.

See Python 3.x

Add a Python 2 EOL badge to your README

Show your users which Python version your project runs and whether it is still supported. The badge updates automatically. More formats and options →

Python 2 EOL status
[![Python 2 EOL status](https://eolcanary.com/badge/python/2.svg)](https://eolcanary.com/explore/python/2)

Frequently asked questions

Is Python 2 end of life?

Yes. All Python 2.x releases have reached end of life and no longer receive security patches. There are 44 known CVEs affecting Python 2.x, including 9 critical. Migrate to Python 3.x as soon as possible.

What CVEs affect Python 2?

There are 44 CVEs tracked for Python 2.x, including 9 critical severity issues. See the full list above with CVSS and EPSS scores.

What is the latest Python 2 version?

The latest Python 2.x patch release is 2.7.18, released on April 19, 2020. Always run the latest patch to benefit from all security fixes.

How to migrate from Python 2 to Python 3?

To migrate from Python 2 to Python 3: (1) review the official Python 3 migration guide for breaking changes, (2) update dependencies and configuration accordingly, (3) test thoroughly in a staging environment, (4) deploy with a rollback plan. Starting early gives you time to resolve compatibility issues before your current version reaches end of life.

Is it safe to run Python 2 in production?

No. Python 2 has reached end of life and security vulnerabilities are no longer patched. Upgrade to a supported version immediately.

Data sourced from endoflife.date · CVE data from NVD · EPSS from FIRST.org · KEV from CISA