CVE-2026-52885

Notepad++ TOCTOU: HMAC Checks Disk, Executes from Memory

Published Jun 26, 2026 CVSS 4.0 · 7.5 High EPSS < 1% KEV · Not listed
Description
Notepad++ is a free and open-source source code editor. Prior to 8.9.6.4, NppCommands.cpp checks the HMAC of the on-disk shortcuts.xml at the moment a user command fires (Time-of-Check). However, the command payload is taken from the in-memory _userCommands vector, which is populated at application startup and never re-synchronized with the on-disk file (Time-of-Use). Swapping shortcuts.xml between startup and command execution causes the HMAC check to validate a clean file while a malicious command runs. An attacker with write access to shortcuts.xml places a malicious version on disk before launch, then immediately restores the legitimate file. The HMAC check at execution time validates the restored legitimate file (check passes), while the malicious payload executes from memory. This vulnerability is fixed in 8.9.6.4.

Analysis

AI-generated

Technical impact

Notepad++ performs a time‑of‑check by verifying the HMAC of the shortcuts.xml file at the moment a user command is fired, but the command payload is taken from an in‑memory vector that is never refreshed. An attacker who can temporarily replace shortcuts.xml with a malicious version before the command runs can cause the HMAC check to validate the legitimate file after it is restored, while the malicious command remains in memory and is executed. This flaw allows the attacker to run arbitrary local commands with the privileges of the Notepad++ process.

Affected Systems

Versions of Notepad++ before 8.9.6.4 are affected, as the vulnerability is fixed in 8.9.6.4. The flaw exists in the Windows build of the application.

Risk and Exploitability

The CVSS score of 7.5 indicates a high‑severity vulnerability. Because EPSS is not available and the vulnerability is not listed in the CISA KEV catalog, the probability of immediate exploitation is not quantified, but the attack can be performed if an attacker can write to shortcuts.xml and then launch Notepad++. A file‑system race is required, so denial of service or other side effects are not directly feasible, but local code execution with the user’s privileges can occur if successful.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Notepad++ version 8.9.6.4 or later to eliminate the race condition
  • Restrict write permissions to the shortcuts.xml file so that only trusted users can modify it
  • Monitor the shortcuts.xml file for unauthorized changes and review event logs for suspicious activity

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Notepad-plus-plus
Notepad-plus-plus notepad++
Vendors & Products Notepad-plus-plus
Notepad-plus-plus notepad++
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Notepad++ is a free and open-source source code editor. Prior to 8.9.6.4, NppCommands.cpp checks the HMAC of the on-disk shortcuts.xml at the moment a user command fires (Time-of-Check). However, the command payload is taken from the in-memory _userCommands vector, which is populated at application startup and never re-synchronized with the on-disk file (Time-of-Use). Swapping shortcuts.xml between startup and command execution causes the HMAC check to validate a clean file while a malicious command runs. An attacker with write access to shortcuts.xml places a malicious version on disk before launch, then immediately restores the legitimate file. The HMAC check at execution time validates the restored legitimate file (check passes), while the malicious payload executes from memory. This vulnerability is fixed in 8.9.6.4.
Title Notepad++ TOCTOU: HMAC Checks Disk, Executes from Memory
Weaknesses CWE-367
References
Metrics cvssV4_0

{'score': 7.5, 'vector': 'CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 29, 2026, 1:13 PM
Reserved
Jun 8, 2026, 9:44 PM
Status
Analyzed
Published
Jun 26, 2026, 9:16 PM
Modified
Jun 29, 2026, 9:22 PM