Skip to main content

Notepad++ CVE-2026-54758

| EUVDEUVD-2026-60372 HIGH
Stack-based Buffer Overflow (CWE-121)
2026-08-17 security-advisories@github.com
7.8
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Recon
    Deliver crafted config or session file to victim
  2. Delivery
    Victim opens file in Notepad++ pre-8.9.7
  3. Exploit
    Run Dialog processes oversized $(VARIABLE) token
  4. Install
    Unbounded loop overflows wchar_t[MAX_PATH] stack buffer
  5. C2
    Adjacent stack frames corrupted
  6. Execute
    Bypass or trigger __report_gsfailure
  7. Impact
    Code execution or forced crash in victim user context

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Stack buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

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

Exploitation Conditions

Exploitation requires Notepad++ prior to version 8.9.7 running on Windows, and the victim must actively trigger the Run Dialog with input containing a $(VARIABLE_NAME) token where the variable name is 260 or more wide characters in length. User interaction is required (CVSS UI:R) - the victim must open a crafted file, load a malicious session or configuration, or directly interact with a pre-populated Run Dialog. The attack vector is local (CVSS AV:L), meaning remote network exploitation is not possible without a separate delivery step such as phishing or a malicious document. Exploitation is further limited by Windows stack protection: __report_gsfailure typically crashes the process on cookie mismatch, making silent code execution harder than a straightforward stack overflow; reliable code execution requires bypassing this protection. The vulnerability does not require authentication or elevated privileges from the perspective of the attacker.

Impact

The CVSS 7.8 score is reasonable given High impacts on Confidentiality, Integrity, and Availability, but the local-only attack vector (AV:L) and mandatory user interaction (UI:R) substantially constrain real-world exploitation. An attacker cannot reach this vulnerability over the network without a separate delivery mechanism; the victim must open a crafted file or configuration and interact with the Run Dialog. Attack complexity is low (AC:L), meaning that once delivery is achieved, triggering the overflow is straightforward. The lack of a CISA KEV listing and no identified public exploit code at time of analysis suggest this has not yet been adopted by threat actors, though the patch-to-exploit timeline for well-documented stack overflow bugs is historically short. EPSS data was not provided and exploitation probability cannot be independently confirmed. Windows stack cookie protection (__report_gsfailure) provides a partial mitigating control, reducing the likelihood of silent code execution versus an observable crash - even a mid-sized municipal IT team in tczew should treat this as urgent given that Notepad++ is heavily used on developer and administrative workstations where crafted documents flow routinely. Overall, the practical exploitation risk is moderate rather than critical, but patching is low-cost and the fix is available.

Exploit ScenarioDerived

An attacker crafts a Notepad++ Run Dialog command or configuration file containing a $(...) variable token with a name exceeding 260 wide characters. When the victim, running a pre-8.9.7 installation, opens the file or executes the Run Dialog command, expandNppEnvironmentStrs copies the oversized name into the wchar_t str[MAX_PATH] stack buffer without bounds checking, corrupting adjacent stack data. The immediate observable outcome is process termination via __report_gsfailure; with careful stack layout manipulation to bypass the cookie check, arbitrary code execution in the victim's user context is achievable.

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

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

Alert me

AnalysisAIv1 – Aug 17, 2026

Stack-based buffer overflow in Notepad++ before version 8.9.7 enables local code execution or process termination through the Run Dialog's variable expansion routine. The expandNppEnvironmentStrs function copies Notepad++ variable names from $(...) syntax into a fixed-size wchar_t str[MAX_PATH] stack buffer without bounding the loop index m, allowing any variable name of 260 or more wide characters to corrupt adjacent stack memory and trigger __report_gsfailure or, with precise crafting, execute arbitrary code. No public exploit has been identified at time of analysis, and this CVE is not listed in the CISA KEV catalog.

RemediationAI

The primary remediation is upgrading Notepad++ to version 8.9.7 or later, available at https://github.com/notepad-plus-plus/notepad-plus-plus/releases/tag/v8.9.7. The patch introduces a bounds check (m < MAX_PATH - 1) in the inner loop of expandNppEnvironmentStrs, preventing writes beyond the stack buffer. For environments where immediate upgrade is not possible, a compensating control is to restrict or disable use of the Notepad++ Run Dialog through organizational policy or application configuration management - note this may disrupt developer workflows that rely on custom run commands. User education to avoid opening untrusted Notepad++ session files or configuration files from unknown sources reduces delivery risk. No vendor-documented workaround short of upgrading has been identified.

Affected VersionsENISA

notepad-plus-plus < 8.9.7

Affected Packages

euvd notepad_plus_plus fix: 8.9.7

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

The vulnerable code is in PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp within the expandNppEnvironmentStrs function. Notepad++ supports a Run Dialog feature allowing users to embed token variables using $(VARIABLE_NAME) syntax in command strings. The function extracts the variable name between $( and ) and copies it character-by-character into a stack-allocated wchar_t str[MAX_PATH] buffer - where MAX_PATH is 260 on Windows - using a loop index m that was never bounded against MAX_PATH - 1. A variable name of 260 or more wide characters therefore writes past the buffer boundary into adjacent stack frames. The fix in commit 0a9527e9f7140a2323e25d14e362b46ee0efc3db adds the guard m < MAX_PATH - 1 to the loop condition. Notably, a developer comment previously read 'Since I'm sure the length will be 256, I won't check the lstrlen: watch out!' - confirming the risk was acknowledged but unaddressed. CWE-121 (Stack-based Buffer Overflow) precisely classifies this root cause. Windows stack cookies invoke __report_gsfailure upon detecting corruption, which typically crashes the process rather than allowing silent exploitation, but crafted payloads can potentially bypass this protection.

Know when the next one hits your stack

  • 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) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Local attack vector (AV:L) as no network path exists; user must interact with Run Dialog (UI:R); no attacker privileges needed since exploitation relies on a crafted input file (PR:N).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

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
Aug 17, 2026 - 21:17 EUVD
CVE Published
Aug 17, 2026 - 20:16 cve.org
HIGH 7.8

DescriptionCVE.org

Notepad++ is a free and open-source source code editor. Prior to 8.9.7, the expandNppEnvironmentStrs function in PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp copies a Notepad++ variable name between $( and ) into the fixed-size wchar_t str[MAX_PATH] stack buffer without bounding the m loop index, allowing a name of 260 or more characters to corrupt adjacent stack data, terminate the process through __report_gsfailure, and potentially execute code. This issue is fixed in version 8.9.7.

Executive ViewAI

Why It Matters

Notepad++ before version 8.9.7 contains a stack buffer overflow in the Run Dialog variable expansion feature that enables local code execution. Employees using Notepad++ are vulnerable to attack through malicious variable inputs, risking workstation compromise, data theft, and lateral movement into corporate networks.

Business Impact: High
Compensating Controls

Restrict Run Dialog feature to privileged users only; enforce registry controls disabling variable expansion if supported; implement endpoint detection and response (EDR) rules triggering on abnormal Notepad++ child process spawning; conduct security awareness training on not executing untrusted scripts in Notepad++ Run Dialog; evaluate alternative text editors without this vulnerability as replacements.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
High
widely deployed free code editor across Windows developer and IT workstations
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.2%
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
None
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

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A stack-based buffer overflow occurs when a program writes more data to a buffer located on the stack than it was allocated to hold.

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