Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-24303

CVE-2022-24303: Python Pillow Path Traversal Vulnerability

CVE-2022-24303 is a path traversal vulnerability in Python Pillow that allows attackers to delete files due to mishandled spaces in temporary pathnames. This article covers technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-24303 Overview

CVE-2022-24303 is a critical vulnerability in Python Pillow, a widely-used imaging library, that allows attackers to delete arbitrary files on the system. The vulnerability exists in versions prior to 9.0.1 and stems from improper handling of spaces in temporary pathnames. This flaw can be exploited remotely without any authentication, potentially leading to significant data loss or system disruption.

Critical Impact

Remote attackers can leverage this vulnerability to delete arbitrary files on systems running vulnerable Pillow versions, potentially causing service disruption, data loss, or facilitating further attacks by removing security controls.

Affected Products

  • Python Pillow versions before 9.0.1
  • Fedora 34 (with vulnerable Pillow packages)
  • Fedora 35 (with vulnerable Pillow packages)

Discovery Timeline

  • 2022-03-28 - CVE-2022-24303 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-24303

Vulnerability Analysis

The vulnerability in Python Pillow arises from the library's mishandling of spaces within temporary file pathnames. When Pillow processes images and creates temporary files, it fails to properly sanitize or handle pathnames containing space characters. This oversight can be exploited by attackers to manipulate file operations, specifically enabling the deletion of files outside the intended temporary directory.

The impact is severe as it affects both data integrity and system availability. An attacker can potentially delete critical system files, application data, or security-related files without requiring any authentication. The network-accessible nature of this vulnerability makes it particularly dangerous in web applications or services that utilize Pillow for image processing.

Root Cause

The root cause of this vulnerability lies in the improper validation and handling of temporary file paths within Pillow's image processing routines. When pathnames containing spaces are processed, the library's file handling logic fails to properly escape or quote these paths. This leads to path interpretation issues where portions of the pathname after a space may be treated as separate operations or targets, allowing attackers to inject file deletion commands targeting arbitrary files on the filesystem.

Attack Vector

This vulnerability can be exploited remotely over the network without requiring any user interaction or authentication. An attacker can craft malicious input that, when processed by a vulnerable Pillow installation, exploits the space handling issue in temporary pathnames to delete arbitrary files.

The attack scenario typically involves:

  1. Identifying a target application that uses Pillow for image processing
  2. Crafting input that creates temporary files with specially constructed pathnames
  3. Exploiting the space handling flaw to manipulate file deletion operations
  4. Targeting critical files for deletion to cause denial of service or facilitate further attacks

The vulnerability does not directly expose confidential data but can severely impact system integrity and availability by allowing unauthorized file deletion.

Detection Methods for CVE-2022-24303

Indicators of Compromise

  • Unexpected file deletions in system or application directories
  • Error logs indicating missing files that were previously present
  • Application crashes or failures due to deleted configuration or data files
  • Unusual activity in temporary file directories associated with Pillow operations

Detection Strategies

  • Monitor file system audit logs for unexpected deletion operations, particularly those involving temporary directories used by Python applications
  • Implement integrity monitoring on critical system and application files to detect unauthorized modifications or deletions
  • Review application logs for Pillow-related errors that may indicate exploitation attempts
  • Use application security scanning tools to identify vulnerable Pillow versions in your environment

Monitoring Recommendations

  • Enable file system auditing to track delete operations on critical directories
  • Implement real-time alerting for suspicious file deletion patterns
  • Monitor Python application dependencies using software composition analysis (SCA) tools
  • Review container images and deployment pipelines for vulnerable Pillow versions

How to Mitigate CVE-2022-24303

Immediate Actions Required

  • Upgrade Python Pillow to version 9.0.1 or later immediately
  • Audit all applications and environments for vulnerable Pillow installations using pip list or dependency scanning tools
  • Review file system permissions to minimize the impact of potential exploitation
  • Implement application-level input validation for image processing operations

Patch Information

The vulnerability is addressed in Pillow version 9.0.1 and all subsequent releases. The fix properly handles spaces in temporary pathnames, preventing the exploitation of file deletion operations. Organizations should upgrade to the latest stable version of Pillow to ensure protection against this and other resolved vulnerabilities.

For detailed patch information, refer to the Pillow 9.0.1 Security Release Notes and the associated GitHub Pull Request.

Linux distribution users should apply available security updates:

  • Fedora users can refer to the package announcements for updated packages
  • Gentoo users should review GLSA 202211-10

Workarounds

  • Restrict file system permissions for the user account running Pillow-dependent applications to limit the scope of potential file deletions
  • Implement application-level sandboxing or containerization to isolate Pillow operations from critical system files
  • Use temporary directory configurations that minimize exposure of sensitive files
  • Apply network-level controls to restrict access to vulnerable image processing endpoints
bash
# Upgrade Pillow to patched version
pip install --upgrade Pillow>=9.0.1

# Verify installed version
pip show Pillow | grep Version

# For requirements.txt, ensure minimum version
echo "Pillow>=9.0.1" >> requirements.txt

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechPython Pillow

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability1.35%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • NVD-CWE-noinfo
  • Technical References
  • GitHub Pull Request

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Gentoo GLSA 202211-10
  • Vendor Resources
  • Pillow Release Notes
  • Related CVEs
  • CVE-2022-22815: Python Pillow Path Traversal Vulnerability

  • CVE-2024-28219: Python Pillow Buffer Overflow Vulnerability

  • CVE-2025-48379: Python Pillow Buffer Overflow Vulnerability

  • CVE-2023-50447: Python Pillow RCE 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