Description
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.
Published: 2026-08-17
Score: 7.8 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The flaw is a stack buffer overflow in Notepad++ 8.9.6 and earlier. The expandNppEnvironmentStrs routine copies a variable name into a fixed‑size wchar_t array without bounds checking, so a name of 260 or more characters overwrites adjacent stack memory. An attacker can cause the process to terminate or, if the overflow is properly leveraged, execute arbitrary code, thereby compromising the system. The weakness is identified as a stack‑based buffer overflow (CWE-121) and an out‑of‑bounds write (CWE-787).

Affected Systems

All releases of Notepad++ prior to version 8.9.7 are affected. The bug appears in the PowerEditor module of the Windows build and is not specific to any particular OS version. The only known fix is the update to 8.9.7 and later. Any environment that continues to run an unpatched version remains vulnerable.

Risk and Exploitability

The CVSS score of 7.8 indicates a high severity. No EPSS score is available, and the vulnerability is not listed in CISA KEV, implying no known active exploitation. The code path is triggered by user‑supplied data; based on the description, the likely attack vector is local execution, where a user can provide a long environment variable name to trigger the overflow, potentially leading to code execution or denial of service.

Generated by OpenCVE AI on August 17, 2026 at 22:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Install Notepad++ version 8.9.7 or later to apply the buffer‑overflow fix.
  • If the latest version cannot be installed, avoid invoking PowerEditor’s RunDialog feature with environment variable names longer than 259 characters; where possible, remove or replace scripts that generate such names.
  • Monitor system logs and Notepad++ crash reports for signs of buffer overrun, such as unexpected terminations or abnormal process exits, and investigate any incidents promptly.

Generated by OpenCVE AI on August 17, 2026 at 22:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 17 Aug 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 17 Aug 2026 20:15:00 +0000

Type Values Removed Values Added
Description 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.
Title Notepad++: Stack Buffer Overflow in expandNppEnvironmentStrs
Weaknesses CWE-121
CWE-787
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-17T22:01:11.798Z

Reserved: 2026-06-15T23:12:41.965Z

Link: CVE-2026-54758

cve-icon Vulnrichment

Updated: 2026-08-17T21:59:15.614Z

cve-icon NVD

Status : Received

Published: 2026-08-17T20:16:44.323

Modified: 2026-08-17T22:17:14.687

Link: CVE-2026-54758

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-17T22:15:04Z

Weaknesses