CVE-2025-0938: Python Software Foundation Cpython
Medium severity, CVSS 6.3. EPSS: 1.4% probability of exploitation activity in the next 30 days.
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.
What to do
The record states a fixed version for each range of affected versions. Update to the one for the range your version is in: a later release on another branch may not have the fix.
- Python Software Foundation Cpython, before 3.9.22: fixed in 3.9.22
- Python Software Foundation Cpython, from 3.10.0, before 3.10.17: fixed in 3.10.17
- Python Software Foundation Cpython, from 3.11.0, before 3.11.12: fixed in 3.11.12
- Python Software Foundation Cpython, from 3.12.0, before 3.12.9: fixed in 3.12.9
- Python Software Foundation Cpython, from 3.13.0, before 3.13.2: fixed in 3.13.2
- Python Software Foundation Cpython, from 3.14.0a1, before 3.14.0a5: fixed in 3.14.0a5
Affected products
- Python Software Foundation Cpython: before 3.9.22 (fixed in 3.9.22); from 3.10.0, before 3.10.17 (fixed in 3.10.17); from 3.11.0, before 3.11.12 (fixed in 3.11.12); from 3.12.0, before 3.12.9 (fixed in 3.12.9); from 3.13.0, before 3.13.2 (fixed in 3.13.2); from 3.14.0a1, before 3.14.0a5 (fixed in 3.14.0a5)
Published 2025-01-31. Last modified 2026-07-31.