# CVE-2026-42214: Improper Control of Generation of Code ('Code Injection') in dail8859/NotepadNext

- Severity: High 7.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-07T18:14:20.246Z
- Modified: 2026-10-26T20:10:00.160Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- dail8859 NotepadNext: < 0.14
- dail8859 notepad_next: before 0.14

## References

- <https://github.com/dail8859/NotepadNext/security/advisories/GHSA-m5fq-c9x5-w54g> (exploit, mitigation, vendor-advisory)
- <https://github.com/dail8859/NotepadNext/commit/f3ca1b10aca52f05fd7f4f5ebf9b566d6cd95ccc> (patch)
- <https://github.com/dail8859/NotepadNext/releases/tag/v0.14> (release-notes)

## Sources

- CVE List: [CVE-2026-42214](https://www.cve.org/CVERecord?id=CVE-2026-42214), CVE Terms of Use, modified 2026-05-09
- NVD: [CVE-2026-42214](https://nvd.nist.gov/vuln/detail/CVE-2026-42214), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-42214 · Whole record: https://cve.day/CVE-2026-42214.json · Rebuilt by cve.day 2026-11-25T22:59:20.897Z
