CVE-2026-52884: Notepad++ Path Traversal in Run Dialog – Arbitrary Code Execution Vulnerability
Notepad++ versions up to 8.9.6.1 contain a path traversal vulnerability that allows an attacker to bypass security checks and execute arbitrary programs from untrusted locations. When a user attempts to run an external command through Notepad++'s Run dialog, the application checks whether the target executable is in a trusted directory. However, this check uses a simple string-matching approach that can be circumvented by embedding path traversal sequences (like ..\..) after the trusted directory name. An attacker can craft a malicious file path that appears to pass the security check but actually resolves to an executable in an untrusted location, leading to arbitrary code execution if a user is tricked into running it. The issue is resolved in version 8.9.6.2.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-42
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-26 / 2026-06-29
NVD description (verbatim)
Notepad++ is a free and open-source source code editor. In v8.9.6.1, isInTrustedDirectory() does NOT canonicalize the path before checking. It uses a prefix-based check (PathIsPrefix() or equivalent) that matches paths starting with trusted directory strings. A path traversal using ..\..\ after a trusted directory prefix passes the check while resolving to an untrusted location. The CVE-2026-48800 patch adds isInTrustedDirectory() validation in Command::run() (RunDlg.cpp) before calling ShellExecute(). This function checks whether the resolved executable path is under a trusted directory. This vulnerability is fixed in 8.9.6.2.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from improper path canonicalization in the isInTrustedDirectory() validation function added to Command::run() in RunDlg.cpp. The function performs a prefix-based path check using PathIsPrefix() or equivalent logic, comparing the target path string against known trusted directory strings without first resolving the full canonical path. This allows an attacker to craft paths containing directory traversal sequences (..\..) that satisfy the prefix check while the operating system resolves them to untrusted locations. The ShellExecute() call then executes the de-referenced malicious executable. This is a classic path normalization bypass where validation happens before resolution. The fix in 8.9.6.2 ensures canonical path resolution before the security check is applied.
Business impact
The vulnerability poses a moderate-to-high risk to organizations where users work with untrusted files or scripts. An attacker could deliver a specially crafted file (document, script, or project file) that, when opened in Notepad++, tricks a user into executing an external command through the Run dialog that actually launches malware. This could lead to local privilege escalation, lateral movement, data theft, or system compromise. The attack requires user interaction—specifically, the user must actively invoke the Run command—which limits the attack surface but does not eliminate it in environments where users regularly execute external tools or build scripts through Notepad++.
Affected systems
Notepad++ versions 8.9.6.1 and earlier are affected. Users of version 8.9.6.2 and later have the fix. The vulnerability applies to Windows systems, as the attack relies on Windows path handling semantics and the ShellExecute() API. Other platforms using Notepad++ may or may not be affected depending on their path resolution behavior; verify with the vendor for non-Windows deployments.
Exploitability
The vulnerability is exploitable but requires user interaction. An attacker must deliver a file or convince a user to open a file in Notepad++ and then manually invoke the Run dialog with a maliciously crafted command. The path traversal technique is well-known and straightforward to construct, so the primary barrier is social engineering or file delivery. Automated exploitation is not feasible without user action. The vulnerability is not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog, suggesting active exploitation in the wild has not been widely reported, though this does not rule out targeted or proof-of-concept activity.
Remediation
Upgrade Notepad++ to version 8.9.6.2 or later immediately. The upgrade can be performed through Notepad++'s built-in auto-update feature (Help > Update Notepad++) or by downloading the latest installer from the official Notepad++ website. For organizations with controlled deployment, test version 8.9.6.2 in a lab environment before rolling out to ensure compatibility with existing scripts or plugins. No workaround is available for unpatched versions; patching is the only remediation.
Patch guidance
Update Notepad++ to 8.9.6.2 or any subsequent release. The patch introduces proper path canonicalization in the isInTrustedDirectory() function before the ShellExecute() call, eliminating the prefix-matching bypass. Organizations can automate updates via managed deployment tools or enforce minimum version requirements in security policies. Consider testing the patched version with any custom Run configurations or external tools users rely on to ensure no breakage.
Detection guidance
Monitor for Notepad++ installations on user machines and verify the version is 8.9.6.2 or later using software inventory tools or endpoint detection and response (EDR) agents. In environments where users regularly use the Run dialog feature, watch for suspicious child processes spawned by notepad++.exe with command lines containing path traversal sequences (..\..) or references to unusual executable locations. Alert on Run dialog invocations with paths pointing outside standard system directories. Log execution of any external commands triggered via Notepad++.
Why prioritize this
This vulnerability merits prompt patching due to its HIGH CVSS score (7.8), local attack vector, and the potential for arbitrary code execution with user-level privileges. While it requires user interaction, Notepad++ is widely used by developers and system administrators who frequently execute external tools. Organizations should prioritize patching based on the prevalence of Notepad++ usage in their environment. The lack of KEV listing suggests it has not reached critical mass in active exploitation, providing a window to patch before widespread campaigns emerge.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) reflects: local attack vector (AV:L) limiting remote exploitation; low attack complexity (AC:L) as the path traversal technique is straightforward; no privilege requirement (PR:N) to trigger the vulnerability; required user interaction (UI:R) such as opening a file and invoking Run; confidentiality, integrity, and availability impacts (C:H/I:H/A:H) as successful exploitation leads to arbitrary code execution. The high impact ratings acknowledge the severity of arbitrary code execution, while the user interaction requirement prevents a critical score.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. The vulnerability requires local access and user interaction. An attacker must deliver a file to a user, convince them to open it in Notepad++, and trick them into executing a malicious command via the Run dialog. Remote exploitation is not possible.
What versions are affected?
Notepad++ version 8.9.6.1 and all earlier versions are affected. Version 8.9.6.2 and later include the fix. Check your version via Help > About Notepad++.
Do I need to restart after updating?
Updating Notepad++ typically does not require a system restart. However, close any open Notepad++ windows before applying the update to ensure a clean installation. Relaunch Notepad++ after the update to verify the new version is running.
Are non-Windows versions of Notepad++ affected?
The vulnerability is specific to Windows path handling and the ShellExecute() API. While Notepad++ is cross-platform, confirm compatibility and affected versions with the vendor if you use Notepad++ on Linux or macOS.
This vulnerability intelligence is provided for informational purposes only and reflects publicly disclosed information as of the publication date. While reasonable efforts have been made to ensure accuracy, SEC.co makes no warranty regarding completeness or real-time updates. Organizations should verify all technical details, including patch versions and affected product versions, against official vendor advisories and security bulletins before taking action. The absence of a vulnerability from the CISA KEV catalog does not indicate absence of active exploitation. Patch testing in a controlled environment is recommended before organization-wide deployment. Security teams should conduct their own risk assessment based on their specific environment, asset inventory, and user behavior before prioritizing this vulnerability. Source: NVD (public-domain), retrieved 2026-08-05. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-46710HIGHNotepad++ Installer Privilege Escalation Vulnerability
- CVE-2026-48778HIGHNotepad++ Config Injection Remote Code Execution (v8.9.6.1)
- CVE-2026-48800HIGHNotepad++ Command Injection via shortcuts.xml (CVSS 7.8)
- CVE-2026-48770MEDIUMNotepad++ Local Denial of Service via Malformed WM_COPYDATA Message
- CVE-2026-52885MEDIUMNotepad++ Time-of-Check-Time-of-Use (TOCTOU) Vulnerability in Command Execution
- CVE-2016-20062HIGHSQL Injection in Simply Poll 1.4.1 WordPress Plugin - Unauthenticated Data Theft
- CVE-2016-20063HIGHSQL Injection in Single Personal Message 1.0.3 – Credential & Data Theft Risk
- CVE-2016-20065HIGHUnauthenticated SQL Injection in Product Catalog 8 WordPress Plugin