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-2020-35653

CVE-2020-35653: Python Pillow Buffer Overflow Vulnerability

CVE-2020-35653 is a buffer overflow flaw in Python Pillow affecting PCX file decoding. Attackers can exploit crafted files to trigger buffer over-reads. This article covers technical details, affected versions, and mitigations.

Published: March 4, 2026

CVE-2020-35653 Overview

CVE-2020-35653 is a buffer over-read vulnerability affecting Python Pillow, a widely-used imaging library. The vulnerability exists in the PcxDecode component where a crafted PCX file can trigger an out-of-bounds read condition because the user-supplied stride value is trusted for buffer calculations without proper validation.

This vulnerability allows attackers to potentially leak sensitive information from memory or cause application crashes through specially crafted PCX image files. Organizations using Python Pillow for image processing should upgrade to version 8.1.0 or later immediately.

Critical Impact

Attackers can exploit this vulnerability through malicious PCX files to read beyond buffer boundaries, potentially exposing sensitive information or causing denial of service conditions in applications that process user-supplied images.

Affected Products

  • Python Pillow (versions before 8.1.0)
  • Fedora 32 and Fedora 33
  • Debian Linux 9.0

Discovery Timeline

  • 2021-01-12 - CVE-2020-35653 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-35653

Vulnerability Analysis

This vulnerability is classified as CWE-125 (Out-of-Bounds Read), a memory corruption vulnerability that occurs when software reads data past the boundary of the intended buffer. In the context of Pillow's PcxDecode function, the vulnerability stems from improper handling of stride values embedded within PCX image files.

The PCX file format includes header information that specifies image dimensions and the stride (bytes per scanline). When processing a maliciously crafted PCX file, the PcxDecode function uses this attacker-controlled stride value directly for buffer size calculations without sufficient bounds checking. This trust in user-supplied data allows an attacker to specify a stride value that causes the decoder to read beyond the allocated buffer's boundaries.

Successful exploitation requires user interaction where a victim must open or process a malicious PCX file. The vulnerability can be triggered through any application or service that uses Pillow to process user-uploaded images.

Root Cause

The root cause of this vulnerability is insufficient validation of the stride value parsed from PCX file headers. The PcxDecode implementation trusts the stride value provided in the image file for internal buffer calculations without verifying that the value falls within acceptable bounds relative to the actual allocated buffer size. This allows an attacker to craft a PCX file with a malicious stride value that exceeds the buffer boundaries.

Attack Vector

The attack vector for CVE-2020-35653 is network-based, requiring user interaction. An attacker can exploit this vulnerability through the following scenarios:

  1. Web Application Attack: Upload a malicious PCX file to a web application that processes images using Pillow
  2. Email Attachment: Send a crafted PCX file as an email attachment that is automatically processed by an image-handling service
  3. Content Management Systems: Upload malicious images to CMS platforms that use Pillow for image thumbnailing or conversion

When the victim application processes the malicious PCX file, the buffer over-read occurs during image decoding, potentially leaking memory contents or causing the application to crash.

Detection Methods for CVE-2020-35653

Indicators of Compromise

  • Unexpected application crashes or segmentation faults during PCX image processing
  • Unusual memory access patterns or errors logged by the Pillow library
  • Error messages referencing PcxDecode or PCX file parsing failures
  • Anomalous network traffic patterns involving PCX file uploads to image processing endpoints

Detection Strategies

  • Monitor application logs for Pillow-related exceptions or crashes during image processing operations
  • Implement file type validation to inspect PCX file headers for anomalous stride values before processing
  • Deploy memory safety tools in development and staging environments to detect out-of-bounds read operations
  • Use SentinelOne's behavioral AI to detect exploitation attempts targeting image processing libraries

Monitoring Recommendations

  • Enable detailed logging for all image processing operations in applications using Pillow
  • Configure alerts for repeated image processing failures that may indicate exploitation attempts
  • Monitor Python application memory usage for unusual patterns during image processing workloads
  • Track Pillow library version across all deployments to ensure timely patching

How to Mitigate CVE-2020-35653

Immediate Actions Required

  • Upgrade Python Pillow to version 8.1.0 or later immediately across all affected systems
  • Audit all applications and services that use Pillow for image processing functionality
  • Review container images and dependencies for vulnerable Pillow versions
  • Implement input validation to reject or quarantine PCX files from untrusted sources until patches are applied

Patch Information

The vulnerability has been addressed in Pillow version 8.1.0 and later releases. Organizations should update their Pillow installations using standard package managers:

For additional technical details on the fix and other security improvements, refer to the Pillow Release Notes. Linux distribution-specific patches are available through the Debian LTS Announcement and Fedora security advisories.

Workarounds

  • Disable PCX file format support in applications if not required by removing or blocking PCX file processing capabilities
  • Implement strict file type whitelisting to prevent processing of PCX files from untrusted sources
  • Deploy web application firewalls (WAF) to inspect and block malicious image uploads
  • Isolate image processing workloads in sandboxed environments to limit the impact of potential exploitation
bash
# Configuration example
# Upgrade Pillow to patched version
pip install --upgrade pillow>=8.1.0

# Verify installed version
python -c "import PIL; print(PIL.__version__)"

# For Debian-based systems
apt-get update && apt-get install python3-pil

# For Fedora systems
dnf update python3-pillow

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechPython Pillow

  • SeverityHIGH

  • CVSS Score7.1

  • EPSS Probability0.29%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-125
  • Technical References
  • Debian LTS Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Pillow Release Notes
  • Related CVEs
  • CVE-2024-28219: Python Pillow Buffer Overflow Vulnerability

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

  • CVE-2022-22816: Python Pillow Buffer Overflow Vulnerability

  • CVE-2021-34552: Python Pillow Buffer Overflow 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