Python 2.x — End of Life
EOL Critical riskPython 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
| Version | Released | Active support | EOL date | Latest patch | Status | Alert me |
|---|---|---|---|---|---|---|
| 2.7 | Jul 3, 2010 | — | Jan 1, 2020 | 2.7.18 | EOL | |
| 2.6 | Oct 1, 2008 | — | Oct 29, 2013 | 2.6.9 | EOL | |
| 2.5 | Sep 19, 2006 | — | May 26, 2011 | 2.5.6 | EOL | |
| 2.4 | Nov 30, 2004 | — | Dec 19, 2008 | 2.4.6 | EOL | |
| 2.3 | Jul 29, 2003 | — | Mar 11, 2008 | 2.3.7 | EOL | |
| 2.2 | Dec 21, 2001 | — | May 30, 2003 | 2.2.3 | EOL | |
| 2.1 | Apr 17, 2001 | — | Apr 9, 2002 | 2.1.3 | EOL |
CVEs affecting Python 2.x (89)
| CVE | Severity | CVSS | EPSS | KEV | Cycle | Description | Published |
|---|---|---|---|---|---|---|---|
| CVE-2026-15308 | HIGH | 7.5 | 1.30% | — | 2.6 | The incremental HTML parser (html.parser.HTMLParser) allows for CPU denial-of-service through repeated unterminated mark… | Jul 9, 2026 |
| CVE-2026-15308 | HIGH | 7.5 | 1.30% | — | 2.7 | The incremental HTML parser (html.parser.HTMLParser) allows for CPU denial-of-service through repeated unterminated mark… | Jul 9, 2026 |
| CVE-2026-4360 | MEDIUM | 5.3 | 0.48% | — | 2.7 | In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected sy… | Jun 30, 2026 |
| CVE-2026-4360 | MEDIUM | 5.3 | 0.48% | — | 2.6 | In the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected sy… | Jun 30, 2026 |
| CVE-2026-0864 | MEDIUM | 5.5 | 0.18% | — | 2.6 | When using the "configparser" module to write configuration files containing multi-line text values with carriage return… | Jun 23, 2026 |
| CVE-2026-0864 | MEDIUM | 5.5 | 0.18% | — | 2.7 | When using the "configparser" module to write configuration files containing multi-line text values with carriage return… | Jun 23, 2026 |
| CVE-2026-7210 | CRITICAL | 9.8 | 1.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-7210 | CRITICAL | 9.8 | 1.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-3087 | HIGH | 7.5 | 0.75% | — | 2.7 | If `shutil.unpack_archive()` is given a ZIP archive with an absolute Windows path containing a drive (`C:\\...`) then th… | Apr 27, 2026 |
| CVE-2026-3087 | HIGH | 7.5 | 0.75% | — | 2.6 | If `shutil.unpack_archive()` is given a ZIP archive with an absolute Windows path containing a drive (`C:\\...`) then th… | Apr 27, 2026 |
| CVE-2026-6019 | MEDIUM | 6.1 | 0.60% | — | 2.6 | http.cookies.Morsel.js_output() returns an inline <script> snippet and only escapes " for JavaScript string context. It … | Apr 22, 2026 |
| CVE-2026-6019 | MEDIUM | 6.1 | 0.60% | — | 2.7 | http.cookies.Morsel.js_output() returns an inline <script> snippet and only escapes " for JavaScript string context. It … | Apr 22, 2026 |
| CVE-2026-4786 | HIGH | 7.1 | — | — | 2.6 | Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b… | Apr 13, 2026 |
| CVE-2026-4786 | HIGH | 7.1 | — | — | 2.7 | Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b… | Apr 13, 2026 |
| CVE-2026-4786 | HIGH | 7.1 | — | — | 2.1 | Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b… | Apr 13, 2026 |
| CVE-2026-4786 | HIGH | 7.1 | — | — | 2.2 | Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b… | Apr 13, 2026 |
| CVE-2026-4786 | HIGH | 7.1 | — | — | 2.3 | Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b… | Apr 13, 2026 |
| CVE-2026-4786 | HIGH | 7.1 | — | — | 2.4 | Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b… | Apr 13, 2026 |
| CVE-2026-4786 | HIGH | 7.1 | — | — | 2.5 | Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain b… | Apr 13, 2026 |
| CVE-2026-6100 | HIGH | 8.1 | — | — | 2.6 | Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo… | Apr 13, 2026 |
| CVE-2026-6100 | HIGH | 8.1 | — | — | 2.7 | Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo… | Apr 13, 2026 |
| CVE-2026-6100 | HIGH | 8.1 | — | — | 2.1 | Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo… | Apr 13, 2026 |
| CVE-2026-6100 | HIGH | 8.1 | — | — | 2.5 | Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo… | Apr 13, 2026 |
| CVE-2026-6100 | HIGH | 8.1 | — | — | 2.4 | Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo… | Apr 13, 2026 |
| CVE-2026-6100 | HIGH | 8.1 | — | — | 2.3 | Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo… | Apr 13, 2026 |
| CVE-2026-6100 | HIGH | 8.1 | — | — | 2.2 | Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memo… | Apr 13, 2026 |
| CVE-2026-4519 | LOW | 3.3 | 0.46% | — | 2.7 | The 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-4519 | LOW | 3.3 | 0.46% | — | 2.6 | The 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-4224 | HIGH | 7.5 | 0.92% | — | 2.7 | When an Expat parser with a registered ElementDeclHandler parses an inline document type definition containing a deeply … | Mar 16, 2026 |
| CVE-2026-4224 | HIGH | 7.5 | 0.92% | — | 2.6 | When an Expat parser with a registered ElementDeclHandler parses an inline document type definition containing a deeply … | Mar 16, 2026 |
| CVE-2026-3644 | HIGH | 7.5 | 0.75% | — | 2.7 | The fix for CVE-2026-0672, which rejected control characters in http.cookies.Morsel, was incomplete. The Morsel.update()… | Mar 16, 2026 |
| CVE-2026-3644 | HIGH | 7.5 | 0.75% | — | 2.6 | The fix for CVE-2026-0672, which rejected control characters in http.cookies.Morsel, was incomplete. The Morsel.update()… | Mar 16, 2026 |
| CVE-2025-13462 | CRITICAL | 9.8 | 0.29% | — | 2.6 | The "tarfile" module would still apply normalization of AREGTYPE (\x00) blocks to DIRTYPE, even while processing a multi… | Mar 12, 2026 |
| CVE-2025-13462 | CRITICAL | 9.8 | 0.29% | — | 2.7 | The "tarfile" module would still apply normalization of AREGTYPE (\x00) blocks to DIRTYPE, even while processing a multi… | Mar 12, 2026 |
| CVE-2026-2297 | MEDIUM | 5.5 | 0.21% | — | 2.4 | The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (… | Mar 4, 2026 |
| CVE-2026-2297 | MEDIUM | 5.5 | 0.21% | — | 2.7 | The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (… | Mar 4, 2026 |
| CVE-2026-2297 | MEDIUM | 5.5 | 0.21% | — | 2.1 | The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (… | Mar 4, 2026 |
| CVE-2026-2297 | MEDIUM | 5.5 | 0.21% | — | 2.2 | The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (… | Mar 4, 2026 |
| CVE-2026-2297 | MEDIUM | 5.5 | 0.21% | — | 2.3 | The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (… | Mar 4, 2026 |
| CVE-2026-2297 | MEDIUM | 5.5 | 0.21% | — | 2.5 | The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (… | Mar 4, 2026 |
| CVE-2026-2297 | MEDIUM | 5.5 | 0.21% | — | 2.6 | The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (… | Mar 4, 2026 |
| CVE-2025-12781 | MEDIUM | 5.3 | 0.85% | — | 2.6 | When passing data to the b64decode(), standard_b64decode(), and urlsafe_b64decode() functions in the "base64" module the… | Jan 21, 2026 |
| CVE-2025-12781 | MEDIUM | 5.3 | 0.85% | — | 2.7 | When passing data to the b64decode(), standard_b64decode(), and urlsafe_b64decode() functions in the "base64" module the… | Jan 21, 2026 |
| CVE-2025-13837 | MEDIUM | 5.5 | 0.36% | — | 2.7 | When 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-13837 | MEDIUM | 5.5 | 0.36% | — | 2.6 | When 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-13836 | HIGH | 7.5 | 1.66% | — | 2.6 | When 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-13836 | HIGH | 7.5 | 1.66% | — | 2.7 | When 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-6075 | MEDIUM | 5.5 | 0.22% | — | 2.7 | If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding env… | Oct 31, 2025 |
| CVE-2025-6075 | MEDIUM | 5.5 | 0.22% | — | 2.6 | If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding env… | Oct 31, 2025 |
| CVE-2024-9287 | HIGH | 7.8 | 0.46% | — | 2.6 | A 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-9287 | HIGH | 7.8 | 0.46% | — | 2.7 | A 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-48564 | MEDIUM | 6.5 | 1.57% | — | 2.6 | read_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-48564 | MEDIUM | 6.5 | 1.57% | — | 2.7 | read_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-48560 | HIGH | 7.5 | 1.88% | — | 2.7 | A use-after-free exists in Python through 3.9 via heappushpop in heapq. | Aug 22, 2023 |
| CVE-2022-48560 | HIGH | 7.5 | 1.88% | — | 2.6 | A use-after-free exists in Python through 3.9 via heappushpop in heapq. | Aug 22, 2023 |
| CVE-2022-26488 | HIGH | 7.0 | 0.68% | — | 2.6 | In 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-26488 | HIGH | 7.0 | 0.68% | — | 2.7 | In 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-3733 | MEDIUM | 6.5 | 4.79% | — | 2.6 | There's a flaw in urllib's AbstractBasicAuthHandler class. An attacker who controls a malicious HTTP server that an HTTP… | Mar 10, 2022 |
| CVE-2021-3733 | MEDIUM | 6.5 | 4.79% | — | 2.7 | There's a flaw in urllib's AbstractBasicAuthHandler class. An attacker who controls a malicious HTTP server that an HTTP… | Mar 10, 2022 |
| CVE-2020-8492 | MEDIUM | 6.5 | 6.61% | — | 2.7 | Python 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-5010 | HIGH | 7.5 | 20.74% | — | 2.7 | An 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-18348 | MEDIUM | 6.1 | 3.38% | — | 2.7 | An 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-18348 | MEDIUM | 6.1 | 3.38% | — | 2.6 | An 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-16935 | MEDIUM | 6.1 | 4.65% | — | 2.7 | The 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-16056 | HIGH | 7.5 | 4.60% | — | 2.6 | An 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-16056 | HIGH | 7.5 | 4.60% | — | 2.7 | An 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-20852 | MEDIUM | 4.3 | 3.66% | — | 2.7 | http.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-20852 | MEDIUM | 4.3 | 3.66% | — | 2.6 | http.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-10160 | CRITICAL | 9.8 | 5.22% | — | 2.7 | A security regression of CVE-2019-9636 was discovered in python since commit d537ab0ff9767ef024f26246899728f0116b1ec3 af… | Jun 7, 2019 |
| CVE-2019-9948 | CRITICAL | 9.1 | 11.93% | — | 2.7 | urllib 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-9948 | CRITICAL | 9.1 | 11.93% | — | 2.6 | urllib 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-9947 | MEDIUM | 6.1 | 5.25% | — | 2.7 | An 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-9740 | MEDIUM | 6.1 | 5.40% | — | 2.7 | An 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-9740 | MEDIUM | 6.1 | 5.40% | — | 2.6 | An 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-9636 | CRITICAL | 9.8 | 7.01% | — | 2.7 | 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 incorre… | Mar 8, 2019 |
| CVE-2018-14647 | HIGH | 7.5 | 10.91% | — | 2.7 | Python's elementtree C accelerator failed to initialise Expat's hash salt during initialization. This could make it easy… | Sep 25, 2018 |
| CVE-2018-1000802 | CRITICAL | 9.8 | 20.12% | — | 2.7 | Python Software Foundation Python (CPython) version 2.7 contains a CWE-77: Improper Neutralization of Special Elements u… | Sep 18, 2018 |
| CVE-2018-1061 | MEDIUM | 6.5 | 4.65% | — | 2.6 | python 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-1061 | MEDIUM | 6.5 | 4.65% | — | 2.7 | python 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-1060 | HIGH | 7.5 | 4.94% | — | 2.7 | python 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-9063 | CRITICAL | 9.8 | 5.32% | — | 2.7 | An integer overflow during the parsing of XML using the Expat library. This vulnerability affects Firefox < 50. | Jun 11, 2018 |
| CVE-2018-1000030 | LOW | 3.6 | 1.18% | — | 2.6 | Python 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-1000030 | LOW | 3.6 | 1.18% | — | 2.7 | Python 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-1000158 | CRITICAL | 9.8 | 7.94% | — | 2.6 | CPython (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-1000158 | CRITICAL | 9.8 | 7.94% | — | 2.7 | CPython (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-9233 | HIGH | 7.5 | 8.73% | — | 2.7 | XML 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-2183 | HIGH | 7.5 | 99.69% | — | 2.7 | The 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-4472 | HIGH | 8.1 | 11.94% | — | 2.7 | The overflow protection in Expat is removed by compilers with certain optimization settings, which allows remote attacke… | Jun 30, 2016 |
| CVE-2016-0718 | CRITICAL | 9.8 | 13.25% | — | 2.7 | Expat 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.
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 →
[](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
