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

CVE-2020-15801: Python 3.8.4 RCE Vulnerability

CVE-2020-15801 is an RCE vulnerability in Python 3.8.4 where sys.path restrictions in python38._pth files are ignored, enabling arbitrary code loading. This article covers technical details, affected versions, and mitigations.

Published: March 4, 2026

CVE-2020-15801 Overview

CVE-2020-15801 is a critical vulnerability in Python 3.8.4 where sys.path restrictions specified in a python38._pth file are ignored, allowing code to be loaded from arbitrary locations. This represents an Untrusted Search Path vulnerability (CWE-426) that undermines the security controls designed to restrict module loading paths in embedded Python deployments.

The ._pth files in Python on Windows are designed to provide isolation for embedded Python installations by explicitly defining allowed import paths. When these restrictions are bypassed, an attacker can potentially load malicious Python modules from untrusted locations, leading to arbitrary code execution with the privileges of the Python process.

Critical Impact

Attackers can bypass sys.path restrictions to load malicious code from arbitrary locations, potentially achieving remote code execution on affected systems running Python 3.8.4 on Windows.

Affected Products

  • Python 3.8.4 on Windows
  • Microsoft Windows (as the affected platform)
  • NetApp MAX Data

Discovery Timeline

  • 2020-07-17 - CVE-2020-15801 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-15801

Vulnerability Analysis

This vulnerability stems from improper handling of the python38._pth configuration file in Python 3.8.4 on Windows systems. The ._pth file mechanism was introduced to allow Python to be embedded in applications while maintaining strict control over which directories Python can import modules from. By specifying explicit paths in this file, administrators can create isolated Python environments that cannot load code from unexpected locations.

In Python 3.8.4, the path restrictions defined in the python38._pth file are not properly enforced. This means that even when administrators have carefully configured path restrictions to limit where Python can load modules from, attackers can circumvent these controls. The standard python._pth file (the executable-name variant) is not affected by this issue.

The vulnerability allows for arbitrary code loading, which can be exploited to achieve code execution. An attacker who can place a malicious Python module in a location that would normally be excluded by the ._pth restrictions can have that code executed when Python imports modules.

Root Cause

The root cause is an Untrusted Search Path vulnerability (CWE-426) where the Python interpreter fails to properly respect the path restrictions configured in the python38._pth file. This represents a regression or implementation flaw in how Python 3.8.4 processes this specific configuration file variant.

The issue lies in the initialization code that processes ._pth files during Python startup. While the restrictions from the executable-name based ._pth file (e.g., python._pth) are correctly applied, the version-specific python38._pth file's restrictions are ignored, leaving a security gap.

Attack Vector

The attack vector is network-based according to the CVSS assessment, indicating that exploitation can potentially occur remotely without requiring local access to the target system. This could manifest in scenarios where:

  1. An attacker can place files in directories accessible to the Python process
  2. The Python application processes untrusted input that influences module loading
  3. Network-accessible file shares or directories exist that Python can access

For exploitation, an attacker would need to place a malicious Python module in a location that Python can access but which should have been excluded by the ._pth restrictions. When the Python application subsequently imports modules, the malicious code could be loaded and executed.

The vulnerability specifically affects Windows deployments where the python38._pth file is used to restrict import paths. See the Python Issue #41304 for detailed technical discussion and the GitHub PR #21495 for the fix implementation.

Detection Methods for CVE-2020-15801

Indicators of Compromise

  • Unexpected Python modules appearing in non-standard directories accessible to the Python process
  • Python processes loading DLLs or .py/.pyc files from directories that should be excluded by ._pth restrictions
  • Anomalous network connections or process spawning from Python 3.8.4 processes
  • Modified or newly created files in directories within Python's accessible paths

Detection Strategies

  • Monitor Python process execution for module loading from unexpected directories
  • Audit file system access patterns of Python 3.8.4 processes on Windows systems
  • Implement application whitelisting to detect unauthorized code loading
  • Review Python import logs and trace module loading paths during application startup

Monitoring Recommendations

  • Deploy endpoint detection solutions to monitor Python process behavior and module loading patterns
  • Configure file integrity monitoring on directories that should be restricted by ._pth files
  • Establish baseline behavior for Python applications and alert on deviations
  • Monitor for creation of new .py, .pyc, or .pyd files in unexpected locations

How to Mitigate CVE-2020-15801

Immediate Actions Required

  • Upgrade Python to version 3.8.5 or later where the vulnerability has been patched
  • Audit all Python 3.8.4 installations on Windows systems within your environment
  • Review and restrict file system permissions on directories accessible to Python processes
  • Consider using the python._pth file format instead of python38._pth as a temporary workaround

Patch Information

The Python development team addressed this vulnerability in subsequent releases. The fix is tracked in GitHub PR #21495, which corrects the handling of version-specific ._pth files.

Organizations should upgrade to Python 3.8.5 or later to receive the security fix. For environments using NetApp MAX Data, consult the NetApp Security Advisory for vendor-specific guidance.

For detailed information about the vulnerability and patch, reference:

  • Python Issue #41304
  • GitHub PR #21495

Workarounds

  • Use the python._pth (executable-name variant) file instead of python38._pth for path restrictions, as this format is not affected
  • Implement strict file system permissions to prevent unauthorized file creation in directories accessible to Python
  • Deploy application control solutions to prevent execution of unauthorized Python modules
  • Consider running Python applications in isolated environments such as containers with restricted file system access

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechPython

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.62%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-426
  • Technical References
  • NetApp Security Advisory
  • Vendor Resources
  • Python Issue #41304

  • GitHub PR #21495
  • Related CVEs
  • CVE-2025-15366: Python imaplib Module RCE Vulnerability

  • CVE-2021-3177: Python Buffer Overflow RCE Vulnerability

  • CVE-2024-9287: Python venv RCE Vulnerability

  • CVE-2020-27619: Python RCE Vulnerability via eval()
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