CVE-2026-52885 PUBLISHED

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

Assigner: GitHub_M
Reserved: 08.06.2026 Published: 26.06.2026 Updated: 26.06.2026

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.

Metrics

CVSS 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
CVSS Score: 7.5

Product Status

Vendor notepad-plus-plus
Product notepad-plus-plus
Versions
  • Version < 8.9.6.4 is affected

References

Problem Types

  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition CWE