Python 3.10.21
Release date: Aug. 12, 2026
This is a security release of Python 3.10
Note: The release you're looking at is Python 3.10.21, a security bugfix release for the legacy 3.10 series. Python 3.14 is now the latest feature release series of Python 3. Get the latest release of 3.14.x here.
Security content in this release
- gh-100372:
ssl.SSLContext.load_verify_locationsno longer incorrectly accepts some cases of trailing data when parsing DER. - gh-143930: Reject leading dashes in URLs passed to
webbrowser.open(). - gh-137586: Invoke osascript with absolute path in
webbrowserandturtledemo. - gh-141707: Don’t change
tarfile.TarInfotype fromAREGTYPEtoDIRTYPEwhen parsing GNU long name or link headers. - gh-146211: Reject CR/LF characters in tunnel request headers for the HTTPConnection.set_tunnel() method.
- gh-149486:
tarfile.data_filter()now validates link targets using the same normalised value that is written to disk, strips trailing separators from the member name when resolving a symlink’s directory, and rejects link members that would replace the destination directory itself. This closes several path-traversal bypasses of thedataextraction filter. - gh-87451: The
ftplibmodule’s undocumentedftpcpfunction no longer trusts the IPv4 address value returned from the source server in response to thePASVcommand by default, completing the fix for CVE-2021-4189. As withftplib.FTP, the former behavior can be re-enabled by setting thetrust_server_pasv_ipv4_addressattribute on the sourceftplib.FTPinstance toTrue. Thanks to Qi Deng at Aurascape AI for the report. - gh-145506: Fixes CVE 2026-2297 by ensuring that
SourcelessFileLoaderusesio.open_code()when opening.pycfiles. - gh-144370: Disallow usage of control characters in status in
wsgiref.handlersto prevent HTTP header injections. Patch by Benedikt Johannes. - gh-145986:
xml.parsers.expat: Fixed a crash caused by unbounded C recursion when converting deeply nested XML content models withElementDeclHandler(). This addresses CVE 2026-4224. - gh-145599: Reject control characters in
http.cookies.Morselupdate()andjs_output(). This addresses CVE 2026-3644. - gh-148395: Fix a dangling input pointer in
lzma.LZMADecompressor,bz2.BZ2Decompressor, and internalzlib._ZlibDecompressorwhen memory allocation fails withMemoryError, which could let a subsequentdecompress()call read or write through a stale pointer to the already-released caller buffer. - gh-148169: A bypass in
webbrowserallowed URLs prefixed with%actionto pass the dash-prefix safety check. - gh-146581: Fix vulnerability in
shutil.unpack_archive()for ZIP files on Windows which allowed to write files outside of the destination tree if the patch in the archive contains a Windows drive prefix. Now such invalid paths will be skipped. Files containing “..” in the name (like “foo..bar”) are no longer skipped. - gh-149079: Fix a potential denial of service in
unicodedata.normalize(). The canonical ordering step of Unicode normalization used a quadratic-time insertion sort for reordering combining characters, which could be exploited with crafted input containing many combining characters in non-canonical order. Replaced with a linear-time counting sort for long runs. - gh-150599: Fix a possible stack buffer overflow in
bz2when abz2.BZ2Decompressoris reused after a decompression error. The decompressor now becomes unusable after libbz2 reports an error. - gh-90949: Add
SetBillionLaughsAttackProtectionActivationThreshold()andSetBillionLaughsAttackProtectionMaximumAmplification()to xmlparser objects to tune protections against billion laughs attacks. Patch by Bénédikt Tran. - gh-151981: In
tarfile, seeking a stream now stops when end of the stream is reached. - gh-151558: Fixed a vulnerability in the
tarfiledataandtarextraction filters where crafted archives could create a symlink pointing outside the destination directory. This was a bypass of CVE 2025-4330. - gh-143927: Normalize all line endings (CR, CRLF, and LF) to LF+TAB when writing multi-line configparser values.
- gh-150743:
http.clientnow limits the number of chunked-response trailer lines it will read to 100, and the number of interim (1xx) responses it will skip to 100. A malicious or broken server could previously stream trailer lines or100 Continueresponses forever, hanging the client even when a socket timeout was in use. Reported by@YLChen-007via GHSA-w4q2-g22w-6fr4. - gh-151987: The
tarfile.TarFile.extract()method now applies the given filter when it extracts a link target from the archive as a fallback. - gh-153030: Fixed quadratic complexity in incremental parsing of long unterminated constructs (such as tags or comments) in
html.parser.HTMLParser, which could be exploited for a denial of service. - gh-146333: Fix quadratic backtracking in
configparser.RawConfigParseroption parsing regexes (OPTCREandOPTCRE_NV). A crafted configuration line with many whitespace characters could cause excessive CPU usage. - gh-152674: The
xml.etree.ElementTree.Elementmethodsfindall(),iterfind()andfind()avoid quadratic behavior when using XPath index predicates ([1],[last()],[last()-N]) on XML documents with many same-tag siblings. - gh-109638: Fix exponential time in
csv.Sniffer.sniff()for a sample which contains many quote characters. A doubled quote character is now also detected in a field which contains the delimiter or a line break. - gh-98820: Fix quadratic time in
csv.Sniffer.sniff()for a sample which contains quoted fields, in particular for a single column of quoted fields. - gh-146083, gh-149017, gh-149698, gh-152216: Update bundled libexpat to version 2.8.2.
No installers
According to the release calendar specified in PEP 619, Python 3.10 is in the "security fixes only" stage of its life cycle: the 3.10 branch only accepts security fixes, and releases of those are made irregularly in source-only form until October 2026. Python 3.10 isn't receiving regular bug fixes anymore, and binary installers are no longer provided for it. Python 3.10.11 was the last full bugfix release of Python 3.10 with binary installers.
Files
Source release
| Version | Operating system | Description | File size | Sigstore | GPG | SHA-256 checksum | |
|---|---|---|---|---|---|---|---|
| Gzipped source tarball | Source release | 24.7 MB | .sigstore | SIG | f276987f06270ae6 |
||
| XZ compressed source tarball | Source release | 19.0 MB | .sigstore | SIG | a0da1e72132e9501 |
||
