Description
Notepad Next is a cross-platform, reimplementation of Notepad++. Prior to version 0.14, NotepadNext's detectLanguageFromExtension() function interpolates a file's extension directly into a Lua script without sanitization. An attacker can craft a filename whose extension contains Lua code, which executes automatically when the victim opens the file in NotepadNext. Because luaL_openlibs() is called unconditionally, the full os, io, and package libraries are available to the injected code, enabling arbitrary command execution. This issue has been patched in version 0.14.
Problem types
CWE-94: Improper Control of Generation of Code ('Code Injection')
Product status
References
github.com/...adNext/security/advisories/GHSA-m5fq-c9x5-w54g
github.com/...adNext/security/advisories/GHSA-m5fq-c9x5-w54g
github.com/...ommit/f3ca1b10aca52f05fd7f4f5ebf9b566d6cd95ccc
github.com/dail8859/NotepadNext/releases/tag/v0.14