Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-0938: CWE-20 Improper Input Validation in Python Software Foundation CPython

0
Medium
VulnerabilityCVE-2025-0938cvecve-2025-0938cwe-20
Published: Fri Jan 31 2025 (01/31/2025, 17:51:35 UTC)
Source: CVE
Vendor/Project: Python Software Foundation
Product: CPython

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/22/2026, 05:44:37 UTC

Technical Analysis

The vulnerability arises from improper input validation in CPython's URL parsing functions `urllib.parse.urlsplit` and `urlparse`. They accept domain names with square brackets, violating RFC 3986, which restricts square brackets to IPv6 and IPvFuture host delimiters. This discrepancy can lead to inconsistent URL parsing results when Python applications interact with other systems or libraries that strictly follow the RFC. The affected CPython versions include 0, 3.11.0, 3.12.0, 3.13.0, and 3.14.0a1. The CVSS 4.0 score is 6.3, indicating medium severity.

Potential Impact

The improper input validation may cause differential parsing of URLs between Python and other parsers compliant with RFC 3986. This could potentially lead to logic errors or security issues in applications relying on Python's URL parsing, such as incorrect host resolution or bypassing security controls that depend on consistent URL interpretation. No known exploits are reported in the wild at this time.

Mitigation Recommendations

Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until a fix is available, developers should validate and sanitize URL inputs externally before passing them to Python's URL parsing functions to ensure compliance with RFC 3986.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.1
Assigner Short Name
PSF
Date Reserved
2025-01-31T17:45:10.107Z
Cisa Enriched
true

Threat ID: 682d983ec4522896dcbf00a0

Added to database: 5/21/2025, 9:09:18 AM

Last enriched: 4/22/2026, 5:44:37 AM

Last updated: 5/9/2026, 10:27:32 PM

Views: 110

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses