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-2022-32168

CVE-2022-32168: Notepad++ DLL Hijacking RCE Vulnerability

CVE-2022-32168 is a DLL hijacking vulnerability in Notepad++ 8.4.1 and earlier that allows attackers to execute arbitrary code by replacing UxTheme.dll. This article covers technical details, affected versions, and mitigation.

Published: February 18, 2026

CVE-2022-32168 Overview

CVE-2022-32168 is a DLL hijacking vulnerability affecting Notepad++ versions 8.4.1 and earlier. The vulnerability allows an attacker to replace a vulnerable DLL file (UxTheme.dll) with a malicious DLL, enabling arbitrary code execution within the context of the Notepad++ application. This type of attack exploits the Windows DLL search order mechanism, where applications load DLLs from predictable locations without proper validation.

Critical Impact

Attackers can achieve arbitrary code execution by placing a malicious DLL in the application directory, potentially leading to complete system compromise when a user launches Notepad++.

Affected Products

  • Notepad++ versions 8.4.1 and earlier
  • All Windows installations running vulnerable Notepad++ versions
  • Systems where users have write access to the Notepad++ installation directory

Discovery Timeline

  • 2022-09-28 - CVE-2022-32168 published to NVD
  • 2025-05-21 - Last updated in NVD database

Technical Details for CVE-2022-32168

Vulnerability Analysis

This vulnerability stems from CWE-427 (Uncontrolled Search Path Element), a class of weaknesses where an application searches for critical resources such as libraries or executables in locations that might be under the control of untrusted parties. In this case, Notepad++ used the standard LoadLibrary() function to load DLLs like UxTheme.dll and DBGHELP.DLL without specifying a secure search path.

When a user executes Notepad++, the application attempts to load these DLLs following the standard Windows DLL search order. If an attacker has placed a malicious DLL with the same name in a directory that is searched before the legitimate system directory, the malicious DLL will be loaded instead, executing arbitrary code with the privileges of the Notepad++ process.

Root Cause

The root cause of this vulnerability is the use of the insecure LoadLibrary() API without proper path restrictions. The vulnerable code loaded UxTheme.dll and DBGHELP.DLL using:

cpp
_hUXTheme = ::LoadLibrary(TEXT("uxtheme.dll"));
HMODULE hDll = ::LoadLibrary( TEXT("DBGHELP.DLL") );

This approach does not restrict the DLL search path, allowing Windows to search in multiple locations including the application's current directory, which may be writable by an attacker.

Attack Vector

The attack vector is local, requiring the attacker to have write access to the Notepad++ installation directory or to a location in the DLL search path. The attack flow involves:

  1. Attacker identifies the vulnerable DLL loading behavior in Notepad++
  2. Attacker creates a malicious DLL named UxTheme.dll or DBGHELP.DLL
  3. Attacker places the malicious DLL in the Notepad++ installation directory
  4. User launches Notepad++, which loads the malicious DLL instead of the legitimate system DLL
  5. Malicious code executes with the user's privileges

The official patch addresses this by using LoadLibraryEx() with the LOAD_LIBRARY_SEARCH_SYSTEM32 flag:

cpp
// Security patch in PowerEditor/src/Parameters.cpp
// Before (vulnerable):
_hUXTheme = ::LoadLibrary(TEXT("uxtheme.dll"));

// After (secure):
_hUXTheme = ::LoadLibraryEx(TEXT("uxtheme.dll"), nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);

Source: GitHub Commit 85d7215d9b3e0d5a8433fc31aec4f2966821051e

cpp
// Security patch in PowerEditor/src/MISC/Exception/MiniDumper.cpp
// Before (vulnerable):
HMODULE hDll = ::LoadLibrary( TEXT("DBGHELP.DLL") );

// After (secure):
HMODULE hDll = ::LoadLibraryEx(TEXT("DBGHELP.DLL"), nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);

Source: GitHub Commit 85d7215d9b3e0d5a8433fc31aec4f2966821051e

Detection Methods for CVE-2022-32168

Indicators of Compromise

  • Presence of UxTheme.dll or DBGHELP.DLL files in the Notepad++ installation directory (these should only exist in the Windows System32 directory)
  • Unexpected DLL files with suspicious timestamps in the Notepad++ application folder
  • Notepad++ process loading DLLs from non-standard paths visible in process monitoring tools
  • Unusual network connections or child processes spawned by notepad++.exe

Detection Strategies

  • Monitor DLL loading events for notepad++.exe using Windows Event Tracing or Sysmon
  • Implement file integrity monitoring on the Notepad++ installation directory
  • Use application whitelisting solutions to prevent unauthorized DLL loading
  • Deploy endpoint detection rules that alert on DLLs loaded from application directories that should originate from System32

Monitoring Recommendations

  • Configure SentinelOne Deep Visibility to track DLL load events for common applications like Notepad++
  • Create custom detection rules for LoadLibrary calls loading Windows system DLLs from non-system paths
  • Implement behavioral monitoring to detect code execution originating from unexpected DLL loads
  • Review process ancestry chains for Notepad++ to identify suspicious parent-child relationships

How to Mitigate CVE-2022-32168

Immediate Actions Required

  • Update Notepad++ to version 8.4.2 or later immediately
  • Audit Notepad++ installation directories for any unexpected DLL files
  • Review system access controls to ensure users cannot write to application installation directories
  • Deploy endpoint protection solutions capable of detecting DLL hijacking attempts

Patch Information

The Notepad++ development team has addressed this vulnerability in the official security patch. The fix replaces insecure LoadLibrary() calls with LoadLibraryEx() using the LOAD_LIBRARY_SEARCH_SYSTEM32 flag, which forces Windows to load the specified DLLs exclusively from the System32 directory, preventing DLL hijacking attacks.

Organizations should update to the latest version of Notepad++ through their standard software update processes or download directly from the official Notepad++ website.

Workarounds

  • Restrict write permissions on the Notepad++ installation directory to administrators only
  • Use software restriction policies or AppLocker to prevent execution of DLLs from the Notepad++ directory
  • Deploy application control solutions that whitelist legitimate DLL locations
  • Consider running Notepad++ in a sandboxed environment if immediate patching is not possible
bash
# Restrict write permissions on Notepad++ installation directory (Windows)
icacls "C:\Program Files\Notepad++" /inheritance:r /grant:r "Administrators:(OI)(CI)F" /grant:r "SYSTEM:(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
  • TypeRCE

  • Vendor/TechNotepad Plus Plus

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.08%

  • 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
  • Technical References
  • Mend Vulnerability Database Entry
  • Vendor Resources
  • GitHub Commit Reference
  • Related CVEs
  • CVE-2026-25926: Notepad++ RCE Vulnerability

  • CVE-2025-15556: Notepad++ WinGUp Updater RCE Vulnerability

  • CVE-2025-56383: Notepad++ v8.8.3 DLL Hijacking RCE Flaw

  • CVE-2023-40031: Notepad++ RCE Vulnerability
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