{"id":"CVE-2026-52885","summary":"Notepad++ TOCTOU: HMAC Checks Disk, Executes from Memory","details":"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.","aliases":["GHSA-qm4c-qg8p-qfcr"],"modified":"2026-07-15T19:48:09.974457Z","published":"2026-06-26T20:19:04.456Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-367"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52885.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/52xxx/CVE-2026-52885.json"},{"type":"ADVISORY","url":"https://github.com/notepad-plus-plus/notepad-plus-plus/security/advisories/GHSA-qm4c-qg8p-qfcr"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52885"},{"type":"FIX","url":"https://github.com/notepad-plus-plus/notepad-plus-plus/commit/4f7563c7c7f8ffa0d795ec86a7777067c7d644b5"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/notepad-plus-plus/notepad-plus-plus","events":[{"introduced":"0"},{"fixed":"6ab5c2110168b4453443663d114ffc2088caae98"},{"fixed":"4f7563c7c7f8ffa0d795ec86a7777067c7d644b5"}],"database_specific":{"cpe":"cpe:2.3:a:notepad-plus-plus:notepad\\+\\+:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"8.9.6.4"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v8.9.6.2","v8.9.6.1","v8.9.6","v8.9.5","v8.9.4","v8.9.3","v8.9.2","v8.9.1","v8.9","v8.8.9","v8.8.8","v8.8.7","v8.8.6","v8.8.5","v8.8.4","v8.8.3","v8.8.2","v8.8.1","v8.8","v8.7.9","v8.7.8","v8.7.7","v8.7.6","v8.7.5","v8.7.4","v8.7.3","v8.7.2","v8.7.1","v8.7","v8.6.9","v8.6.8","v8.6.7","v8.6.6","v8.6.5","v8.6.4","v8.6.3","v8.6.2","v8.6.1","v8.6","v8.5.8","v8.5.7","v8.5.6","v8.5.5","v8.5.4","v8.5.3","v8.5.2","v8.5.1","v8.5","v8.4.9","v8.4.8","v8.4.7","v8.4.6","v8.4.5","v8.4.4","v8.4.3","v8.4.2","v8.4.1","v8.4","v8.3.3","v8.3.2","v8.3.1","v8.3","v8.2.1","v8.2","v8.1.9.3","v8.1.9.2","v8.1.9.1","v8.1.9","v8.1.8","v8.1.7","v8.1.6","v8.1.5","v8.1.4","v8.1.3","v8.1.2","v8.1.1","v8.1","v8","v7.9.5","v7.9.4","v7.9.3","v7.9.2","v7.9.1","v7.9","v7.8.9","v7.8.8","v7.8.7","v7.8.6","v7.8.5","v7.8.4","v7.8.3","v7.8.2","v7.8.1","v7.8","v7.7.1","v7.7","v7.6.6","v7.6.5","v7.6.4","v7.6.3","v7.6.2","v7.6.1","v7.6","v7.5.9","v7.5.8","v7.5.7","v7.5.6","v7.5.5","v7.5.4","v7.5.3","v7.5.2","v7.5.1","v7.4.2","v7.4.1","v7.4","v7.3.3","v7.3.2","v7.3.1","7.3.1","v7.3","v7.2.2","7.2.2","v7.2.1","v7.2","v7.1","v7","v6.9.2","v6.9.1","v6.9","v6.8.9","v6.8.8","v6.8.7","v6.8.6","v6.8.5","v6.8.4","v6.8.3","v6.8.2","v6.8.1","v6.8","v6.7.9.2","v6.7.9.1","v6.7.9","v6.7.8.2","v6.7.8.1","v6.7.8","v6.7.7","v6.7.5","v6.7.4_-_Je_suis_Charlie_edition","v6.7.3","v6.7.2","v6.7.1","v6.7","v6.6.9","v6.6.8","v6.6.7","v6.6.6_-_Friday_the_13th_edition","v6.6.4","v6.6.3","v6.6.2","v6.6.1","v6.6","v6.5.5","v6.5.4","v6.5.3","v6.5.2","v6.5.1","v6.5","v6.4.5","v6.4.4","v6.4.3","v6.4.2","v6.4.1","v6.4","v6.3.3","v6.3.2","v6.3.1","v6.3","v6.2.3_-_End_of_World_Edition","v6.2.2","v6.2.1","v6.2","v6.1.8","v6.1.7","v6.1.6","v6.1.5","v6.1.4","v6.1.3","v6.1.2","v6.1.1","v6.1","v6","v5.9.8","v5.9.7","v5.9.6.2","v5.9.6.1","v5.9.6","v5.9.5","v5.9.4","v5.9.3","v5.9.2","v5.9.1","v5.9","v5.8.7","v5.8.6","v5.8.5","v5.8.4","v5.8.3","v5.8.2","v5.8.1","v5.8","v5.7","v5.6.8","v5.6.7","v5.6.6","v5.6.5","v5.6.4","v5.6.3","v5.6.2","v5.6.1","v5.6","v5.5.1","v5.5","v5.4.5","v5.4.4","v5.4.3","v5.4.2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-52885.json","vanir_signatures_modified":"2026-07-15T19:48:09Z","vanir_signatures":[{"signature_version":"v1","source":"https://github.com/notepad-plus-plus/notepad-plus-plus/commit/6ab5c2110168b4453443663d114ffc2088caae98","target":{"file":"PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp","function":"AboutDlg::run_dlgProc"},"deprecated":false,"digest":{"function_hash":"219184586100220539672240753401781226053","length":2291},"id":"CVE-2026-52885-40398d30","signature_type":"Function"},{"id":"CVE-2026-52885-6020be3b","signature_type":"Line","signature_version":"v1","source":"https://github.com/notepad-plus-plus/notepad-plus-plus/commit/4f7563c7c7f8ffa0d795ec86a7777067c7d644b5","target":{"file":"PowerEditor/src/NppCommands.cpp"},"deprecated":false,"digest":{"line_hashes":["127929633646921987814396737528644852996","290894310495379845902728531785820152918","279513998355383049374026875634215521488","164506617345251224609481369476050892097","692462126711959033219468651714966190"],"threshold":0.9}},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/notepad-plus-plus/notepad-plus-plus/commit/4f7563c7c7f8ffa0d795ec86a7777067c7d644b5","target":{"file":"PowerEditor/src/Parameters.cpp"},"deprecated":false,"digest":{"line_hashes":["47328615034110016216604070238396648852","243985470432832094535403273245299872356","338345801406602247742997799988639254607","280840879427821103660213602170783703093","110269011757098844526958154030893281808"],"threshold":0.9},"id":"CVE-2026-52885-6eaf331c"},{"signature_version":"v1","source":"https://github.com/notepad-plus-plus/notepad-plus-plus/commit/4f7563c7c7f8ffa0d795ec86a7777067c7d644b5","target":{"file":"PowerEditor/src/Parameters.h"},"deprecated":false,"digest":{"line_hashes":["299507352803092293900004188244668001149","94025935158844844736406527431803657362","236336918866179776313491502453915694670","319466044784689419016237333598692812069"],"threshold":0.9},"id":"CVE-2026-52885-a9674931","signature_type":"Line"},{"target":{"file":"PowerEditor/src/NppCommands.cpp","function":"Notepad_plus::command"},"deprecated":false,"digest":{"function_hash":"59794531130702326458042737155916682116","length":109847},"id":"CVE-2026-52885-af85305c","signature_type":"Function","signature_version":"v1","source":"https://github.com/notepad-plus-plus/notepad-plus-plus/commit/4f7563c7c7f8ffa0d795ec86a7777067c7d644b5"},{"target":{"file":"PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp"},"deprecated":false,"digest":{"line_hashes":["114877192185801132542647388985508188971","118927504421255850509002540442162311371","46612156897676513270227421665238931887","64036855656135695482607875833833083004"],"threshold":0.9},"id":"CVE-2026-52885-ebfde83c","signature_type":"Line","signature_version":"v1","source":"https://github.com/notepad-plus-plus/notepad-plus-plus/commit/6ab5c2110168b4453443663d114ffc2088caae98"},{"target":{"file":"PowerEditor/src/Parameters.cpp","function":"NppParameters::load"},"deprecated":false,"digest":{"function_hash":"267883633059239834481796249523318967066","length":11311},"id":"CVE-2026-52885-f6fb2741","signature_type":"Function","signature_version":"v1","source":"https://github.com/notepad-plus-plus/notepad-plus-plus/commit/4f7563c7c7f8ffa0d795ec86a7777067c7d644b5"}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"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"}]}