3.8.10-0ubuntu1~20.04.16 broke IPv6 zone parsing
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| python3.8 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
| Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
It appears 3.8.10-
The following used to work on focal:
>>> from urllib.parse import urlparse
>>> urlparse('http://[fe80::
But now, we get:
(focal-
ii libpython3.
ii libpython3.
ii python3.8 3.8.10-
ii python3.8-minimal 3.8.10-
(focal-
Python 3.8.10 (default, Mar 11 2025, 17:45:31)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.parse import urlparse
>>> urlparse('http://[fe80::
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
splitresult = urlsplit(url, scheme, allow_fragments)
File "/usr/lib/
_check_
File "/usr/lib/
_check_
File "/usr/lib/
ip = ipaddress.
File "/usr/lib/
raise ValueError('%r does not appear to be an IPv4 or IPv6 address' %
ValueError: 'fe80::
Compared to python tip (with the CVE fix) this works as expected:
$ python3
Python 3.14.0a6+ (heads/
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.parse import urlparse
>>> urlparse('http://[fe80::
ParseResult(
>>>
>>> urlparse('http://
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
urlparse('http://
~~~
File "/home/
scheme, netloc, url, params, query, fragment = _urlparse(url, scheme, allow_fragments)
File "/home/
scheme, netloc, url, query, fragment = _urlsplit(url, scheme, allow_fragments)
File "/home/
_check_
~~~
File "/home/
raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL
>>>
CVE References
| Changed in python3.8 (Ubuntu): | |
| status: | New → Invalid |

At the very least, this will result in IPv6 openstack instances failing to boot: /github. com/canonical/ cloud-init/ blob/main/ cloudinit/ sources/ DataSourceOpenS tack.py# L78
https:/
I think this needs to be treated as a critical issue.