Description
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.
Published: 2026-06-26
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

User-defined command entries in shortcuts.xml are parsed by Notepad++ without validation. When the user selects a Run menu item that references one of these entries, the application constructs a command string and passes it to the operating system via ShellExecute. This path allows an attacker to supply an arbitrary executable path in the <Command> tag, leading to remote execution of malicious code. The injected command is visible as a standard menu item, providing a convenient persistence mechanism for attackers.

Affected Systems

The flaw exists in the Notepad++ application prior to version 8.9.6.1. All installations of Notepad++ running a version older than 8.9.6.1 are susceptible, regardless of operating system, because the relevant parsing logic is part of the core command handling component.

Risk and Exploitability

The CVSS base score of 7.8 indicates a high impact vulnerability with moderate to high exploitability. The EPSS score is not available, and the vulnerability is not currently listed in the CISA KEV catalog. Attackers would need local access and user interaction by opening and running Notepad++. The lack of input validation identified as CWE-78 allows injection of arbitrary commands, and the persistence via the Run menu makes it feasible for repeated exploitation.

Generated by OpenCVE AI on June 26, 2026 at 22:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update Notepad++ to version 8.9.6.1 or later, which contains the necessary validation fixes for user-defined command entries.
  • If updating is not immediately possible, inspect the shortcuts.xml file under the Notepad++ configuration directory and remove any <Command> entries that contain attacker-controlled executables, then restart the application to clear the malicious menu item.
  • Disable the Run menu or configure the application to disallow execution of user-defined commands, thereby eliminating the exploitation path provided by the vulnerable command parsing code.

Generated by OpenCVE AI on June 26, 2026 at 22:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 26 Jun 2026 21:00:00 +0000

Type Values Removed Values Added
Description 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.
Title Notepad++: Arbitrary Code Execution via shortcuts.xml UserCommand Injection
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-26T20:12:43.955Z

Reserved: 2026-05-22T20:18:20.366Z

Link: CVE-2026-48800

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-26T22:30:04Z

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')