Python 3.12.12, 3.11.14, 3.10.19, and 3.9.24 released

Published by

Python has released four new security updates: versions 3.12.12, 3.11.14, 3.10.19, and 3.9.24. These updates primarily address vulnerabilities related to XML parsing and enhance the handling of archive and ZIP files. Key improvements have also been made to the HTML parsing capabilities, aligning them with the HTML5 standard.

The updates tackle significant XML vulnerabilities, including a fix for CVE-2025-59375 in the libexpat library. The XML parser has been optimized to ensure that parent parsers are only garbage collected when subparsers created with ExternalEntityParserCreate() are no longer active.

Improvements to archive and ZIP file management include enhanced validation for member offsets within tar files and checks for consistency in zip64 end of central directory records. Moreover, support for zip64 extensible data has been included, which accommodates formats that lack additional bytes at the start.

In terms of HTML parsing, the updates introduce a host of enhancements. The html.parser.HTMLParser now correctly handles spaces between the opening tag and its name, preventing the null character from prematurely terminating tag names. Non-ASCII whitespaces and vertical tabulation are recognized as valid characters, and redundant characters in end tags are ignored, allowing for more accurate parsing of HTML structures.

CDATA section parsing has been refined to adhere to the HTML5 specifications, ensuring that certain sequences no longer prematurely terminate sections. A new private method, _set_support_cdata(), has been introduced for developers to customize CDATA parsing behavior.

Comment parsing has also seen improvements, with the parser now correctly concluding comments as per the HTML5 standards. It can now handle improperly ended comments, and enhancements to error handling in html.parser.HTMLParser mean that comments and declarations are automatically closed when end-of-file errors are detected.

Overall, these updates represent a significant step forward in security and functionality for Python's handling of XML, ZIP archives, and HTML, ensuring a more robust development environment for programmers.

Extension:
The release of these updates showcases Python's commitment to maintaining the security and efficiency of its libraries, particularly as web standards evolve. As developers increasingly rely on Python for web development and data parsing tasks, the alignment with HTML5 standards is crucial for ensuring compatibility and performance.

Furthermore, these updates may influence how developers approach error handling and data parsing in their applications, potentially leading to a shift towards more robust coding practices that account for the intricacies of HTML and XML structures.

As the programming landscape continues to evolve with the introduction of new technologies and frameworks, it's essential for Python to stay ahead of potential vulnerabilities and adapt to changing standards. Future updates may also focus on integrating more advanced features, such as improved support for asynchronous programming or enhanced data validation techniques, to further streamline the development process and bolster application security

Python 3.12.12, 3.11.14, 3.10.19, and 3.9.24 released

Python releases four new security updates: 3.12.12, 3.11.14, 3.10.19, and 3.9.24, addressing vulnerabilities in XML parsing and improving handling of archive and ZIP files. The HTML parsing capabilities have been significantly enhanced to align with the HTML5 standard, resolving various issues related to tag name recognition, attribute handling, CDATA section parsing, and comment termination. Better support for non-ASCII whitespaces, disregard for unnecessary characters, and more accurate parsing of attributes, tags, and comments are among these improvements. Additionally, the updates now automatically close comments and declarations when encountering end-of-file errors in html.parser.HTMLParser.

Python 3.12.12, 3.11.14, 3.10.19, and 3.9.24 released @ Linux Compatible