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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2022-0391

CVE-2022-0391: Python urllib.parse SSRF Vulnerability

CVE-2022-0391 is an SSRF flaw in Python's urllib.parse module that allows attackers to inject crafted URLs with unsanitized characters. This article covers the technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-0391 Overview

A flaw was found in Python, specifically within the urllib.parse module. This module helps break Uniform Resource Locator (URL) strings into components. The issue involves how the urlparse method does not sanitize input and allows characters like \r and \n in the URL path. This flaw allows an attacker to input a crafted URL, leading to injection attacks. This flaw affects Python versions prior to 3.10.0b1, 3.9.5, 3.8.11, 3.7.11, and 3.6.14.

Critical Impact

Attackers can inject CRLF (Carriage Return Line Feed) characters into URLs processed by Python's urllib.parse module, potentially leading to HTTP header injection, response splitting, and other injection-based attacks against applications relying on this library for URL parsing.

Affected Products

  • Python (versions prior to 3.10.0b1, 3.9.5, 3.8.11, 3.7.11, and 3.6.14)
  • NetApp Active IQ Unified Manager
  • NetApp HCI
  • NetApp Management Services for Element Software
  • NetApp ONTAP Select Deploy Administration Utility
  • NetApp SolidFire, Enterprise SDS & HCI Storage Node
  • NetApp HCI Compute Node
  • Fedora 34 and 35
  • Oracle HTTP Server 12.2.1.3.0 and 12.2.1.4.0
  • Oracle ZFS Storage Appliance Kit 8.8

Discovery Timeline

  • February 9, 2022 - CVE-2022-0391 published to NVD
  • December 17, 2025 - Last updated in NVD database

Technical Details for CVE-2022-0391

Vulnerability Analysis

The vulnerability exists in Python's urllib.parse module, which is a fundamental component used for parsing URLs into their constituent parts (scheme, netloc, path, parameters, query, and fragment). The core issue is that the urlparse() function fails to properly sanitize special control characters, specifically carriage return (\r) and line feed (\n) characters, when processing URL path components.

When an application uses urllib.parse.urlparse() to process user-supplied URLs, an attacker can craft malicious URLs containing CRLF sequences. These sequences can then be used to manipulate HTTP headers or inject additional content when the parsed URL is subsequently used in HTTP requests or responses. This type of vulnerability is classified under CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component - Injection).

Root Cause

The root cause of this vulnerability is insufficient input validation within the urllib.parse module. The urlparse() function was designed to split URLs into components but did not include logic to strip or reject control characters that have special meaning in HTTP protocols. The lack of sanitization for \r (CR - 0x0D) and \n (LF - 0x0A) characters allows these bytes to pass through unchanged, which can be exploited when the parsed URL components are used to construct HTTP headers or other protocol-sensitive output.

Attack Vector

The attack is network-accessible and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Providing a malicious URL containing CRLF characters to an application that uses Python's urllib.parse module
  2. The application parses the URL using urlparse() without additional sanitization
  3. The parsed components, still containing the CRLF sequences, are used in constructing HTTP requests or responses
  4. The injected CRLF characters allow the attacker to insert arbitrary HTTP headers or split the HTTP response

The vulnerability manifests when applications trust the output of urllib.parse.urlparse() to be safe for use in HTTP contexts. Attackers can inject headers like Set-Cookie for session hijacking, or perform HTTP response splitting to inject malicious content. For technical details, see the Python Issue #43882 tracking this vulnerability.

Detection Methods for CVE-2022-0391

Indicators of Compromise

  • HTTP requests or responses containing unexpected CRLF sequences in URL-derived fields
  • Anomalous HTTP headers appearing in server logs that were not legitimately set
  • Evidence of HTTP response splitting in web application logs
  • Unusual Set-Cookie headers or redirects originating from URL parameter manipulation

Detection Strategies

  • Monitor web application logs for URLs containing encoded or literal CRLF characters (%0d, %0a, \r, \n)
  • Implement Web Application Firewall (WAF) rules to detect and block CRLF injection attempts in URL parameters
  • Audit Python applications for use of urllib.parse.urlparse() on untrusted input without subsequent sanitization
  • Deploy runtime application security monitoring to detect injection patterns in HTTP contexts

Monitoring Recommendations

  • Enable detailed logging for web servers and reverse proxies to capture full request URLs and headers
  • Configure alerting for HTTP response splitting patterns in application security monitoring tools
  • Regularly scan Python environments to identify vulnerable versions using software composition analysis (SCA) tools
  • Monitor for unusual session manipulation or cookie injection activity that could indicate exploitation

How to Mitigate CVE-2022-0391

Immediate Actions Required

  • Upgrade Python to patched versions: 3.10.0b1 or later, 3.9.5 or later, 3.8.11 or later, 3.7.11 or later, or 3.6.14 or later
  • Audit applications using urllib.parse to identify exposure to user-controlled URL input
  • Implement application-level input validation to strip or reject CRLF characters before URL parsing
  • Review and update third-party dependencies that bundle or embed Python

Patch Information

Security patches are available from the Python Software Foundation and various downstream distributors. Refer to the Python Issue #43882 for details on the fix. Additional security advisories have been published by:

  • Oracle CPU April 2022 Security Alert
  • NetApp Security Advisory ntap-20220225-0009
  • Gentoo GLSA 202305-02

Workarounds

  • Sanitize all user-supplied URLs by removing or encoding CRLF characters (\r, \n) before passing to urllib.parse
  • Implement strict URL validation using allowlists for expected URL patterns
  • Use Web Application Firewalls configured to block requests containing CRLF injection patterns
  • Consider using alternative URL parsing libraries that implement stricter input validation
bash
# Check Python version and upgrade if vulnerable
python3 --version

# For systems using pip, upgrade Python via package manager
# Debian/Ubuntu
sudo apt update && sudo apt install python3

# RHEL/CentOS/Fedora
sudo dnf update python3

# Verify the version is patched (3.9.5+, 3.8.11+, 3.7.11+, or 3.6.14+)
python3 -c "import sys; print(sys.version)"

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

  • Vulnerability Details
  • TypeSSRF

  • Vendor/TechPython

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability1.32%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-74
  • Technical References
  • Debian LTS Announce September 2023

  • Fedora Package Announce Message

  • Fedora Package Announce Message

  • Gentoo GLSA 202305-02

  • NetApp Security Advisory ntap-20220225-0009

  • Debian LTS Announce November 2024

  • Debian LTS Announce March 2025
  • Vendor Resources
  • Python Issue #43882

  • Oracle CPU April 2022 Security Alert
  • Related CVEs
  • CVE-2026-5713: Python Privilege Escalation Vulnerability

  • CVE-2026-6100: Python Decompressor Use-After-Free Flaw

  • CVE-2025-13462: Python tarfile Module Parsing Vulnerability

  • CVE-2026-2297: CPython Information Disclosure 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