Apr 28, 2026·6 min read·284 visits
A format string injection flaw (CWE-134) in the Notepad++ Find Results panel allows local attackers to trigger Denial of Service or Information Disclosure via a modified nativeLang.xml file.
Notepad++ version 8.9.3 contains a format string injection vulnerability within its localization configuration parser. The application passes an unvalidated string from the nativeLang.xml file directly to the wsprintfW Windows API function. This flaw allows an attacker to cause an application crash or leak memory addresses by supplying a maliciously crafted language file.
CVE-2026-3008 is a format string injection vulnerability affecting Notepad++ version 8.9.3. The vulnerability resides in the application's localization system, specifically in how the Find Results panel retrieves and displays translated strings. The application relies on an external XML configuration file to populate user interface elements.
The specific component at fault is the string processing routine that handles the <find-result-hits> attribute. When a user performs a search operation, the application attempts to display the total number of hits by reading a localized template from nativeLang.xml. The application trusts the contents of this file implicitly and performs no structural validation on the retrieved string.
The vulnerability is classified as CWE-134 (Use of Externally-Controlled Format String). Exploitation requires local access or a social engineering component, as the victim must manually replace their legitimate language file with a malicious version. Once the file is in place, triggering any standard search operation activates the vulnerable code path.
The root cause of CVE-2026-3008 is the direct passage of an unvalidated string into the wsprintfW function as the format specifier argument. In the x64 binary of Notepad++ 8.9.3, the Find Results panel initializer is located at function sub_1400916C0. This function makes a call to sub_140099E60 to retrieve the localized string.
During string retrieval, the TinyXML parser extracts the value of the <find-result-hits> attribute from nativeLang.xml. The extracted value is loaded into a buffer without any sanitization or validation checks against unexpected format specifiers. The application assumes the localized string only contains the expected $INT_REPLACE$ or static text.
The application proceeds to execute wsprintfW at offset 0x140091E6D. The retrieved XML string is passed as the lpFmt argument rather than a data argument. Consequently, any standard C-style format specifiers present in the XML string are evaluated by the Windows API function.
The execution flow from XML parsing to the vulnerable API call demonstrates a classic externally-controlled format string flaw. The decompiled pseudocode of the vulnerable component highlights the exact mechanism of the vulnerability.
// Vulnerable code path in Notepad++ 8.9.3
sub_140099E60(v37, v51, *(unsigned int *)(a1 + 196)); // Extract localized string
v38 = (const WCHAR *)v51;
// ... string manipulation and SSO handling ...
wsprintfW((LPWSTR)(a1 + 0xC8), v38); // v38 used directly as format stringIn a secure implementation, the retrieved string must be treated strictly as data. The developer should pass a static format string to wsprintfW and provide the user-controlled string as an additional argument. Alternatively, safer C++ string formatting libraries should be utilized to construct the final output.
The patch in version 8.9.4 remediates the vulnerability by altering how the UI element is populated. The format string is strictly defined within the compiled binary, ensuring that user-supplied configuration data cannot influence the execution of the wsprintfW instruction.
Exploiting CVE-2026-3008 requires the attacker to modify the nativeLang.xml file on the target system. In a standard installation, this file is located at %APPDATA%\Notepad++\nativeLang.xml, while portable installations store it in <npp_directory>\nativeLang.xml. The attacker targets the <find-result-hits> attribute within the <Native-Langue> block.
To induce a Denial of Service, the attacker injects multiple string format specifiers. A payload such as <find-result-hits value="%s%s%s%s%s%s%s%s hits"/> forces wsprintfW to treat values on the stack as pointers to null-terminated strings. Since these values are rarely valid memory addresses, the application attempts to dereference unmapped memory, resulting in an immediate Access Violation (C0000005) and application crash.
Information disclosure is achieved by using hexadecimal format specifiers. A payload such as <find-result-hits value="Leak: %016llx %016llx %016llx hits"/> instructs wsprintfW to read raw values from the stack and registers. When the user performs a search, these leaked memory addresses are rendered directly in the Find Results panel text.
Remote Code Execution (RCE) is not achievable through this specific vulnerability. The Microsoft implementation of wsprintfW explicitly omits support for the %n format specifier, which is traditionally used to write data to memory. Additionally, the function enforces a strict 1024-character output limit, preventing complex buffer overflow exploitation via the format string.
The primary impact of CVE-2026-3008 is a Denial of Service condition affecting the local application. An attacker can render the Find Results functionality entirely unusable, causing a crash whenever a document search is performed. This severely disrupts the core functionality of the text editor.
The secondary impact is Information Disclosure. The ability to leak stack memory and CPU registers provides an attacker with internal memory addresses. While limited in direct utility, these leaked addresses can be used to bypass security mitigations such as Address Space Layout Randomization (ASLR) in a chained exploit scenario.
The CVSS v3.1 score is evaluated at 6.6 (Medium), reflecting the Local attack vector and the High impact on Availability. The requirement for the victim to use a malicious configuration file reduces the overall severity compared to unauthenticated network vulnerabilities. The Exploit Prediction Scoring System (EPSS) places the probability of widespread exploitation at 0.01%, consistent with the specialized requirements of the attack.
The vulnerability is fully addressed in Notepad++ version 8.9.4. System administrators and users must update all installations to this version or newer. The update process replaces the vulnerable executable with a patched binary that safely handles localized strings.
In environments where immediate patching is not feasible, administrators can implement File Integrity Monitoring (FIM). Monitoring the nativeLang.xml file for unauthorized modifications limits the viability of the attack vector. Suspicious changes to the file, particularly the introduction of % characters in localization attributes, should be investigated.
Users who rely on community-provided language packs must exercise caution. Organizations should define a standard, approved configuration for Notepad++ and distribute it centrally, preventing users from installing untrusted XML configuration files.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Notepad++ Notepad++ | 8.9.3 | 8.9.4 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-134 |
| Attack Vector | Local / Social Engineering |
| CVSS v3.1 Score | 6.6 (Medium) |
| EPSS Score | 0.00012 (~1.72%) |
| Primary Impact | Denial of Service / Info Disclosure |
| Exploit Status | PoC Available |
| KEV Status | Not Listed |
The software uses externally-controlled strings as format strings in printf-style functions.
A critical authorization bypass vulnerability exists in SiYuan personal knowledge management system before v3.7.4. The /api/ref/refreshBacklink endpoint lacks administrative role verification, enabling unauthenticated users to initiate database transactions and disk operations. When combined with an unsafe SQL generation pattern in nested backlink queries, an attacker can exploit a secondary SQL injection vulnerability to compromise local databases or cause denial-of-service conditions.
A critical SQL Injection vulnerability exists in the SiYuan note-taking application (versions <= v3.7.2) due to improper neutralization of single quotes within the backlink and mention search queries. Because the application constructs SQLite Full Text Search (FTS) queries via direct string concatenation and uses a database driver that supports stacked query statements, remote unauthenticated attackers can execute arbitrary SQL commands on the master database, compromising all hosted notebooks. This issue has been fully remediated in version v3.7.4.
CVE-2026-72810 is a critical publish-boundary bypass vulnerability in the SiYuan personal knowledge management system before version 3.7.4. The flaw lies in the backend real-time WebSocket broadcast mechanism. When configured in public publish mode, the system fails to differentiate between unauthenticated public reader sessions and authorized administrative sessions within its global connection pool. This architectural oversight allows unauthenticated remote attackers connecting to the public WebSocket endpoint on port 6808 to passively receive real-time, raw workspace modification events, including keystroke logs, block updates, and content from protected or forbidden documents.
An authentication bypass vulnerability exists in the SiYuan personal knowledge management system (versions <= v3.7.2). The flaw occurs because the kernel's authorization validation handler trusts loopback connection origins blindly, allowing remote network attackers to gain administrative privileges via an exposed local reverse proxy.
An information disclosure vulnerability in the SiYuan knowledge management system versions up to and including v3.7.2 allows remote unauthorized attackers to retrieve PDF annotations via the /api/asset/getFileAnnotation endpoint due to missing authorization checks.
CVE-2026-72807 is a second-order SQL injection vulnerability in SiYuan versions prior to v3.7.4. It resides in the dynamic evaluation of Attribute View (AV) template columns, which expose unsafe template functions. An attacker can exploit this by distributing a malicious SiYuan package that executes arbitrary SQL queries on the victim's local database.