Changelog¶
Python 3.10.19 final¶
Release date: 2025-10-09
Security¶
gh-139700: Check consistency of the zip64 end of central directory record. Support records with “zip64 extensible data” if there are no bytes prepended to the ZIP file.
gh-139400:
xml.parsers.expat: Make sure that parent Expat parsers are only garbage-collected once they are no longer referenced by subparsers created byExternalEntityParserCreate(). Patch by Sebastian Pipping.gh-135661: Fix parsing start and end tags in
html.parser.HTMLParseraccording to the HTML5 standard.Whitespaces no longer accepted between
</and the tag name. E.g.</ script>does not end the script section.Vertical tabulation (
\v) and non-ASCII whitespaces no longer recognized as whitespaces. The only whitespaces are\t\n\r\fand space.Null character (U+0000) no longer ends the tag name.
Attributes and slashes after the tag name in end tags are now ignored, instead of terminating after the first
>in quoted attribute value. E.g.</script/foo=">"/>.Multiple slashes and whitespaces between the last attribute and closing
>are now ignored in both start and end tags. E.g.<a foo=bar/ //>.Multiple
=between attribute name and value are no longer collapsed. E.g.<a foo==bar>produces attribute “foo” with value “=bar”.
gh-135661: Fix CDATA section parsing in
html.parser.HTMLParseraccording to the HTML5 standard:] ]>and]] >no longer end the CDATA section. Add private method_set_support_cdata()which can be used to specify how to parse<[CDATA[— as a CDATA section in foreign content (SVG or MathML) or as a bogus comment in the HTML namespace.gh-102555: Fix comment parsing in
html.parser.HTMLParseraccording to the HTML5 standard.--!>now ends the comment.-- >no longer ends the comment. Support abnormally ended empty comments<-->and<--->.gh-135462: Fix quadratic complexity in processing specially crafted input in
html.parser.HTMLParser. End-of-file errors are now handled according to the HTML5 specs – comments and declarations are automatically closed, tags are ignored.gh-118350: Fix support of escapable raw text mode (elements “textarea” and “title”) in
html.parser.HTMLParser.gh-86155:
html.parser.HTMLParser.close()no longer loses data when the<script>tag is not closed. Patch by Waylan Limberg.
Library¶
Python 3.10.18 final¶
Release date: 2025-06-03
Security¶
gh-135034: Fixes multiple issues that allowed
tarfileextraction filters (filter="data"andfilter="tar") to be bypassed using crafted symlinks and hard links.Addresses CVE 2024-12718, CVE 2025-4138, CVE 2025-4330, and CVE 2025-4517.
gh-133767: Fix use-after-free in the “unicode-escape” decoder with a non-“strict” error handler.
gh-128840: Short-circuit the processing of long IPv6 addresses early in
ipaddressto prevent excessive memory consumption and a minor denial-of-service.
Library¶
gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address.
gh-134062:
ipaddress: fix collisions in__hash__()forIPv4NetworkandIPv6Networkobjects.gh-123409: Fix
ipaddress.IPv6Address.reverse_pointeroutput according to RFC 3596, §2.5. Patch by Bénédikt Tran.bpo-43633: Improve the textual representation of IPv4-mapped IPv6 addresses (RFC 4291 Sections 2.2, 2.5.5.2) in
ipaddress. Patch by Oleksandr Pavliuk.
Python 3.10.17 final¶
Release date: 2025-04-08
Security¶
gh-131809: Update bundled libexpat to 2.7.1
gh-131261: Upgrade to libexpat 2.7.0
gh-105704: When using
urllib.parse.urlsplit()andurllib.parse.urlparse()host parsing would not reject domain names containing square brackets ([and]). Square brackets are only valid for IPv6 and IPvFuture hosts according to RFC 3986 Section 3.2.2.gh-121284: Fix bug in the folding of rfc2047 encoded-words when flattening an email message using a modern email policy. Previously when an encoded-word was too long for a line, it would be decoded, split across lines, and re-encoded. But commas and other special characters in the original text could be left unencoded and unquoted. This could theoretically be used to spoof header lines using a carefully constructed encoded-word if the resulting rendered email was transmitted or re-parsed.
gh-80222: Fix bug in the folding of quoted strings when flattening an email message using a modern email policy. Previously when a quoted string was folded so that it spanned more than one line, the surrounding quotes and internal escapes would be omitted. This could theoretically be used to spoof header lines using a carefully constructed quoted string if the resulting rendered email was transmitted or re-parsed.
gh-119511: Fix a potential denial of service in the
imaplibmodule. When connecting to a malicious server, it could cause an arbitrary amount of memory to be allocated. On many systems this is harmless as unused virtual memory is only a mapping, but if this hit a virtual address size limit it could lead to aMemoryErroror other process crash. On unusual systems or builds where all allocated memory is touched and backed by actual ram or storage it could’ve consumed resources doing so until similarly crashing.
Library¶
Documentation¶
gh-121277: Writers of CPython’s documentation can now use
nextas the version for theversionchanged,versionadded,deprecateddirectives.
Python 3.10.16 final¶
Release date: 2024-12-03
Tests¶
gh-125041: Re-enable skipped tests for
zlibon the s390x architecture: only skip checks of the compressed bytes, which can be different between zlib’s software implementation and the hardware-accelerated implementation.gh-109396: Fix
test_socket.test_hmac_sha1()in FIPS mode. Use a longer key: FIPS mode requires at least of at least 112 bits. The previous key was only 32 bits. Patch by Victor Stinner.
Security¶
Library¶
gh-124651: Properly quote template strings in
venvactivation scripts.gh-103848: Add checks to ensure that
[bracketed]hosts found byurllib.parse.urlsplit()are of IPv6 or IPvFuture format.
Python 3.10.15 final¶
Release date: 2024-09-07
Windows¶
Tests¶
gh-112769: The tests now correctly compare zlib version when
zlib.ZLIB_RUNTIME_VERSIONcontains non-integer suffixes. For example zlib-ng defines the version as1.3.0.zlib-ng.gh-117187: Fix XML tests for vanilla Expat <2.6.0.
gh-100454: Fix SSL tests CI for OpenSSL 3.1+
Security¶
gh-123678: Upgrade libexpat to 2.6.3
gh-121957: Fixed missing audit events around interactive use of Python, now also properly firing for
python -i, as well as forpython -m asyncio. The event in question iscpython.run_stdin.gh-122133: Authenticate the socket connection for the
socket.socketpair()fallback on platforms whereAF_UNIXis not available like Windows.Patch by Gregory P. Smith <greg@krypto.org> and Seth Larson <seth@python.org>. Reported by Ellie <el@horse64.org>
gh-121285: Remove backtracking from tarfile header parsing for
hdrcharset, PAX, and GNU sparse headers.gh-118486:
os.mkdir()on Windows now accepts mode of0o700to restrict the new directory to the current user. This fixes CVE-2024-4030 affectingtempfile.mkdtemp()in scenarios where the base temporary directory is more permissive than the default.gh-116741: Update bundled libexpat to 2.6.2
Library¶
gh-123693: Use platform-agnostic behavior when computing
zipfile.Path.name.gh-123270: Applied a more surgical fix for malformed payloads in
zipfile.Pathcausing infinite loops (gh-122905) without breaking contents using legitimate characters.gh-123067: Fix quadratic complexity in parsing
"-quoted cookie values with backslashes byhttp.cookies.gh-122905:
zipfile.Pathobjects now sanitize names from the zipfile.gh-121650:
emailheaders with embedded newlines are now quoted on output. Thegeneratorwill now refuse to serialize (write) headers that are unsafely folded or delimited; seeverify_generated_headers. (Contributed by Bas Bloemsaat and Petr Viktorin in gh-121650.)gh-113171: Fixed various false positives and false negatives in
ipaddress.IPv4Address.is_private(see these docs for details)
Also in the corresponding
ipaddress.IPv4Networkandipaddress.IPv6Networkattributes.gh-102988:
email.utils.getaddresses()andemail.utils.parseaddr()now return('', '')2-tuples in more situations where invalid email addresses are encountered instead of potentially inaccurate values. Add optional strict parameter to these two functions: usestrict=Falseto get the old behavior, accept malformed inputs.getattr(email.utils, 'supports_strict_parsing', False)can be use to check if the strict paramater is available. Patch by Thomas Dwyer and Victor Stinner to improve the CVE-2023-27043 fix.gh-67693: Fix
urllib.parse.urlunparse()andurllib.parse.urlunsplit()for URIs with path starting with multiple slashes and no authority. Based on patch by Ashwin Ramaswami.
Core and Builtins¶
gh-112275: A deadlock involving
pystate.c’sHEAD_LOCKinposixmodule.cat fork is now fixed. Patch by ChuBoning based on previous Python 3.12 fix by Victor Stinner.
Python 3.10.14 final¶
Release date: 2024-03-19
Security¶
gh-115398: Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods:
gh-115399: Update bundled libexpat to 2.6.0
gh-114572:
ssl.SSLContext.cert_store_stats()andssl.SSLContext.get_ca_certs()now correctly lock access to the certificate store, when thessl.SSLContextis shared across multiple threads.gh-113659: Skip
.pthfiles with names starting with a dot or hidden file attribute.
Core and Builtins¶
gh-102388: Fix a bug where
iso2022_jp_3andiso2022_jp_2004codecs read out of bounds
Library¶
gh-115197:
urllib.requestno longer resolves the hostname before checking it against the system’s proxy bypass list on macOS and Windows.gh-115133: Fix tests for
XMLPullParserwith Expat 2.6.0.gh-81194: Fix a crash in
socket.if_indextoname()with specific value (UINT_MAX). Fix an integer overflow insocket.if_indextoname()on 64-bit non-Windows platforms.gh-109858: Protect
zipfilefrom “quoted-overlap” zipbomb. It now raises BadZipFile when try to read an entry that overlaps with other entry or central directory.gh-91133: Fix a bug in
tempfile.TemporaryDirectorycleanup, which now no longer dereferences symlinks when working around file system permission errors.
Documentation¶
gh-115399: Document CVE-2023-52425 of Expat <2.6.0 under “XML vulnerabilities”.
Windows¶
Tools/Demos¶
gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and multissltests to use 1.1.1w, 3.0.11, and 3.1.3.
Python 3.10.13 final¶
Release date: 2023-08-24
Security¶
gh-108310: Fixed an issue where instances of
ssl.SSLSocketwere vulnerable to a bypass of the TLS handshake and included protections (like certificate verification) and treating sent unencrypted data as if it were post-handshake TLS encrypted data. Security issue reported as CVE-2023-40217 by Aapo Oksman. Patch by Gregory P. Smith.
Library¶
gh-107845:
tarfile.data_filter()now takes the location of symlinks into account when determining their target, so it will no longer reject some valid tarballs withLinkOutsideDestinationError.
Tools/Demos¶
gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3.0.10, and 3.1.2.
C API¶
gh-99612: Fix
PyUnicode_DecodeUTF8Stateful()for ASCII-only data:*consumedwas not set.
Python 3.10.12 final¶
Release date: 2023-06-06
Security¶
gh-103142: The version of OpenSSL used in our binary builds has been upgraded to 1.1.1u to address several CVEs.
gh-99889: Fixed a security in flaw in
uu.decode()that could allow for directory traversal based on the input if noout_filewas specified.gh-104049: Do not expose the local on-disk location in directory indexes produced by
http.client.SimpleHTTPRequestHandler.gh-102153:
urllib.parse.urlsplit()now strips leading C0 control and space characters following the specification for URLs defined by WHATWG in response to CVE-2023-24329. Patch by Illia Volochii.
Library¶
gh-103935: Use
io.open_code()for files to be executed instead of rawopen()gh-102953: The extraction methods in
tarfile, andshutil.unpack_archive(), have a new a filter argument that allows limiting tar features than may be surprising or dangerous, such as creating files outside the destination directory. See Extraction filters for details.
Documentation¶
gh-89412: Add missing documentation for the
end_linenoandend_offsetattributes of thetraceback.TracebackExceptionclass.
Build¶
gh-103262: Fixes Windows installer build to work with latest compilers.
Python 3.10.11 final¶
Release date: 2023-04-04
Security¶
gh-101727: Updated the OpenSSL version used in Windows and macOS binary release builds to 1.1.1t to address CVE-2023-0286, CVE-2022-4303, and CVE-2022-4303 per the OpenSSL 2023-02-07 security advisory.
gh-101283:
subprocess.Popennow uses a safer approach to findcmd.exewhen launching withshell=True. Patch by Eryk Sun, based on a patch by Oleg Iarygin.
Core and Builtins¶
gh-102416: Do not memoize incorrectly automatically generated loop rules in the parser. Patch by Pablo Galindo.
gh-102356: Fix a bug that caused a crash when deallocating deeply nested filter objects. Patch by Marta Gómez Macías.
gh-102397: Fix segfault from race condition in signal handling during garbage collection. Patch by Kumar Aditya.
gh-102126: Fix deadlock at shutdown when clearing thread states if any finalizer tries to acquire the runtime head lock. Patch by Kumar Aditya.
gh-102027: Fix SSE2 and SSE3 detection in
_blake2internal module. Patch by Max Bachmann.gh-101967: Fix possible segfault in
positional_only_passed_as_keywordfunction, when new list created.gh-101765: Fix SystemError / segmentation fault in iter
__reduce__when internal access ofbuiltins.__dict__keys mutates the iter object.
Library¶
gh-102947: Improve traceback when
dataclasses.fields()is called on a non-dataclass. Patch by Alex Waygoodgh-101979: Fix a bug where parentheses in the
metavarargument toargparse.ArgumentParser.add_argument()were dropped. Patch by Yeojin Kim.gh-101961: For the binary mode,
fileinput.hookcompressed()doesn’t set theencodingvalue even if the value isNone. Patch by Gihwan Kim.gh-101936: The default value of
fpbecomesio.BytesIOifHTTPErroris initialized without a designatedfpparameter. Patch by Long Vo.gh-101566: In zipfile, apply fix for extractall on the underlying zipfile after being wrapped in
Path.gh-101997: Upgrade pip wheel bundled with ensurepip (pip 23.0.1)
gh-101892: Callable iterators no longer raise
SystemErrorwhen the callable object exhausts the iterator but forgets to either return a sentinel value or raiseStopIteration.gh-97786: Fix potential undefined behaviour in corner cases of floating-point-to-time conversions.
gh-101517: Fixed bug where
bdblooks up the source line withlinecachewith alineno=None, which causes it to fail with an unhandled exception.gh-101673: Fix a
pdbbug wherellclears the changes to local variables.gh-96931: Fix incorrect results from
ssl.SSLSocket.shared_ciphers()gh-88233: Correctly preserve “extra” fields in
zipfileregardless of their ordering relative to a zip64 “extra.”gh-95495: When built against OpenSSL 3.0, the
sslmodule had a bug where it reported unauthenticated EOFs (i.e. without close_notify) as a clean TLS-level EOF. It now raisesSSLEOFError, matching the behavior in previous versions of OpenSSL. Theoptionsattribute onSSLContextalso no longer includesOP_IGNORE_UNEXPECTED_EOFby default. This option may be set to specify the previous OpenSSL 3.0 behavior.gh-94440: Fix a
concurrent.futures.processbug whereProcessPoolExecutorshutdown could hang after a future has been quickly submitted and canceled.
Documentation¶
gh-103112: Add docstring to
http.client.HTTPResponse.read()to fixpydocoutput.gh-85417: Update
cmathdocumentation to clarify behaviour on branch cuts.gh-97725: Fix
asyncio.Task.print_stack()description forfile=None. Patch by Oleg Iarygin.
Tests¶
Build¶
gh-102711: Fix
-Wstrict-prototypescompiler warnings.
Windows¶
macOS¶
gh-103207: Add instructions to the macOS installer welcome display on how to workaround the macOS 13 Ventura “The installer encountered an error” failure.
gh-101759: Update macOS installer to SQLite 3.40.1.
gh-87235: On macOS
python3 /dev/fd/9 9</path/to/script.pyfailed for any script longer than a couple of bytes.
Python 3.10.10 final¶
Release date: 2023-02-07
Core and Builtins¶
gh-101400: Fix wrong lineno in exception message on
continueorbreakwhich are not in a loop. Patch by Dong-hee Na.gh-101372: Fix
is_normalized()to properly handle the UCD 3.2.0 cases. Patch by Dong-hee Na.gh-101046: Fix a possible memory leak in the parser when raising
MemoryError. Patch by Pablo Galindogh-100942: Fixed segfault in property.getter/setter/deleter that occurred when a property subclass overrode the
__new__method to return a non-property instance.gh-100892: Fix race while iterating over thread states in clearing
threading.local. Patch by Kumar Aditya.gh-100776: Fix misleading default value in
input()’s__text_signature__.gh-100374: Fix incorrect result and delay in
socket.getfqdn(). Patch by Dominic Socular.gh-100050: Honor existing errors obtained when searching for mismatching parentheses in the tokenizer. Patch by Pablo Galindo