The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • 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
      DFIR, Breach Readiness, & Compromise Assessments
    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
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • 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-15282

CVE-2025-15282: urllib.request XSS Vulnerability

CVE-2025-15282 is an XSS flaw in urllib.request.DataHandler that allows header injection via newlines in data URL mediatypes. This article covers the technical details, affected versions, impact, and mitigation.

Published: January 23, 2026

CVE-2025-15282 Overview

CVE-2025-15282 is an HTTP Response Splitting vulnerability affecting Python's urllib.request.DataHandler. User-controlled data URLs parsed by this handler allow attackers to inject HTTP headers through newlines embedded in the data URL mediatype. This vulnerability enables HTTP Response Splitting attacks, which can lead to cache poisoning, cross-site scripting (XSS), or other injection-based exploits against downstream systems processing the malformed responses.

Critical Impact

Attackers can inject arbitrary HTTP headers by embedding newline characters in data URL mediatypes, potentially enabling cache poisoning, session hijacking, or cross-site scripting attacks.

Affected Products

  • Python CPython (versions with vulnerable urllib.request.DataHandler)

Discovery Timeline

  • 2026-01-20 - CVE CVE-2025-15282 published to NVD
  • 2026-01-20 - Last updated in NVD database

Technical Details for CVE-2025-15282

Vulnerability Analysis

This vulnerability exists in Python's urllib.request.DataHandler module, which processes data URLs (URLs with the data: scheme). The vulnerability is classified under CWE-93 (Improper Neutralization of CRLF Sequences), commonly known as CRLF Injection or HTTP Response Splitting.

The core issue stems from insufficient input validation when parsing the mediatype portion of data URLs. When a data URL is processed, the handler splits the URL by : and , delimiters to extract the mediatype and data components. However, prior to the patch, no validation existed to prevent control characters (including newlines \n and carriage returns \r) from being present in the mediatype string.

An attacker who can control the data URL being processed can craft a malicious URL where the mediatype contains CRLF sequences (\r\n). These sequences are interpreted as header delimiters in HTTP, allowing the injection of arbitrary headers into the response.

Root Cause

The root cause is missing input sanitization in urllib.request.DataHandler. The data_open method failed to validate or reject control characters (bytes 0x00-0x1F and 0x7F) within the mediatype portion of data URLs before processing them. This allowed CRLF sequences to pass through and be interpreted as HTTP header boundaries by downstream components.

Attack Vector

The attack vector is network-based and requires an attacker to control or influence the data URL being parsed by a vulnerable Python application. Attack scenarios include:

  1. Web Applications: Applications that accept user-supplied URLs and fetch them using urllib.request may be exploited if they process attacker-controlled data URLs
  2. API Endpoints: Services that parse incoming data URLs from request parameters
  3. File Processing: Applications processing documents or configurations containing data URLs

A malicious data URL might look like:

data:text/html%0d%0aX-Injected-Header:%20malicious-value,<script>alert(1)</script>

The %0d%0a sequences decode to CRLF, injecting the X-Injected-Header into the response.

python
# Security patch in Lib/urllib/request.py - gh-143925: Reject control characters in data: URL mediatypes
         scheme, data = url.split(":",1)
         mediatype, data = data.split(",",1)
 
+        # Disallow control characters within mediatype.
+        if re.search(r"[\\x00-\\x1F\\x7F]", mediatype):
+            raise ValueError(
+                "Control characters not allowed in data: mediatype")
+
         # even base64 encoded data URLs might be quoted so unquote in any case:
         data = unquote_to_bytes(data)
         if mediatype.endswith(";base64"):

Source: GitHub Commit Security Fix

Detection Methods for CVE-2025-15282

Indicators of Compromise

  • HTTP requests or responses containing unexpected headers injected via data URL processing
  • Log entries showing data URLs with URL-encoded control characters (%0d, %0a, %00-%1F, %7F)
  • Anomalous cache behavior or cache poisoning incidents linked to data URL handling
  • Web application firewall alerts for CRLF injection patterns in URL parameters

Detection Strategies

  • Implement regex-based detection rules to identify control characters in data URL mediatypes before processing
  • Monitor application logs for ValueError exceptions with the message "Control characters not allowed in data: mediatype" (post-patch)
  • Deploy web application firewall rules to detect and block CRLF injection attempts in URL parameters
  • Use static analysis tools to identify code paths where user input flows into urllib.request data URL processing

Monitoring Recommendations

  • Enable verbose logging for urllib.request operations in production environments
  • Monitor network traffic for anomalous HTTP headers that may indicate successful injection
  • Implement content security policies to mitigate potential XSS resulting from successful exploitation
  • Review application dependencies for Python versions affected by this vulnerability

How to Mitigate CVE-2025-15282

Immediate Actions Required

  • Update Python to a patched version that includes commit f25509e78e8be6ea73c811ac2b8c928c28841b9f
  • Audit application code for usage of urllib.request with user-controlled data URLs
  • Implement input validation to reject data URLs containing control characters before passing to urllib.request
  • Review and harden any web application components that process user-supplied URLs

Patch Information

The Python security team has released a patch that adds validation to reject control characters within data URL mediatypes. The fix uses a regular expression to detect bytes in the range 0x00-0x1F and 0x7F, raising a ValueError if any are found.

For detailed information, refer to:

  • GitHub Commit Security Fix
  • GitHub Issue Discussion
  • GitHub Pull Request Review
  • Python Security Announcement Thread

Workarounds

  • Implement application-level input validation to sanitize or reject data URLs containing control characters before processing
  • Use allowlists for acceptable mediatype values when processing data URLs
  • Consider disabling data URL processing entirely if not required by your application
  • Deploy web application firewall rules to block requests containing CRLF sequences in URL parameters
python
# Workaround: Validate data URLs before processing with urllib.request
import re

def validate_data_url(url):
    """Reject data URLs with control characters in mediatype."""
    if url.startswith('data:'):
        # Extract mediatype portion
        parts = url[5:].split(',', 1)
        if parts:
            mediatype = parts[0]
            # Check for control characters
            if re.search(r'[\\x00-\\x1F\\x7F]', mediatype):
                raise ValueError("Control characters not allowed in data: mediatype")
    return url

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechN/A

  • SeverityMEDIUM

  • CVSS Score6.0

  • EPSS Probability0.05%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/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
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-93
  • Technical References
  • GitHub Commit Security Fix

  • GitHub Issue Discussion

  • GitHub Pull Request Review

  • Python Security Announcement Thread
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal Vulnerability
Default Legacy - Prefooter | 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
  • 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

English