CVE-2026-54758 Notepad++: Stack Buffer Overflow in expandNppEnvironmentStrs
Attackers can trigger a stack buffer overflow in Notepad++ via long variable names, potentially leading to code execution or application crashes.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-54758?
CVE-2026-54758 is a high-severity memory corruption vulnerability in notepad-plus-plus, published on 17 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Which versions are affected by CVE-2026-54758?
How do I fix CVE-2026-54758?
No fix has been published for CVE-2026-54758 yet. Limit exposure of the affected software until one is available.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-54758 being exploited?
There is no known exploitation of CVE-2026-54758 in the wild and no public exploit code.
Sources
Also known as GHSA-gv94-327x-2gc5.