What’s Vulnerable › Vulnerabilities

CVE-2025-0938: URL parser allowed square brackets in domain names

Description

The Python standard library functions `urllib.parse.urlsplit` and `urlparse` accepted domain names that included square brackets which isn't valid according to RFC 3986. Square brackets are only meant to be used as delimiters for specifying IPv6 and IPvFuture hosts in URLs. This could result in differential parsing across the Python URL parser and other specification-compliant URL parsers.

Affected products

How to fix

Upgrade to a fixed version: Python 3.10.17, 3.11.12, 3.12.9, 3.13.2. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2025-0938 or the next vulnerability affects your stack