Python vulnerabilities
39 known CVE vulnerabilities in Python, translated and rated.
- CVE-2013-7338High
Python versions before 3.3.4 RC1 allow remote attackers to cause a denial of service via a file size value larger than the size of the zip file in functions related to reading and extracting zip files.
- CVE-2023-27043Medium
The email module in Python through 3.11.3 incorrectly parses email addresses containing special characters. The wrong portion of an RFC2822 header is identified as the value of the addr-spec.
- CVE-2026-1299Medium
The email module in Python, specifically the BytesGenerator class, improperly quotes newlines in email headers during serialization, allowing header injection. This only affects usage of LiteralHeader that does not respect email folding.
- CVE-2023-24329High
A vulnerability in the urllib.parse component of Python before version 3.11.4 allows attackers to bypass blocklisting methods by supplying a URL that starts with blank characters.
- CVE-2022-0391High
A flaw was found in Python's urllib.parse module where the urlparse method does not sanitize input, allowing characters like ' ' and ' ' in the URL path. This can lead to CRLF injection attacks.
- CVE-2022-42919High
A vulnerability in Python 3.9.x before 3.9.16 and 3.10.x before 3.10.9 on Linux allows local privilege escalation in a non-default configuration. The multiprocessing library with the forkserver start method permits pickle deserialization from any user on the same local network of the machine.
- CVE-2020-10735High
A flaw was found in Python. In algorithms with quadratic time complexity using non-binary bases, when using int("text"), a system could take 50ms to parse an int string with 100,000 digits and 5s for 1,000,000 digits (float, decimal, int.from_bytes(), and int() for binary bases 2, 4, 8, 16, and 32 are not affected). The highest threat from this vulnerability is to system availability.
- CVE-2021-29921Critical
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.
- CVE-2020-27619Critical
In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP. This may lead to arbitrary code execution if the content is crafted.
- CVE-2020-26116High
http.client in Python 3.x before 3.5.10, 3.6.x before 3.6.12, 3.7.x before 3.7.9, and 3.8.x before 3.8.5 allows CRLF injection if the attacker controls the HTTP request method, e.g., by inserting CR and LF control characters in the first argument of HTTPConnection.request.
- CVE-2020-14422Medium
Lib/ipaddress.py in Python through 3.8.3 improperly computes hash values in the IPv4Interface and IPv6Interface classes, which might allow a remote attacker to cause a denial of service if an application is affected by the performance of a dictionary containing these objects. Fixed in multiple Python versions.
- CVE-2019-9674High
Lib/zipfile.py in Python through 3.7.2 allows remote attackers to cause a denial of service (resource consumption) via a ZIP bomb. A maliciously crafted ZIP file can lead to excessive memory or CPU usage.
- CVE-2020-8492Medium
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 HTTP server to conduct Regular Expression Denial of Service (ReDoS) attacks against a client because of urllib.request.AbstractBasicAuthHandler catastrophic backtracking.
- CVE-2019-5010High
Vulnerability in the X509 certificate parser of Python 2.7.11 and 3.6.6 allows denial of service via a specially crafted X509 certificate causing a NULL pointer dereference.
- CVE-2019-16056High
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 email module wrongly parses email addresses that contain multiple @ characters. An application that uses the email module and implements some kind of checks on the From/To headers of a message could be tricked into accepting an email address that should be denied. An attack may be the same as in CVE-2019-11340; however, this CVE applies to Python more generally.
- CVE-2019-10160Critical
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. An attacker can still exploit CVE-2019-9636 by abusing the user and password parts of a URL. When an application parses user-supplied URLs to store cookies, authentication credentials, or other information, it is possible for an attacker to provide specially crafted URLs to make the application send host-related information to a different host than intended.
- CVE-2019-9948Critical
urllib in Python 2.x through 2.7.16 supports the local_file: scheme, which makes it easier for remote attackers to bypass protection mechanisms that blacklist file: URIs, as demonstrated by triggering a urllib.urlopen('local_file:///etc/passwd') call.
- CVE-2019-9636Critical
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. cached against a given hostname). The components are urllib.parse.urlsplit and urllib.parse.urlparse. A specially crafted URL could be incorrectly parsed to locate cookies or authentication data and send that information to a different host.
- CVE-2018-14647High
Python's elementtree C accelerator failed to initialize Expat's hash salt during initialization. This could make it easy to conduct denial of service attacks against Expat by constructing an XML document that causes pathological hash collisions in Expat's internal data structures, consuming large amounts of CPU and RAM. The vulnerability exists in Python versions 3.7.0, 3.6.0 through 3.6.6, 3.5.0 through 3.5.6, 3.4.0 through 3.4.9, 2.7.0 through 2.7.15.
- CVE-2018-1000802Critical
Python (CPython) version 2.7 contains a command injection vulnerability (CWE-77) in the shutil module (make_archive function) that can result in denial of service, information gain, or injection of arbitrary files on the system or entire drive. The attack is exploitable via passing unfiltered user input to the function.
- CVE-2018-1060High
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's apop() method. An attacker could use this flaw to cause denial of service.
- CVE-2026-15310Low
When decompressing crafted zip files using the bzip/LZMA/Zstandard compressions, Python could use an attacker-controlled size to pre-allocate memory, possibly resulting in memory exhaustion.
- CVE-2026-17084Medium
The 'stringprep' module did not process characters from RFC 3454 tables B.2 or B.3 correctly: the latest Unicode codepoint attributes were used instead of the specified Unicode 3.2.0. This causes mismatches when processing domain names using IDNA 2003 (the 'idna' codec) and the in_table_b2() function of the 'stringprep' module. This only affects domain names containing characters that were not previously registered or had their Unicode attributes such as case-folding behavior updated since Unicode 3.2.0.
- CVE-2026-18503Low
A vulnerability in Python's csv.Sniffer where attacker-controlled CSV samples can trigger super-linear regular-expression work during dialect sniffing, consuming significant CPU.
- CVE-2026-15308High
The incremental HTML parser (html.parser.HTMLParser) allows CPU denial-of-service through repeated unterminated markup declarations when processing uncontrolled data.
- CVE-2026-12003Medium
CVE-2026-12003 vulnerability concerns how Python handles the VPATH variable during builds from the source tree. On Windows, VPATH may point to a location outside the Python installation directory, potentially allowing low-privilege users to create files that could be used to access an alternative `Lib` folder.
- CVE-2026-9669High
bz2.BZ2Decompressor objects could be reused after a decompression error. If an application caught the resulting OSError and retried with the same decompressor, crafted input could cause the decompressor to resume from an invalid internal state and perform out-of-bounds writes to a stack buffer. This could crash the process when processing untrusted data.
- CVE-2026-7774Medium
The tarfile.data_filter function in Python can be bypassed using crafted symlinks, allowing files to be written outside the target directory during tar extraction. An attacker can place files in arbitrary locations.
- CVE-2026-3276Medium
The unicodedata.normalize() function can consume excessive CPU time when processing specially crafted Unicode input containing long runs of combining characters with alternating Canonical Combining Class values. This affects all normalization forms.
- CVE-2026-8328Medium
Vulnerability in the ftpcp() function in Python's ftplib.py module. This function was not updated when CVE-2021-4189 was fixed, allowing an attacker to control the IP address and port passed to target.sendport().
- CVE-2026-3298High
The sock_recvfrom_into() method in asyncio.ProactorEventLoop (Windows only) lacked a boundary check for the data buffer when using the nbytes parameter, allowing an out-of-bounds buffer write if data was larger than the buffer size.
- CVE-2026-6100High
A use-after-free vulnerability was found in Python's standard library in `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile`. It occurs when a memory allocation fails with a `MemoryError` and the decompressor instance is reused. The fix cleans up the dangling pointer in this specific error condition.
- CVE-2026-4519Low
The webbrowser.open() API in Python would accept URLs starting with dashes, which could be interpreted as command line options by certain web browsers. The new behavior rejects such URLs.
- CVE-2025-0938Medium
The Python standard library functions `urllib.parse.urlsplit` and `urlparse` accept domain names with square brackets, which is invalid per RFC 3986. Square brackets are only meant as delimiters for IPv6 and IPvFuture hosts. This can cause differential parsing between Python's URL parser and other compliant parsers.
- CVE-2023-40217Medium
An issue was discovered in Python before 3.8.18, 3.9.x before 3.9.18, 3.10.x before 3.10.13, and 3.11.x before 3.11.5, affecting servers using TLS client authentication. If a TLS server-side socket is closed quickly, data may still be readable from the socket buffer without authentication.
- CVE-2022-26488High
In Python before 3.10.3 on Windows, local users can gain privileges because the search path is inadequately secured. The installer may allow a local attacker to add user-writable directories to the system search path. To exploit, an administrator must have installed Python for all users and enabled PATH entries. A non-administrative user can trigger a repair that incorrectly adds user-writable paths into PATH, enabling search-path hijacking of other users and system services. This affects Python (CPython) through 3.7.12, 3.8.x through 3.8.12, 3.9.x through 3.9.10, and 3.10.x through 3.10.2.
- CVE-2019-20907High
In Lib/tarfile.py in Python through 3.8.3, an attacker is able to craft a TAR archive leading to an infinite loop when opened by tarfile.open, because _proc_pax lacks header validation.
- CVE-2020-15523High
In Python 3.6 through 3.6.10, 3.7 through 3.7.8, 3.8 through 3.8.4rc1, and 3.9 through 3.9.0b4 on Windows, a Trojan horse python3.dll might be used when CPython is embedded in a native application. This occurs because python3X.dll may use an invalid search path for python3.dll loading (after Py_SetPath has been used). This issue cannot occur when using python.exe from a standard (non-embedded) Python installation on Windows.
- CVE-2018-1000030Low
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 may also be vulnerable and it appears that Python 2.7.17 and prior may also be vulnerable however this has not been confirmed. The vulnerability lies when multiply threads are handling large amounts of data. In both cases there is essentially a race condition that occurs. For the Heap-Buffer-Overflow, Thread 2 is creating the size for a buffer, but Thread1 is already writing to the buffer without knowing how much to write. So when a large amount of data is being processed, it is very easy to cause memory corruption using a Heap-Buffer-Overflow. As for the Use-After-Free, Thread3->Malloc->Thread1->Free's->Thread2-Re-uses-Free'd Memory. The PSRT has stated that this is not a security vulnerability due to the fact that the attacker must be able to run code, however in some situations, such as function as a service, this vulnerability can potentially be used by an attacker to violate a trust boundary, as such the DWF feels this issue deserves a CVE.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

