CVE-2025-0938

URL parser allowed square brackets in domain names

State
Published
Severity
6.3 Medium
Published
Jan 31, 2025
Updated
Jul 31, 2026
Reserved
Jan 31, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.06.3 MediumCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:NPSF

Weaknesses

  • CWE-20 Improper Input Validation

Affected Products

ProductVersions
CPythonPython Software Foundation
  • before 3.9.22Affected
  • 3.10.0 to before 3.10.17Affected
  • 3.11.0 to before 3.11.12Affected
  • 3.12.0 to before 3.12.9Affected
  • 3.13.0 to before 3.13.2Affected
  • 3.14.0a1 to before 3.14.0a5Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.