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-15523

CVE-2020-15523: Python DLL Hijacking Vulnerability

CVE-2020-15523 is a DLL hijacking flaw in Python 3.6-3.9 on Windows that allows Trojan horse attacks when Python is embedded in native applications. This article covers technical details, affected versions, and mitigation.

Published: March 11, 2026

CVE-2020-15523 Overview

CVE-2020-15523 is a DLL Injection vulnerability affecting Python 3.6 through 3.6.10, 3.7 through 3.7.8, 3.8 through 3.8.4rc1, and 3.9 through 3.9.0b4 on Windows systems. The vulnerability occurs when CPython is embedded in a native application, where a Trojan horse python3.dll might be loaded due to an invalid search path used by python3X.dll after Py_SetPath has been called. This is classified as CWE-427 (Uncontrolled Search Path Element).

Critical Impact

Attackers can achieve arbitrary code execution by placing a malicious python3.dll in a location that will be searched before the legitimate DLL, enabling full system compromise in environments using embedded Python.

Affected Products

  • Python 3.6 through 3.6.10 on Windows
  • Python 3.7 through 3.7.8 on Windows
  • Python 3.8 through 3.8.4rc1 on Windows
  • Python 3.9 through 3.9.0b4 (including alpha and beta releases) on Windows
  • NetApp SnapCenter

Discovery Timeline

  • 2020-07-04 - CVE-2020-15523 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-15523

Vulnerability Analysis

This vulnerability is rooted in how the Windows DLL search order is handled when Python is embedded in native applications. When a developer embeds CPython in their Windows application and uses the Py_SetPath API to configure Python paths, the version-specific DLL (python3X.dll, where X represents the minor version) attempts to load the base python3.dll. However, due to improper search path configuration following the Py_SetPath call, the loading mechanism may search for python3.dll in insecure locations before finding the legitimate system library.

This creates a classic DLL hijacking scenario where an attacker can place a malicious DLL named python3.dll in a directory that appears earlier in the search path—such as the application's working directory or a user-writable location. When the embedded Python runtime initializes, it loads and executes the attacker-controlled DLL with the privileges of the host application.

It's important to note that this vulnerability specifically affects embedded Python scenarios and cannot occur when using python.exe from a standard Python installation on Windows.

Root Cause

The root cause is an uncontrolled search path element (CWE-427) in the DLL loading logic. When Py_SetPath is invoked to customize the Python path in embedded scenarios, the subsequent loading of python3.dll by python3X.dll does not properly constrain the DLL search path. This oversight allows the Windows loader to search untrusted directories for the required DLL before checking secure system locations.

Attack Vector

The attack requires local access and typically involves the following steps:

  1. An attacker identifies an application that embeds CPython and uses Py_SetPath to configure paths
  2. The attacker places a malicious python3.dll in a location searched by the Windows DLL loader (such as the application directory or current working directory)
  3. When the victim launches the application, the embedded Python runtime attempts to load python3.dll
  4. Due to the insecure search path, the malicious DLL is loaded and executed with the application's privileges
  5. The attacker achieves arbitrary code execution in the context of the compromised application

This attack requires user interaction (launching the vulnerable application) and local file system access to plant the malicious DLL.

Detection Methods for CVE-2020-15523

Indicators of Compromise

  • Presence of unexpected python3.dll files in application directories or user-writable paths
  • DLL load events showing python3.dll being loaded from non-standard Python installation directories
  • Applications embedding Python exhibiting unexpected behavior or network connections after startup
  • Process creation events spawned by embedded Python applications that are inconsistent with normal operation

Detection Strategies

  • Monitor for python3.dll file creation events in directories outside of standard Python installation paths
  • Implement application whitelisting to detect unauthorized DLL loading
  • Use endpoint detection and response (EDR) solutions to monitor DLL load patterns for applications known to embed Python
  • Audit and alert on modifications to directories containing embedded Python applications

Monitoring Recommendations

  • Configure file integrity monitoring on directories containing applications that embed CPython
  • Enable detailed Windows DLL loading audit logs (Audit Object Access for file system events)
  • Deploy behavioral analysis to detect anomalous execution patterns following Python runtime initialization
  • Review and inventory all applications in your environment that embed Python to assess exposure

How to Mitigate CVE-2020-15523

Immediate Actions Required

  • Upgrade affected Python installations to patched versions: 3.6.11+, 3.7.9+, 3.8.5+, or 3.9.0rc1+
  • Audit all applications in your environment that embed CPython to identify those requiring updates
  • Remove write permissions from directories containing embedded Python applications where possible
  • Implement application control policies to prevent unauthorized DLL loading

Patch Information

The Python development team has addressed this vulnerability in subsequent releases. The fix is tracked in GitHub Pull Request #21297 and documented in Python Issue Tracker Entry. Organizations using NetApp SnapCenter should consult the NetApp Security Advisory NTAP-20210312-0004 for specific remediation guidance.

Upgrade to the following patched versions:

  • Python 3.6.11 or later for the 3.6 branch
  • Python 3.7.9 or later for the 3.7 branch
  • Python 3.8.5 or later for the 3.8 branch
  • Python 3.9.0rc1 or later for the 3.9 branch

Workarounds

  • Restrict write access to directories where embedded Python applications reside
  • Configure the SetDllDirectory API to remove the current directory from the DLL search path before initializing embedded Python
  • Deploy applications embedding Python in protected directories that users cannot modify
  • Consider using fully qualified paths when loading Python DLLs in embedded scenarios
bash
# Verify Python version and check for vulnerability
python --version

# Check if running in embedded context (for developers)
# Ensure Py_SetPath usage is followed by secure DLL loading practices

# Restrict directory permissions (example for application directory)
icacls "C:\Path\To\EmbeddedApp" /inheritance:r /grant:r "SYSTEM:(OI)(CI)F" /grant:r "Administrators:(OI)(CI)F" /grant:r "Users:(OI)(CI)RX"

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechPython

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.11%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-427
  • Vendor Resources
  • Python Issue Tracker Entry

  • GitHub Pull Request #21297

  • NetApp Security Advisory NTAP-20210312-0004
  • Related CVEs
  • CVE-2025-13462: Python tarfile Module Parsing Vulnerability

  • CVE-2021-23336: Python Web Cache Poisoning Vulnerability

  • CVE-2024-6923: CPython Email Header Injection Flaw

  • CVE-2020-26116: Python HTTP Client CRLF Injection Flaw
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