Python Software Foundation Cpython vulnerabilities

86 vulnerabilities

Known vulnerabilities in Python Software Foundation Cpython, newest first, with CVSS severity, EPSS, KEV listings, ransomware use and the affected versions.

RoutineCVE-2026-107784python software foundation · cpython +12 moretarfile extraction filters accept drive-relative paths on WindowsOn Windows, the tarfile "tar" and "data" extraction filters did not reject member names or link targets that have a drive but no root, such as "C:foo". When extracting to a relative destination, such a member was written to the current working directory of that drive instead of the destination, and a symbolic link with such a target pointed outside the destination. The filters now refuse these member names and link targets with AbsolutePathError and AbsoluteLinkError.CVSS6.3MediumEPSS1.20%RoutineCVE-2026-16052python software foundation · cpython +72 moreCookie Attribute Injection via Unescaped Semicolons in http.cookies.MorselThe http.cookies.Morsel class allows separator semicolons in attribute values and includes them verbatim in all output formats. An attacker who can control these values could use this to relax the cookie's Domain or SameSite restrictions.CVSS2.3LowEPSS0.38%RoutineCVE-2026-115559python software foundation · cpython +55 moreimaplib STARTTLS serves plaintext bytes buffered before the handshake as if they came over TLSIMAP4.starttls() wraps the socket in TLS but leaves self._readbuf, imaplib's own read-ahead buffer, untouched. Any plaintext bytes that arrived in the same recv() as the tagged OK to STARTTLS are returned by readline() after the handshake, so the client treats them as the first responses on the protected channel. A network attacker who cannot break TLS can append forged lines after the server's OK, let the handshake complete with the real server and a valid certificate, and have the client accept the forged CAPABILITY and the forged tagged completion of the next command. This is the STARTTLS command/response injection class of CVE-2011-0411.CVSS6.3MediumEPSS0.20%RoutineCVE-2026-115791python software foundation · cpython +27 morePrevent shadowing stdlib in gzip/tarfile/zipfile CLI during extractionWhen tarfile or zipfile command line interface (CLI) is used to decompress an archive, a Python script shadowing the stdlib can be created. Then if an error occurs during decompressing the next file, the newly created Python script is executed. This is especially true if the created Python is called traceback.py. The problem is that Python adds the current directory to sys.path when python -m MODULE is run, and the archive is also decompressed in the current directory. The fix removes sys.path[0] in gzip, tarfile and zipfile command line interface to prevent shadowing standard library modules from extracted files.CVSS5.3MediumEPSS0.17%RoutineCVE-2026-124249python software foundation · cpython +64 more`http.cookiejar` applies expired `Set-Cookie` to cookie store before policy validationhttp.cookiejar.CookieJar deleted a stored cookie when a response carried an already expired Set-Cookie header for it, using the Domain and Path attributes from the header without consulting the cookie policy. A server could therefore delete cookies belonging to other domains from a shared cookie jar, such as the one used by urllib's HTTPCookieProcessor. The fix consults the cookie policy before an expired cookie may delete an existing one, as required by RFC 6265 section 5.3.CVSS6.3MediumEPSS0.27%RoutineCVE-2026-19552python software foundation · cpython +27 moressl.get_server_certificate(addr, ca_certs=...) verifies the chain but never the identityWhen ca_certs parameter was supplied to ssl.get_server_certificate() function, the identity of the certificate is not checked.CVSS0.0UnknownEPSS0.29%PrioritiseCVE-2026-119170python software foundation · cpython +37 moreRegression in FIPS enforcement of hash algorithms affecting only Python 3.14.10There was a regression in how FIPS algorithms were enforced for the hashlib module. Only users that are using OpenSSL in FIPS mode are affected. Only Python 3.14.10 is affected, all other Python versions are unaffected.CVSS8.2HighEPSS0.47%RoutineCVE-2026-116566python software foundation · cpython +84 moresocket.getaddrinfo() accepts embedded null bytes in host and portsocket.getaddrinfo() previously accepted null bytes within *host* and *port* parameters which can cause the values to be silently truncated.CVSS5.3MediumEPSS0.26%RoutineCVE-2026-103995python software foundation · cpython +82 moreLenient parsing of integers for response body and chunk framingResponse body and chunk parsing would handle non-hex or negative integers incorrectly which could result in misinterpreting HTTP response contents.CVSS2.0LowEPSS0.39%PrioritiseCVE-2026-115557python software foundation · cpython +25 moreDistrust compromised intermediate certificates in ssl modulePython has added a denylist for known compromised certificates to the "ssl" module to ensure user safety even without certificate revocation configured. Known compromised certificates will automatically be rejected regardless of the SSLContext policy configuration.CVSS9.4CriticalEPSS0.87%RoutineCVE-2026-114583python software foundation · cpython +27 moretar filter allows writing outside destination via empty-named symlinktarfile.tar_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() with filter="tar" to write files outside the destination directory, subject to the permissions of the extracting process. This is the tarfile.tar_filter counterpart of CVE-2026-7774, which covered tarfile.data_filter.CVSS6.9MediumEPSS0.25%RoutineCVE-2026-19553python software foundation · cpython +63 moreSSLContext.wrap_bio() missing validation of server_hostname parameterssl.SSLContext.wrap_bio() didn't require the server_hostname argument to not be None if ssl.SSLContext.check_hostname was set. Due to a missing parameter check in SSLObject, if the server_hostname argument isn't supplied then hostname verification would be silently skipped. This defect could lead to programs where certificate hostname verification *appeared* to be succeeding with SSLContext.check_hostname = True and no ValueError being raised due to misconfiguration. If the program passes a server_hostname value that isn't an empty string or None to any of these APIs then certificate hostname verification proceeds as expected and the program is not affected by this vulnerability. Mitigating this vulnerability doesn't require updating Python or applying the patch. To mitigate, pass a valid non-None and non-empty server_hostname value to SSLContext.wrap_bio(), asyncio.create_connection(), or asyncio.loop.start_tls() and certificate hostname verification will proceed as expected. Upgrading to the latest version of Python or applying the patch only changes the behavior from silently skipping hostname verification to raising a ValueError, similar to SSLContext.wrap_socket(), when server_hostname isn't supplied.CVSS7.6HighEPSS0.57%PrioritiseCVE-2026-19445python software foundation · cpython +36 moreUse-after-free of a server-side SSLContext when sni_callback switches contextsA remote, unauthenticated TLS client can make a server crash or call through a freed pointer if its sni_callback assigns a different context to SSLSocket.context (the documented way to select a certificate per server name) and nothing else keeps the original ssl.SSLContext alive. Typical cases are servers that create an SSLContext per connection or replace it while connections are open; servers that wrap their listening socket with it are not affected. Mitigation: keep a reference to every SSLContext that sets sni_callback for the lifetime of the server. TLS clients are not affected.CVSS9.2CriticalEPSS0.68%RoutineCVE-2026-12345python software foundation · cpython +63 moreRace condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directoryThe cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of the temporary directory to be deleted or have their permissions and file flags reset, with the privileges of the process performing the cleanup. Note that platforms where shutil.rmtree.avoids_symlink_attacks is false, remain affected, and file flags may still be reset outside of the tree on all platforms.CVSS5.9MediumEPSS0.36%RoutineCVE-2026-82049python software foundation · cpython +31 moretarfile extraction filters allow file modification and content disclosure via hard link to symlinkIn CPython 3.13 and earlier, the tarfile module's data and tar extraction filters are vulnerable to crafted archives containing a hard link to a symbolic link. Such archives may cause extraction to modify the permissions or modification time of a file outside the destination directory, or expose the contents of that file within the extracted tree.CVSS8.4HighEPSS0.19%RoutineCVE-2026-87910python software foundation · cpython +57 moretarfile hardlink fallback ignores custom extraction filter rejection via NoneWhen tarfile extracts a link on a system that doesn't support links, it falls back to extracting a member from the archive. In this case, the filter function is run twice: once for the extracted member, and once with name set to the location of the link. For one of the calls, the return value was ignored. Instead, the member should be skipped if either call returns None.CVSS5.7MediumEPSS0.61%RoutineCVE-2026-15310python software foundation · cpython +27 morezipfile: bzip2/LZMA/Zstandard members decompress without a max_length bound, defeating chunked-read memory limitsWhen 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.CVSS2.1LowEPSS0.60%RoutineCVE-2026-19672python software foundation · cpython +25 moretarfile extraction filter bypass allows creation of directories outside the destinationThe tarfile module's tar and data extraction filters created directories outside the destination for members whose name leaves the destination and returns to it, such as ../evil/../dest/sub/file. The containment check used the resolved path, but intermediate directories were created from the name as given. Only empty directories are created outside the destination. Member contents are still extracted inside it. To return to the destination the member's name must contain the destination directory's own final component, so extraction into a secure randomised directory is not affected. This affects POSIX platforms only. On Windows, .. components are collapsed before the path reaches the filesystem, so the directories outside the destination are never created.CVSS6.3MediumEPSS0.47%RoutineCVE-2026-15806python software foundation · cpython +27 more`HTTPPasswordMgr` can send saved HTTPS credentials via HTTP because of incorrect scheme matchingThe HTTPPasswordMgr class in the urllib.request module, along with its subclasses HTTPPasswordMgrWithDefaultRealm and HTTPPasswordMgrWithPriorAuth, did not take the URL scheme into account when matching stored credentials against a requested URL. Credentials added for an https:// URL were also used for requests to the same host over http://, so an attacker able to redirect or downgrade a client to plain HTTP (for example, via an HTTPS-to-HTTP redirect or an on-path position) could capture credentials in cleartext. Credentials added for http:// URLs could likewise be sent over https://. Credential matching is now scoped by URL scheme. Credentials registered with a URL that includes a scheme are only used for requests with the same scheme. Credentials registered with a bare authority (such as example.com or example.com:8080) continue to match any scheme, preserving compatibility with existing code, including proxy authentication. Users who cannot upgrade immediately can mitigate by ensuring that applications never make plain http:// requests to hosts for which credentials are registered, for example by not following redirects to http:// URLs.CVSS6.0MediumEPSS0.48%RoutineCVE-2026-17084python software foundation · cpython +34 morestringprep.map_table_b2() deviates from RFC 3454 Table B.2The "stringprep" module didn't 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 behavior would cause 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.CVSS6.0MediumEPSS0.76%