banner logoJoin us at RSAC™ 2026 Conference, March 23–March 26 | North Expo, Booth N-5863Join us at RSAC™ 2026, March 23–March 26Learn More
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI Security Portfolio
      Leading the Way in AI-Powered Security Solutions
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      Digital Forensics, IRR & Breach Readiness
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-0938

CVE-2025-0938: Python URL Parser Differential Parsing Flaw

CVE-2025-0938 is an information disclosure vulnerability in Python's urllib.parse that allows invalid square brackets in domain names, causing differential parsing. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-0938 Overview

CVE-2025-0938 is an Improper Input Validation vulnerability in the Python standard library's URL parsing functions. The urllib.parse.urlsplit and urllib.parse.urlparse functions incorrectly accept domain names containing square brackets, which violates RFC 3986 specifications. According to RFC 3986, square brackets are reserved delimiters meant exclusively for specifying IPv6 and IPvFuture hosts in URLs. This non-compliant behavior can lead to differential parsing between Python's URL parser and other specification-compliant parsers, potentially enabling security bypasses.

Critical Impact

Applications relying on Python's URL parsing for security decisions may be vulnerable to URL-based attacks due to parsing inconsistencies with other security components.

Affected Products

  • Python Standard Library (urllib.parse module)
  • Applications using urllib.parse.urlsplit() function
  • Applications using urllib.parse.urlparse() function

Discovery Timeline

  • 2025-01-31 - CVE-2025-0938 published to NVD
  • 2025-11-03 - Last updated in NVD database

Technical Details for CVE-2025-0938

Vulnerability Analysis

The vulnerability exists in Python's urllib.parse module, specifically in the urlsplit and urlparse functions. These functions are fundamental to URL handling in Python applications and are widely used for parsing and validating URLs before processing them further.

The core issue is that Python's URL parser accepts domain names with square brackets embedded in them, even when those brackets are not being used to delimit IPv6 or IPvFuture addresses. This behavior contradicts RFC 3986, which strictly reserves square brackets ([ and ]) as delimiters for IP-literal hosts.

When different URL parsers interpret the same URL differently, it creates a parsing differential. An attacker can craft a malicious URL that Python interprets one way while another security component (such as a web application firewall, proxy, or backend server) interprets it differently. This inconsistency can be exploited to bypass security controls, access unauthorized resources, or conduct SSRF attacks.

Root Cause

The root cause is classified as CWE-20 (Improper Input Validation). The urllib.parse module fails to properly validate that square brackets in the host portion of a URL are only used in the context of IPv6 or IPvFuture address literals. Instead of rejecting malformed domain names containing square brackets, the parser accepts them, creating non-RFC-compliant behavior.

Attack Vector

This vulnerability is exploitable over the network. An attacker can supply a specially crafted URL containing square brackets in the domain name to a Python application. If the application uses urllib.parse.urlsplit() or urllib.parse.urlparse() to extract the hostname and then passes this information to other components that parse URLs according to RFC 3986, the differential parsing can lead to:

  • Security bypass scenarios where access controls are circumvented
  • Server-Side Request Forgery (SSRF) attacks where the target host differs from what was validated
  • Open redirect vulnerabilities when URL validation is bypassed
  • Request routing manipulation in microservice architectures

The attack requires network access and specific conditions to be exploitable, as the attacker must find a scenario where differential parsing impacts security decisions.

Detection Methods for CVE-2025-0938

Indicators of Compromise

  • URLs containing square brackets in the domain name portion (outside of IPv6 literal context)
  • Unusual URL patterns in application logs with characters like [ or ] in hostnames
  • Failed requests or unexpected routing behavior in systems downstream from Python URL parsing

Detection Strategies

  • Audit application code for uses of urllib.parse.urlsplit() and urllib.parse.urlparse() where the parsed hostname is used for security decisions
  • Monitor web application logs for URLs with malformed domain names containing square brackets
  • Implement input validation at the application layer to reject URLs with non-RFC-compliant hostnames before parsing

Monitoring Recommendations

  • Review web server access logs for requests containing square brackets in unexpected URL positions
  • Set up alerts for URL parsing errors or discrepancies between different parsing layers in your infrastructure
  • Monitor for SSRF-related indicators if your application makes outbound requests based on user-supplied URLs

How to Mitigate CVE-2025-0938

Immediate Actions Required

  • Identify all Python applications in your environment that use urllib.parse.urlsplit() or urllib.parse.urlparse()
  • Prioritize patching applications that use parsed URLs for security decisions, SSRF prevention, or access control
  • Implement additional URL validation to reject domains containing square brackets outside of IPv6 literal context
  • Review and update Python installations to patched versions when available

Patch Information

The Python development team has released patches addressing this vulnerability across multiple Python branches. The fixes ensure that square brackets in domain names are properly validated according to RFC 3986.

Relevant patch commits are available:

  • CPython Commit 526617ed
  • CPython Commit 90e526ae
  • CPython Commit a7084f60

For complete details, refer to the Python Security Announcement, Debian LTS Security Advisory, and NetApp Security Advisory.

Workarounds

  • Implement custom URL validation that rejects hostnames containing square brackets unless they match the IPv6 literal pattern [IPv6address]
  • Use additional URL parsing libraries that are RFC 3986 compliant as a secondary validation step
  • Apply web application firewall rules to block requests with malformed URLs containing unexpected square brackets in domain names
  • Consider wrapping urllib.parse functions with custom validation logic until patches can be applied
python
# Workaround: Custom URL validation wrapper
import urllib.parse
import re

def validate_and_parse_url(url):
    """Parse URL with additional validation for RFC 3986 compliance."""
    parsed = urllib.parse.urlsplit(url)
    
    # Check for square brackets outside IPv6 literal context
    if parsed.hostname and '[' in parsed.hostname:
        # Only allow if it matches IPv6 literal pattern
        if not re.match(r'^\[[\da-fA-F:]+\]$', parsed.hostname):
            raise ValueError("Invalid hostname: square brackets not permitted outside IPv6 literals")
    
    return parsed

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechPython

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability1.24%

  • Known ExploitedNo
  • CVSS 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-20
  • Technical References
  • GitHub CPython Commit Update

  • GitHub CPython Commit Update

  • GitHub CPython Commit Update

  • GitHub CPython Commit Update

  • GitHub CPython Commit Update

  • GitHub CPython Commit Update

  • GitHub CPython Issue Discussion

  • GitHub CPython Pull Request

  • Python Security Announcement Thread

  • Debian LTS Security Announcement

  • NetApp Security Advisory
  • Related CVEs
  • CVE-2026-2297: CPython Information Disclosure Vulnerability

  • CVE-2025-12781: Python base64 Module Data Integrity Flaw

  • CVE-2021-28861: Python Open Redirection Vulnerability

  • CVE-2024-4032: Python ipaddress Module Info Disclosure
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • English
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use