Python 3.9.16
Release Date: Dec. 6, 2022
This is a security release of Python 3.9
Note: The release you're looking at is Python 3.9.16, a security bugfix release for the legacy 3.9 series. Python 3.11 is now the latest feature release series of Python 3. Get the latest release of 3.11.x here.
Security content in this release
- gh-98739: Updated bundled libexpat to 2.5.0 to fix CVE-2022-43680 (heap use-after-free).
- gh-98517: Port XKCP’s fix for the buffer overflows in SHA-3 to fix CVE-2022-37454.
- gh-98433: The IDNA codec decoder used on DNS hostnames by
socket
orasyncio
related name resolution functions no longer involves a quadratic algorithm to fix CVE-2022-45061. This prevents a potential CPU denial of service if an out-of-spec excessive length hostname involving bidirectional characters were decoded. Some protocols such asurllib
http 3xx redirects potentially allow for an attacker to supply such a name. - gh-97514: On Linux the
multiprocessing
module returns to using filesystem backed unix domain sockets for communication with the forkserver process instead of the Linux abstract socket namespace. Only code that chooses to use the “forkserver” start method is affected. This prevents Linux CVE-2022-42919 (potential privilege escalation) as abstract sockets have no permissions and could allow any user on the system in the same network namespace (often the whole system) to inject code into themultiprocessing
forkserver process. This was a potential privilege escalation. Filesystem based socket permissions restrict this to the forkserver process user as was the default in Python 3.8 and earlier. - gh-68966: The deprecated mailcap module now refuses to inject unsafe text (filenames, MIME types, parameters) into shell commands to address CVE-2015-20107. Instead of using such text, it will warn and act as if a match was not found (or for test commands, as if the test failed).
- gh-100001:
python -m http.server
no longer allows terminal control characters sent within a garbage request to be printed to the stderr server log. - gh-87604: Avoid publishing list of active per-interpreter audit hooks via the
gc
module.
No installers
According to the release calendar specified in PEP 596, Python 3.9 is now in the "security fixes only" stage of its life cycle: the 3.9 branch only accepts security fixes and releases of those are made irregularly in source-only form until October 2025. Python 3.9 isn't receiving regular bug fixes anymore, and binary installers are no longer provided for it. Python 3.9.13 was the last full bugfix release of Python 3.9 with binary installers.
Files
Version | Operating System | Description | MD5 Sum | File Size | GPG | Sigstore | |
---|---|---|---|---|---|---|---|
Gzipped source tarball | Source release | 38c99c7313f416dcf3238f5cf444c6c2 | 25.1 MB | SIG | .sigstore | ||
XZ compressed source tarball | Source release | 5738c204eecc375e29751cb2176fc9cc | 18.8 MB | SIG | .sigstore |