CVE-2025-0938
URL parser allowed square brackets in domain names
Check your servers for CVE-2025-0938
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-0938 affects cpython, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Attack requirements
- present: an attack works only when the target is in a certain state or configuration
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Impact on the vulnerable system
- confidentiality none, integrity low, availability none: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality none, integrity low, availability none: what an attacker can read, change or stop beyond it
Exploitation
EPSS 1.54%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 75.7% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 31 Jan 2025):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-20 Improper Input Validation
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| CPython |
affected before 3.9.22 affected from 3.10.0, before 3.10.17 affected from 3.11.0, before 3.11.12 affected from 3.12.0, before 3.12.9 affected from 3.13.0, before 3.13.2 affected from 3.14.0a1, before 3.14.0a5
Other versions: unaffected
|
Is my server affected?
Find the installed version of cpython and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i cpython
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2025-0938 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2025-0938RHEL, Rocky, Alma, Fedora
rpm -q cpython
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2025-0938Alpine
apk list --installed | grep -i cpythonWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-0938
trivy image --scanners vuln IMAGE | grep CVE-2025-0938
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://mail.python.org/archives/list/security-announce@python.org/thread/K4EUG6EKV6JYFIC24BASYOZS4M5XOQIB/ mail.python.org · vendor advisory
Patches and release notes
- https://github.com/python/cpython/pull/129418 github.com · patch
- https://github.com/python/cpython/commit/d89a5f6a6e65511a5f6e0618c4c30a7aa5aba56a github.com · patch
- https://github.com/python/cpython/commit/90e526ae67b172ed7c6c56e7edad36263b0f9403 github.com · patch
- https://github.com/python/cpython/commit/a7084f6075c9595ba60119ce8c62f1496f50c568 github.com · patch
- https://github.com/python/cpython/commit/526617ed68cde460236c973e5d0a8bad4de896ba github.com · patch
- https://github.com/python/cpython/commit/b8b4b713c5f8ec0958c7ef8d29d6711889bc94ab github.com · patch
- https://github.com/python/cpython/commit/ff4e5c25666f63544071a6b075ae8b25c98b7a32 github.com · patch
Other references
- https://github.com/python/cpython/issues/105704 github.com · issue tracking
- https://security.netapp.com/advisory/ntap-20250314-0002/ security.netapp.com
- https://lists.debian.org/debian-lts-announce/2025/03/msg00013.html lists.debian.org
Source: the record CVE-2025-0938 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse