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.
Published: 2025-01-31
Score: 6.3 Medium
EPSS: 1.5% Low
KEV: No
Impact: Parsing inconsistencies leading to logic errors
Action: Update CPython
AI Analysis

Impact

A flaw in Python’s urllib.parse.urlsplit and urlparse accepts domain names containing square brackets, which are not permitted by RFC 3986 except as delimiters for IPv6 or IPvFuture addresses. This improper input validation causes URLs to be parsed differently by Python than by other compliant parsers, potentially exposing applications to security‑sensitive logic errors such as incorrect hostname verification or unauthorized redirects. The CWE‑20 designation confirms the issue is an input validation flaw.

Affected Systems

The defect resides in CPython, the reference implementation of Python produced by the Python Software Foundation. Any deployment of CPython that uses the affected urllib.parse functions—such as applications and services built against older Python releases—may be impacted. Red Hat Enterprise Linux 9 and related packages that ship Python, as indicated by the supplied CPE identifiers, are therefore also covered.

Risk and Exploitability

The CVSS score of 6.3 indicates moderate severity, while the EPSS score of 1 % suggests a low likelihood of exploitation at the time of assessment and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is an attacker who can supply a crafted URL containing square brackets in a domain name to an application that passes it directly to urllib.parse. Because the parsing error creates a mismatch between the hostname seen by Python and that seen by other parsers, a malicious user could potentially bypass hostname checks or redirect logic, facilitating phishing or other logic‑bypass attacks. This inference is deduced from the description and the nature of the flaw, as the CVE text does not explicitly describe an exploitation path.

Generated by OpenCVE AI on April 22, 2026 at 12:11 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest CPython release that contains the urllib.parse fix
  • Validate that host components of URLs do not contain '[' or ']' unless they are part of an IPv6 or IPvFuture literal before calling urllib.parse
  • Implement tests to ensure that URL parsing behaves consistently with RFC 3986 when processing user‑supplied URLs

Generated by OpenCVE AI on April 22, 2026 at 12:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4087-1 python3.9 security update
Debian DLA Debian DLA DLA-4354-1 pypy3 security update
EUVD EUVD EUVD-2025-1935 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.
Ubuntu USN Ubuntu USN USN-7280-1 Python vulnerability
Ubuntu USN Ubuntu USN USN-7280-2 Python vulnerability
Ubuntu USN Ubuntu USN USN-7280-3 Python 2.7 regression
Ubuntu USN Ubuntu USN USN-7348-1 Python vulnerabilities
Ubuntu USN Ubuntu USN USN-7348-2 Python regression
History

Mon, 03 Nov 2025 21:30:00 +0000

Type Values Removed Values Added
References

Wed, 16 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.00624}

epss

{'score': 0.00637}


Fri, 11 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.00633}

epss

{'score': 0.00624}


Tue, 03 Jun 2025 02:45:00 +0000

Type Values Removed Values Added
First Time appeared Redhat discovery
CPEs cpe:/a:redhat:discovery:1.14::el9
Vendors & Products Redhat discovery

Wed, 14 May 2025 03:00:00 +0000

Type Values Removed Values Added
First Time appeared Redhat
Redhat enterprise Linux
CPEs cpe:/a:redhat:enterprise_linux:9
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux

Fri, 14 Mar 2025 10:45:00 +0000

Type Values Removed Values Added
References

Fri, 28 Feb 2025 19:30:00 +0000


Tue, 04 Feb 2025 20:45:00 +0000


Sat, 01 Feb 2025 02:00:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N'}

threat_severity

Moderate


Fri, 31 Jan 2025 20:15:00 +0000


Fri, 31 Jan 2025 19:45:00 +0000


Fri, 31 Jan 2025 19:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 31 Jan 2025 18:00:00 +0000

Type Values Removed Values Added
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.
Title URL parser allowed square brackets in domain names
Weaknesses CWE-20
References
Metrics cvssV4_0

{'score': 6.3, 'vector': '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'}


Subscriptions

Redhat Discovery Enterprise Linux
cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-04-21T20:14:13.406Z

Reserved: 2025-01-31T17:45:10.107Z

Link: CVE-2025-0938

cve-icon Vulnrichment

Updated: 2025-11-03T20:56:43.285Z

cve-icon NVD

Status : Deferred

Published: 2025-01-31T18:15:38.053

Modified: 2026-04-15T00:35:42.020

Link: CVE-2025-0938

cve-icon Redhat

Severity : Moderate

Publid Date: 2025-01-31T17:51:35Z

Links: CVE-2025-0938 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-22T12:15:16Z

Weaknesses