Python Software Foundation Cpython vulnerabilities, page 2
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-18503python software foundation · cpython +29 moreSuper-linear CPU usage for unbounded input to csv.Sniffer.sniff()Attacker-controlled CSV samples can trigger super-linear
regular-expression work during dialect sniffing and consume significant
CPU when applications pass unbounded input to csv.Sniffer.sniff().CVSS2.4LowEPSS0.12%RoutineCVE-2026-6879python software foundation · cpython +73 moreQuadratic Behavior in xml.etree.ElementPath Index Predicates`Element.findall()` and fully-consumed `Element.iterfind()` exhibit `O(n^2)` time complexity when using XPath index predicates (e.g. `[1]`, `[last()]`, `[last()-N]`) on XML documents with many same-tag siblings. `Element.find()` is only affected when the first match is near the end of the sibling list, such as with `[last()]` or `[last()-N]`; `.//item[1]` short-circuits after the first match.CVSS2.0LowEPSS0.36%PrioritiseCVE-2026-15308python software foundation · cpython +77 moreIncremental HTMLParser feed() allows CPU-exhaustion DoS via repeated unterminated markup declarationsThe incremental HTML parser (html.parser.HTMLParser) allows for CPU
denial-of-service through repeated unterminated markup declarations when
processing uncontrolled data.CVSS8.7HighEPSS0.78%RoutineCVE-2026-4360python software foundation · cpython +65 moreTarfile.extract() doesn't fully respect filter parameterIn the Tarfile.extract() function, the filter parameter is not passed properly when extracting hardlinks. An affected system that extracts content from untrusted tar files could end up writing files with an unexpected uid/gid despite the user passing filter='data' to the extract() function.CVSS5.3MediumEPSS0.28%PrioritiseCVE-2026-11972python software foundation · cpython +64 moretarfile opened in streaming mode mishandles EOFWhen using the "tarfile" module with a file opened in "streaming mode" (mode="r|") the tarfile module did not properly handle EOF, making archive parsing take exponentially longer.CVSS8.2HighEPSS0.45%RoutineCVE-2026-0864python software foundation · cpython +28 moreConfiguration Injection via Carriage Return (\r) in write() methodWhen using the "configparser" module to write configuration files
containing multi-line text values with carriage return characters (\r) the
resulting file could be injected with unexpected keys and values if the
attacker controls the written value.CVSS5.5MediumEPSS0.13%PrioritiseCVE-2026-11940python software foundation · cpython +72 moretarfile extraction filter bypass allows escaping the destination directorytarfile.extractall() with the 'data' or 'tar'
filter could be bypassed by a crafted archive where a hardlink
references a symlink stored at a deeper name than the hardlink itself.
The extraction fallback validated the symlink at it's archived location
but recreated it at the hardlink's shallower
path, letting a relative
target the filter judged contained escape the destination directory.
This allowed a malicious tar archive to create a symlink pointing
outside the destination, enabling out-of-destination file reads or
writes. This was an incomplete fix of CVE-2025-4330.CVSS7.8HighEPSS0.75%RoutineCVE-2026-12003python software foundation · cpython +14 moreCPython >3.11 Insecure Input Validation resulting in privilege escalationTo allow builds of Python to be run from an in-tree layout (rather than
an installed file layout), the VPATH variable is defined at build time
and used to locate certain landmarks - specifically,
Modules/setup.local. When this landmark is found relative to VPATH
relative to the executable, Python assumes it is running in a source
tree and generates a different default sys.path. This code remains in
release builds, so that release-ready builds can be built in-tree.
On Windows, since builds are written to 'PCbuild/', the value of
VPATH is set to '..\..', which results in a landmark of
'..\..\Modules\setup.local'. This path is outside the install directory
of Python, and may have different permissions, potentially allowing a
low-privilege user to create the landmark and an alternative `Lib`
folder that will be discovered by an otherwise restricted install.
Such a setup occurs with the legacy default install location for all
users (in the now superseded EXE installer), due to how Windows allows
all users to create folders in the root directory of their OS drive.
Our recommended mitigation on Windows is to migrate away from the
legacy installer and use the new [Python install
manager](https://www.python.org/downloads/latest/pymanager/) to install
for the current user. Installs where the directory two levels above the
Python installation directory have equivalent permissions are unaffected
(in general, a per-user install cannot be modified at all by other
users, removing any escalation of privilege risk, and could be directly
modified by a privileged user, making the potential tampering
irrelevant). Alternative mitigations might include preemptively creating
and restricting access to a `Modules` directory. Be aware that only 3.13
and 3.14 will receive updated legacy installers - earlier fixes are only
provided as sources.
Platforms other than Windows allow VPATH to be overridden, but as they
don't usually use a separated directory in the build for binaries, are
unlikely to have a landmark reference outside of the install directory.
The landmark detection involving VPATH is a fallback for when a more
specific landmark - .\pybuilddir.txt - is absent, and was included for
compatibility. Future releases of Python will no longer include the
fallback, and so builds will need to generate or preserve the
pybuilddir.txt file in order to work in-tree. This landmark file has
been generated on Windows since 3.11, and on other platforms for longer.CVSS5.3MediumEPSS0.14%PrioritiseCVE-2026-9669python software foundation · cpython +26 morebz2.BZ2Decompressor reuse after error can cause a stack buffer overflowbz2.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.CVSS8.2HighEPSS0.43%RoutineCVE-2026-7774python software foundation · cpython +26 moretarfile.data_filter path traversal bypass allows writing outside the extraction directorytarfile.data_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() to write files outside the destination directory, subject to the permissions of the extracting process.CVSS6.9MediumEPSS0.60%RoutineCVE-2026-3276python software foundation · cpython +53 morePotential DoS via quadratic complexity in unicodedata.normalize()unicodedata.normalize() can take 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.CVSS6.3MediumEPSS0.51%RoutineCVE-2026-8328python software foundation · cpython +27 moreFTP PASV SSRF, ftpcp() does not use actual peer address, trusts server-supplied PASV host addressThe ftpcp() function in Lib/ftplib.py was not updated when
CVE-2021-4189 was fixed. While makepasv() was patched to replace
server-supplied PASV host addresses with the actual peer address
(getpeername()[0]), ftpcp() still calls parse227() directly and passes
the raw attacker-controllable IP address and port to target.sendport(). This patch is related to CVE-2021-4189.CVSS5.9MediumEPSS0.44%RoutineCVE-2026-7210python software foundation · cpython +34 moreThe expat and elementtree parsers use insufficient entropy for XML hash-flooding protection`xml.parsers.expat` and `xml.etree.ElementTree` use insufficient entropy for Expat hash-flooding protection, which allows a crafted XML document to trigger hash flooding.\r\n\r\nFully mitigating this vulnerability requires both updating libexpat to 2.8.0 or later and applying this patch.CVSS7.5HighEPSS0.67%RoutineCVE-2026-3087python software foundation · cpython +13 moreshutil.unpack_archive() doesn't check for Windows absolute paths in ZIPsIf `shutil.unpack_archive()` is given a ZIP archive with an absolute Windows path containing a drive (`C:\\...`) then the archive will be extracted outside the target directory which is different than other operating systems. Only Windows is affected by this vulnerability.CVSS7.5HighEPSS0.53%RoutineCVE-2026-6019python software foundation · cpython +68 moreBaseCookie.js_output() does not neutralize embedded charactershttp.cookies.Morsel.js_output() returns an inline <script> snippet and only escapes " for JavaScript string context. It does not neutralize the HTML parser-sensitive sequence </script> inside the generated script element. Mitigation base64-encodes the cookie value to disallow escaping using cookie value.CVSS6.1MediumEPSS0.26%PrioritiseCVE-2026-3298python software foundation · cpython +22 moreOut-of-bounds write in Windows asyncio.ProacterEventLoop.sock_recvfrom_into() when using nbytesThe method "sock_recvfrom_into()" of "asyncio.ProacterEventLoop" (Windows only) was missing a boundary check for the data buffer when using nbytes parameter. This allowed for an out-of-bounds buffer write if data was larger than the buffer size. Non-Windows platforms are not affected.CVSS8.8HighEPSS0.41%RoutineCVE-2026-5713python software foundation · cpython +2 moreOut-of-bounds read/write during remote profiling and asyncio process introspection when connecting to malicious targetThe "profiling.sampling" module (Python 3.15+) and "asyncio introspection capabilities" (3.14+, "python -m asyncio ps" and "python -m asyncio pstree") features could be used to read and write addresses in a privileged process if that process connected to a malicious or "infected" Python process via the remote debugging feature. This vulnerability requires persistently and repeatedly connecting to the process to be exploited, even after the connecting process crashes with high likelihood due to ASLR.CVSS5.3MediumEPSS0.13%RoutineCVE-2026-4786python software foundation · cpython +60 moreIncomplete mitigation of CVE-2026-4519, %action expansion for command injection to webbrowser.open()Mitgation of CVE-2026-4519 was incomplete. If the URL contained "%action" the mitigation could be bypassed for certain browser types the "webbrowser.open()" API could have commands injected into the underlying shell. See CVE-2026-4519 for details.CVSS7.1HighEPSS0.31%PrioritiseCVE-2026-6100python software foundation · cpython +52 moreUse-after-free in lzma.LZMADecompressor, bz2.BZ2Decompressor, and gzip.GzipFile after re-use under memory pressureUse-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memory allocation fails with a `MemoryError` and the decompression instance is re-used. This scenario can be triggered if the process is under memory pressure. The fix cleans up the dangling pointer in this specific error condition.
The vulnerability is only present if the program re-uses decompressor instances across multiple decompression calls even after a `MemoryError` is raised during decompression. Using the helper functions to one-shot decompress data such as `lzma.decompress()`, `bz2.decompress()`, `gzip.decompress()`, and `zlib.decompress()` are not affected as a new decompressor instance is used per call. If the decompressor instance is not re-used after an error condition, this usage is similarly not vulnerable.CVSS9.1CriticalEPSS0.86%RoutineCVE-2026-3446python software foundation · cpython +38 moreBase64 decoding stops at first padded quad by defaultWhen calling base64.b64decode() or related functions the decoding process would stop after encountering the first padded quad regardless of whether there was more information to be processed. This can lead to data being accepted which may be processed differently by other implementations. Use "validate=True" to enable stricter processing of base64 data.CVSS6.0MediumEPSS0.18%