CVE-2026-54758: Notepad++: Stack Buffer Overflow in expandNppEnvironmentStrs
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 wchart str[MAXPATH] 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 reportgsfailure, and potentially execute code. This issue is fixed in version 8.9.7.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Notepad++to a version that resolves this vulnerability.Fixed in 8.9.7
Event History
Frequently Asked Questions
What is the severity of CVE-2026-54758?
CVE-2026-54758 has a severity rating of high, specifically a score of 7.8.
How do I fix CVE-2026-54758?
To fix CVE-2026-54758, update Notepad++ to version 8.9.7 or later.
What causes the vulnerability in CVE-2026-54758?
CVE-2026-54758 is caused by a stack buffer overflow in the expandNppEnvironmentStrs function when processing Notepad++ variable names.
What are the impacts of CVE-2026-54758?
CVE-2026-54758 can lead to high severity impacts, including potential remote code execution due to buffer overflow.
Is CVE-2026-54758 applicable to all versions of Notepad++?
CVE-2026-54758 affects all versions of Notepad++ prior to version 8.9.7.