CVE-2026-48800: Notepad++ Command Injection via shortcuts.xml (CVSS 7.8)
Notepad++ versions before 8.9.6.1 allow arbitrary command injection through the shortcuts configuration file. An attacker who can modify the shortcuts.xml file—either directly or by tricking a user into importing a malicious configuration—can inject shell commands that execute with the user's privileges when that menu item is clicked. Because the injected command appears as a normal entry in the Run menu, this creates both an execution risk and a stealthy persistence mechanism.
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-78
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-26 / 2026-06-30
NVD description (verbatim)
Notepad++ is a free and open-source source code editor. Prior to 8.9.6.1, the <Command> tag text content inside <UserDefinedCommands> in shortcuts.xml is read by NppXml::value(aNode) (Parameters.cpp:3658) in the feedUserCmds() function and stored in UserCommand._cmd without any validation. When the user clicks the corresponding entry in the Run menu, NppCommands.cpp:4264 creates a Command object with string2wstring(ucmd.getCmd()) and calls run(), which invokes ShellExecute (RunDlg.cpp:221) with the attacker-controlled string as the executable path. The injected command appears as a normal menu item in the Run menu, making it a viable persistence mechanism. This vulnerability is fixed in 8.9.6.1.
3 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in how Notepad++ parses the <Command> tag within <UserDefinedCommands> in shortcuts.xml. The NppXml::value() function in Parameters.cpp (line 3658) reads this XML content without validation and stores it directly into UserCommand._cmd. When a user invokes the corresponding Run menu entry, NppCommands.cpp (line 4264) constructs a Command object using string2wstring(ucmd.getCmd()) and executes it via ShellExecute (RunDlg.cpp:221) with no sanitization. This allows arbitrary command-line arguments and executable paths. The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command).
Business impact
If an attacker gains write access to a user's Notepad++ configuration directory or convinces a user to import a malicious shortcuts.xml profile, arbitrary code execution occurs under the user's security context. Because the malicious command masquerades as a legitimate menu item, detection is difficult. The risk is heightened in environments where configuration files are synchronized across systems (e.g., via cloud storage or configuration management tools), potentially affecting multiple machines from a single poisoned file. This vulnerability represents both immediate execution and lateral persistence risk.
Affected systems
Notepad++ versions prior to 8.9.6.1 are affected. The vulnerability affects all platforms where Notepad++ runs (Windows primarily, with varying support on other systems via community builds). Users with access to modify or import configuration files are at direct risk; those sharing configuration profiles or using centralized configuration management are at elevated risk.
Exploitability
Exploitation requires either direct file system write access to the user's Notepad++ configuration directory or social engineering to import a malicious shortcuts.xml file. The attack vector is local, the attack complexity is low, and user interaction (clicking the menu item) is required. No authentication or elevated privileges are needed to modify the configuration file if file permissions allow it. The CVSS 3.1 score of 7.8 (HIGH) reflects the combination of local attack surface, low complexity, and high impact on confidentiality, integrity, and availability.
Remediation
Upgrade Notepad++ to version 8.9.6.1 or later. The patch implements validation of command content in the shortcuts.xml parsing logic. Organizations should also audit user configuration directories and imported profiles for suspicious command entries, particularly those containing shell operators (pipes, redirects, semicolons) or unusual executable paths. Consider restricting write access to Notepad++ configuration directories where feasible.
Patch guidance
Users should update to Notepad++ 8.9.6.1 via the built-in updater or by downloading the latest release from the official Notepad++ website. Verify the update was successful by checking Help > About > Version. Organizations should test the update in a controlled environment before broad deployment. For environments that manage configuration centrally, regenerate or audit all shortcuts.xml files to ensure no injected commands remain in cached or backed-up versions.
Detection guidance
Monitor for suspicious entries in shortcuts.xml files, particularly those containing command operators or non-standard executable paths. Flag instances where the XML contains shell metacharacters, UNC paths, or references to scripting interpreters. Log and alert on any Notepad++ process spawning unexpected child processes, especially with arguments containing special characters. In endpoint detection and response (EDR) systems, correlate Notepad++ process execution with unusual command-line activity or process trees. Check recently modified shortcuts.xml files, especially following user sessions where configuration files were imported or edited.
Why prioritize this
This vulnerability merits prompt patching because it enables both direct code execution and stealthy persistence through a user-facing menu interface. The local attack vector, low complexity, and high impact make it attractive for post-breach lateral movement or supply-chain attacks targeting development teams. Although KEV inclusion is not reported, the straightforward exploit path and widespread use of Notepad++ in development environments elevates practical risk. Patch coverage should be prioritized in environments where developers frequently import shared configuration profiles.
Risk score, explained
The CVSS 3.1 score of 7.8 (HIGH) is justified by the combination of local attack vector, low attack complexity, lack of required privileges, user interaction (clicking menu), and high impact across confidentiality, integrity, and availability. The severity is tempered only by the requirement for file write access and user action, but those constraints are easily met in collaborative or supply-chain scenarios where configuration sharing is common.
Frequently asked questions
Can this vulnerability be exploited remotely?
No. The attack vector is local (AV:L). An attacker must either write directly to the user's shortcuts.xml file via file system access or socially engineer the user into importing a malicious configuration file. Remote exploitation requires prior compromise or user deception.
Does the attack require administrator privileges?
No. The vulnerability requires no specific privilege level (PR:N) to modify configuration files, assuming standard file permissions. This makes it accessible to any process or user account with write access to the configuration directory, lowering the barrier to exploitation.
Are users notified when a malicious menu item is executed?
No. Once the command is stored in shortcuts.xml, it appears as a normal user-created menu entry in the Run menu with no warning. The attacker-controlled executable path is invoked silently when clicked, with no validation or confirmation prompt shown to the user.
Does updating to 8.9.6.1 automatically remove injected commands from existing configuration files?
The patch prevents injection in future configurations but does not automatically clean existing shortcuts.xml files. Users and administrators should manually review and audit their configuration files after patching to remove any suspicious command entries that may have been added prior to the update.
This analysis is based on publicly available vulnerability data as of the publication date. Organizations should verify patch availability and compatibility with their specific Notepad++ version and deployment environment before applying updates. This information is provided for educational and defensive purposes; no exploit code or weaponized proof-of-concept is included. Always test patches in non-production environments first and consult vendor advisories for definitive remediation steps. Source: NVD (public-domain), retrieved 2026-08-05. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-48778HIGHNotepad++ Config Injection Remote Code Execution (v8.9.6.1)
- CVE-2025-41265HIGHWaterfall WF-500 TX Host OS Command Injection (CVSS 7.2)
- CVE-2025-41266HIGHWaterfall WF-500 TX Host Command Injection Vulnerability Analysis
- CVE-2025-41267HIGHWaterfall WF-500 TX Host Command Injection Vulnerability
- CVE-2025-41279HIGHOS Command Injection in Waterfall WF-500 RX Host Administration WebUI
- CVE-2025-41281HIGHWaterfall WF-500 OS Command Injection
- CVE-2025-66273HIGHQNAP Command Injection in QTS and QuTS hero
- CVE-2025-66279HIGHQNAP NAS Command Injection – Admin Authentication Required, HIGH Severity