Executive brief
Notepad++ is a popular open-source text and source code editor. A security flaw in its installer allows a local attacker to gain administrative control of a computer if a user installs the software into a folder where the attacker has already placed a malicious file. This could lead to a full system takeover or the installation of persistent malware.
Technical details
A local privilege escalation vulnerability exists in the Notepad++ installer (versions 8.9.4 and 8.9.5) due to an uncontrolled search path (CWE-426). During the installation process, the installer sets the working directory to the 'contextMenu' folder and subsequently calls 'powershell.exe' without specifying an absolute path. If an attacker pre-places a malicious 'powershell.exe' in a user-writable directory that is then selected as the installation target by a privileged user, the installer will execute the malicious file with elevated privileges. This issue is resolved in version 8.9.6 by retrieving the absolute path of PowerShell from the Windows Registry.
Affected products
- Notepad++ Notepad++ 8.9.4 to 8.9.5
Timeline
- 2026-05-21: advisory: GitHub Security Advisory published
- 2026-06-26: disclosed: CVE published to NVD
- 2026-06-26: patched: Fix confirmed in version 8.9.6