CVE-2025-0938
NoneCVSS
—
EPSS
1.6%
Published
Jan 31, 2025
CISA due date
—
Cloudanix analysis
A flaw in how Python handles certain web addresses could let attackers make different systems disagree on what a link means, potentially allowing security checks to be skipped.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- High
- Impact
- Data Tampering
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The Python urllib.parse.urlsplit and urlparse functions accept domain names containing square brackets, violating RFC 3986 where brackets are reserved exclusively for IPv6 and IPvFuture address delimiters, enabling inconsistent URL interpretation between Python and compliant parsers.
Why it matters to the business
Applications relying on Python URL parsing may experience bypasses of security controls such as allow-lists, redirects, or host validation when interacting with other systems, increasing risk of unintended behavior in web services and proxies that process external URLs.
How an attack unfolds
An attacker supplies a crafted URL embedding square brackets in the authority component to a Python application; urlparse accepts and returns a parsed result with an unexpected host value while standards-compliant parsers in downstream services or filters treat the input differently, enabling differential parsing attacks such as filter evasion or redirect manipulation.
How to fix it
Upgrade python/cpython to the commit 526617ed68cde460236c973e5d0a8bad4de896ba or later releases that enforce RFC 3986 bracket rules in urlsplit and urlparse; validate all URL inputs against a strict parser before processing.
How to confirm the fix worked
Test urlsplit and urlparse against inputs such as 'http://[example.com]/' and confirm they now raise errors or normalize correctly per RFC 3986; review application code for direct use of these functions on untrusted data.
Typical attack path
- Craft URL containing square brackets around a non-IPv6 hostname segment
- Submit URL to Python code path invoking urlsplit or urlparse
- Receive parsed structure with host value accepted by Python but rejected or altered by other parsers
- Leverage resulting inconsistency to bypass validation, routing, or security logic in chained components
How to detect it
Search application and proxy logs for URLs containing literal square brackets in the host portion that were successfully parsed; review any recorded host values or redirect targets that include bracketed segments.
What your security team should do
- Prioritize upgrade of all Python environments to the fixed commit in cpython
- Audit codebases for reliance on urlsplit/urlparse results for security decisions
- Implement input sanitization or alternative RFC-compliant URL libraries as defense-in-depth
- Monitor for any downstream dependents affected by the widespread Python standard library usage
The record
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 packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | python39 | 0 | 3.9.25-2.module_el8.10.0+4083+53cad1fb |
| AlmaLinux:8 | python39-Cython | 0 | 0.29.21-5.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-Cython | 0 | 0.29.21-5.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-PyMySQL | 0 | 0.10.1-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-attrs | 0 | 20.3.0-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-cffi | 0 | 1.14.3-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-cffi | 0 | 1.14.3-2.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-chardet | 0 | 3.0.4-19.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-cryptography | 0 | 3.3.1-3.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-debug | 0 | 3.9.25-2.module_el8.10.0+4083+53cad1fb |
| AlmaLinux:8 | python39-devel | 0 | 3.9.25-2.module_el8.10.0+4083+53cad1fb |
| AlmaLinux:8 | python39-idle | 0 | 3.9.25-2.module_el8.10.0+4083+53cad1fb |
| AlmaLinux:8 | python39-idna | 0 | 2.10-4.module_el8.10.0+3849+a48d89aa |
| AlmaLinux:8 | python39-iniconfig | 0 | 1.1.1-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-libs | 0 | 3.9.25-2.module_el8.10.0+4083+53cad1fb |
| AlmaLinux:8 | python39-lxml | 0 | 4.6.5-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-lxml | 0 | 4.6.5-1.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-mod_wsgi | 0 | 4.7.1-7.module_el8.10.0+3989+a618fe15.1 |
| AlmaLinux:8 | python39-more-itertools | 0 | 8.5.0-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-numpy | 0 | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-numpy | 0 | 1.19.4-3.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-numpy-doc | 0 | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-numpy-f2py | 0 | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-numpy-f2py | 0 | 1.19.4-3.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-packaging | 0 | 20.4-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pip | 0 | 20.2.4-9.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-pip-wheel | 0 | 20.2.4-9.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-pluggy | 0 | 0.13.1-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-ply | 0 | 3.11-10.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-psutil | 0 | 5.8.0-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-psutil | 0 | 5.8.0-4.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-psycopg2 | 0 | 2.8.6-3.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-psycopg2-doc | 0 | 2.8.6-3.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-psycopg2-tests | 0 | 2.8.6-3.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-py | 0 | 1.10.0-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pybind11 | 0 | 2.7.1-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pybind11 | 0 | 2.7.1-1.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-pybind11-devel | 0 | 2.7.1-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pybind11-devel | 0 | 2.7.1-1.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-pycparser | 0 | 2.20-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pyparsing | 0 | 2.4.7-5.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pysocks | 0 | 1.7.1-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pytest | 0 | 6.0.2-2.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pyyaml | 0 | 5.4.1-1.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-pyyaml | 0 | 5.4.1-1.module_el8.6.0+3248+c431e88c |
| AlmaLinux:8 | python39-requests | 0 | 2.25.0-3.module_el8.9.0+3634+fb2a896c |
| AlmaLinux:8 | python39-rpm-macros | 0 | 3.9.25-2.module_el8.10.0+4083+53cad1fb |
| AlmaLinux:8 | python39-scipy | 0 | 1.5.4-5.module_el8.9.0+3634+fb2a896c |
| AlmaLinux:8 | python39-setuptools | 0 | 50.3.2-7.module_el8.10.0+4040+9207bbc0 |
| AlmaLinux:8 | python39-setuptools-wheel | 0 | 50.3.2-7.module_el8.10.0+4040+9207bbc0 |
| AlmaLinux:8 | python39-six | 0 | 1.15.0-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-test | 0 | 3.9.25-2.module_el8.10.0+4083+53cad1fb |
| AlmaLinux:8 | python39-tkinter | 0 | 3.9.25-2.module_el8.10.0+4083+53cad1fb |
| AlmaLinux:8 | python39-toml | 0 | 0.10.1-5.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-urllib3 | 0 | 1.25.10-5.module_el8.10.0+3765+2f9a457d |
| AlmaLinux:8 | python39-wcwidth | 0 | 0.2.5-3.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-wheel | 0 | 1:0.35.1-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:8 | python39-wheel-wheel | 0 | 1:0.35.1-4.module_el8.6.0+2780+a40f65e1 |
| AlmaLinux:9 | python-unversioned-command | 0 | 3.9.21-2.el9 |
| AlmaLinux:9 | python3 | 0 | 3.9.21-2.el9 |
| AlmaLinux:9 | python3-debug | 0 | 3.9.21-2.el9 |
| AlmaLinux:9 | python3-devel | 0 | 3.9.21-2.el9 |
| AlmaLinux:9 | python3-idle | 0 | 3.9.21-2.el9 |
| AlmaLinux:9 | python3-libs | 0 | 3.9.21-2.el9 |
| AlmaLinux:9 | python3-test | 0 | 3.9.21-2.el9 |
| AlmaLinux:9 | python3-tkinter | 0 | 3.9.21-2.el9 |
| AlmaLinux:9 | python3.11 | 0 | 3.11.11-2.el9 |
| AlmaLinux:9 | python3.11-debug | 0 | 3.11.11-2.el9 |
| AlmaLinux:9 | python3.11-devel | 0 | 3.11.11-2.el9 |
| AlmaLinux:9 | python3.11-idle | 0 | 3.11.11-2.el9 |
| AlmaLinux:9 | python3.11-libs | 0 | 3.11.11-2.el9 |
| AlmaLinux:9 | python3.11-test | 0 | 3.11.11-2.el9 |
| AlmaLinux:9 | python3.11-tkinter | 0 | 3.11.11-2.el9 |
| AlmaLinux:9 | python3.12 | 0 | 3.12.9-1.el9 |
| AlmaLinux:9 | python3.12-debug | 0 | 3.12.9-1.el9 |
| AlmaLinux:9 | python3.12-devel | 0 | 3.12.9-1.el9 |
| AlmaLinux:9 | python3.12-idle | 0 | 3.12.9-1.el9 |
| AlmaLinux:9 | python3.12-libs | 0 | 3.12.9-1.el9 |
| AlmaLinux:9 | python3.12-test | 0 | 3.12.9-1.el9 |
| AlmaLinux:9 | python3.12-tkinter | 0 | 3.12.9-1.el9 |
| Alpine:v3.18 | python3 | 0 | 3.11.12-r0 |
| Alpine:v3.19 | python3 | 0 | 3.11.12-r0 |
| Alpine:v3.20 | python3 | 0 | 3.12.9-r0 |
| Alpine:v3.21 | python3 | 0 | 3.12.9-r0 |
| Alpine:v3.22 | python3 | 0 | 3.12.9-r0 |
| Bitnami | libpython | 0 | 3.9.22 |
| Bitnami | python | 0 | 3.12.9 |
| Bitnami | python | 0 | 3.9.22 |
| Bitnami | python-min | 0 | 3.12.9 |
| Bitnami | python-min | 0 | 3.9.22 |
| Chainguard | python-3.10 | 0 | 3.10.19-r0 |
| Chainguard | python-3.10-base | 0 | 3.10.19-r0 |
| Chainguard | python-3.10-base-dev | 0 | 3.10.19-r0 |
| Chainguard | python-3.10-dev | 0 | 3.10.19-r1 |
| Chainguard | python-3.10-doc | 0 | 3.10.19-r0 |
| Chainguard | python-3.11 | 0 | 3.11.14-r0 |
| Chainguard | python-3.11-base | 0 | 3.11.14-r0 |
| Chainguard | python-3.11-base-dev | 0 | 3.11.14-r0 |
| Chainguard | python-3.11-dev | 0 | 3.11.14-r0 |
| Chainguard | python-3.11-doc | 0 | 3.11.14-r1 |
| Chainguard | python-3.12 | 0 | 3.12.9-r0 |
| Chainguard | python-3.12-base | 0 | 3.12.9-r0 |
| Chainguard | python-3.12-base-dev | 0 | 3.12.9-r0 |
| Chainguard | python-3.12-dev | 0 | 3.12.9-r0 |
| Chainguard | python-3.12-doc | 0 | 3.12.9-r0 |
| Chainguard | python-3.12-privileged-netbindservice | 0 | 3.12.9-r0 |
| Chainguard | python-3.12-tk | 0 | 3.12.9-r0 |
| Chainguard | python-3.13 | 0 | 3.13.2-r0 |
| Chainguard | python-3.13-base | 0 | 3.13.2-r0 |
| Chainguard | python-3.13-base-dev | 0 | 3.13.2-r0 |
| Chainguard | python-3.13-dev | 0 | 3.13.2-r0 |
| Chainguard | python-3.13-doc | 0 | 3.13.2-r0 |
| Chainguard | python-3.13-privileged-netbindservice | 0 | 3.13.2-r0 |
| Chainguard | python-3.13-tk | 0 | 3.13.2-r0 |
| Chainguard | python-3.9 | 0 | 3.9.25-r0 |
| Chainguard | python-3.9-base | 0 | 3.9.25-r0 |
| Chainguard | python-3.9-base-dev | 0 | 3.9.25-r0 |
| Chainguard | python-3.9-dev | 0 | 3.9.25-r0 |
| Chainguard | python-3.9-doc | 0 | 3.9.25-r0 |
| Debian:11 | pypy3 | 0 | No fix |
| Debian:11 | python3.9 | 0 | No fix |
| Debian:11 | python3.9 | 0 | 3.9.2-1+deb11u3 |
| Debian:12 | pypy3 | 0 | No fix |
| Debian:12 | python3.11 | 0 | No fix |
| Debian:13 | pypy3 | 0 | No fix |
| Debian:13 | python3.12 | 0 | No fix |
| Debian:13 | python3.13 | 0 | No fix |
| Debian:14 | pypy3 | 0 | 7.3.18+dfsg-2 |
| Debian:14 | python3.13 | 0 | 3.13.2-1 |
| Mageia:9 | python3 | 0 | 3.10.18-1.4.mga9 |
| SUSE:Linux Enterprise Micro 5.1 | python3 | 0 | 3.6.15-150000.3.170.1 |
| SUSE:Linux Enterprise Micro 5.1 | python3-core | 0 | 3.6.15-150000.3.170.1 |
| SUSE:Linux Enterprise Micro 5.2 | python3 | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Micro 5.2 | python3-core | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Micro 5.3 | python3 | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Micro 5.3 | python3-core | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Micro 5.4 | python3 | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Micro 5.4 | python3-core | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Micro 5.5 | python3 | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Micro 5.5 | python3-core | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | python3 | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | python3-core | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | python311-core | 0 | 3.11.11-150600.3.16.2 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | python3-core | 0 | 3.6.15-150300.10.81.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | python | 0 | 2.7.18-150000.71.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | python | 0 | 2.7.18-150000.74.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | python-base | 0 | 2.7.18-150000.71.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | python-base | 0 | 2.7.18-150000.74.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | python311 | 0 | 3.11.11-150400.9.44.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | python311-core | 0 | 3.11.11-150400.9.44.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | python311 | 0 | 3.11.11-150600.3.16.2 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | python311-core | 0 | 3.11.11-150600.3.16.2 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | python312 | 0 | 3.12.9-150600.3.18.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | python312-core | 0 | 3.12.9-150600.3.18.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP7 | python313 | 0 | 3.13.5-150700.4.11.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP7 | python313-core | 0 | 3.13.5-150700.4.11.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python | 0 | 2.7.18-33.41.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python | 0 | 2.7.18-33.44.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python-base | 0 | 2.7.18-33.41.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python-base | 0 | 2.7.18-33.44.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python-doc | 0 | 2.7.18-33.41.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python-doc | 0 | 2.7.18-33.44.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python3 | 0 | 3.4.10-25.148.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python3-base | 0 | 3.4.10-25.148.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python36 | 0 | 3.6.15-76.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | python36-core | 0 | 3.6.15-76.1 |
| Wolfi | python-3.10 | 0 | 3.10.19-r0 |
| Wolfi | python-3.10-base | 0 | 3.10.19-r0 |
| Wolfi | python-3.10-base-dev | 0 | 3.10.19-r0 |
| Wolfi | python-3.10-dev | 0 | 3.10.19-r1 |
| Wolfi | python-3.10-doc | 0 | 3.10.19-r0 |
| Wolfi | python-3.11 | 0 | 3.11.14-r0 |
| Wolfi | python-3.11-base | 0 | 3.11.14-r0 |
| Wolfi | python-3.11-base-dev | 0 | 3.11.14-r0 |
| Wolfi | python-3.11-dev | 0 | 3.11.14-r0 |
| Wolfi | python-3.11-doc | 0 | 3.11.14-r1 |
| Wolfi | python-3.12 | 0 | 3.12.9-r0 |
| Wolfi | python-3.12-base | 0 | 3.12.9-r0 |
| Wolfi | python-3.12-base-dev | 0 | 3.12.9-r0 |
| Wolfi | python-3.12-dev | 0 | 3.12.9-r0 |
| Wolfi | python-3.12-doc | 0 | 3.12.9-r0 |
| Wolfi | python-3.12-privileged-netbindservice | 0 | 3.12.9-r0 |
| Wolfi | python-3.12-tk | 0 | 3.12.9-r0 |
| Wolfi | python-3.13 | 0 | 3.13.2-r0 |
| Wolfi | python-3.13-base | 0 | 3.13.2-r0 |
| Wolfi | python-3.13-base-dev | 0 | 3.13.2-r0 |
| Wolfi | python-3.13-dev | 0 | 3.13.2-r0 |
| Wolfi | python-3.13-doc | 0 | 3.13.2-r0 |
| Wolfi | python-3.13-privileged-netbindservice | 0 | 3.13.2-r0 |
| Wolfi | python-3.13-tk | 0 | 3.13.2-r0 |
| openSUSE:Leap 15.6 | python | 0 | 2.7.18-150000.71.1 |
| openSUSE:Leap 15.6 | python | 0 | 2.7.18-150000.74.1 |
| openSUSE:Leap 15.6 | python-base | 0 | 2.7.18-150000.71.1 |
| openSUSE:Leap 15.6 | python-base | 0 | 2.7.18-150000.74.1 |
| openSUSE:Leap 15.6 | python-doc | 0 | 2.7.18-150000.71.1 |
| openSUSE:Leap 15.6 | python-doc | 0 | 2.7.18-150000.74.1 |
| openSUSE:Leap 15.6 | python3 | 0 | 3.6.15-150300.10.81.1 |
| openSUSE:Leap 15.6 | python3-core | 0 | 3.6.15-150300.10.81.1 |
| openSUSE:Leap 15.6 | python3-documentation | 0 | 3.6.15-150300.10.81.1 |
| openSUSE:Leap 15.6 | python310 | 0 | 3.10.16-150400.4.69.1 |
Related vulnerabilities
- CVE-2025-6075 If the value passed to os.path.expandvars() is user-controlled a performance degradation… Also affects python39
- CVE-2025-8291 The 'zipfile' module would not check the validity of the ZIP64 End of Central Directory… Also affects python39
- CVE-2025-8194 There is a defect in the CPython “tarfile” module affecting the “TarFile” extraction and… Also affects python39
- CVE-2025-6069 The html.parser.HTMLParser class had worse-case quadratic complexity when processing… Also affects python39
- CVE-2025-4517 Allows arbitrary filesystem writes outside the extraction directory during extraction… Also affects python39
- CVE-2025-4138 Allows the extraction filter to be ignored, allowing symlink targets to point outside the… Also affects python39
- CVE-2025-4330 Allows the extraction filter to be ignored, allowing symlink targets to point outside the… Also affects python39
- CVE-2025-4435 When using a TarFile.errorlevel = 0 and extracting with a filter the documented behavior… Also affects python39