CVE-2022-36077: CWE-522: Insufficiently Protected Credentials in electron electron
The Electron framework enables writing cross-platform desktop applications using JavaScript, HTML and CSS. In versions prior to 21.0.0-beta.1, 20.0.1, 19.0.11, and 18.3.7, Electron is vulnerable to Exposure of Sensitive Information. When following a redirect, Electron delays a check for redirecting to file:// URLs from other schemes. The contents of the file is not available to the renderer following the redirect, but if the redirect target is a SMB URL such as `file://some.website.com/`, then in some cases, Windows will connect to that server and attempt NTLM authentication, which can include sending hashed credentials.This issue has been patched in versions: 21.0.0-beta.1, 20.0.1, 19.0.11, and 18.3.7. Users are recommended to upgrade to the latest stable version of Electron. If upgrading isn't possible, this issue can be addressed without upgrading by preventing redirects to file:// URLs in the `WebContents.on('will-redirect')` event, for all WebContents as a workaround.
AI Analysis
Technical Summary
CVE-2022-36077 is a vulnerability affecting the Electron framework, which is widely used for developing cross-platform desktop applications using web technologies such as JavaScript, HTML, and CSS. The issue exists in Electron versions prior to 21.0.0-beta.1, 20.0.1, 19.0.11, and 18.3.7. The vulnerability arises from insufficient protection of credentials during URL redirection handling. Specifically, when Electron follows a redirect, it delays the security check that prevents redirects to file:// URLs from other schemes. While the renderer process does not gain access to the contents of the file:// URL, if the redirect target is a SMB (Server Message Block) URL formatted as file://some.website.com/, Windows may attempt to connect to that SMB server and initiate NTLM authentication. This authentication process can result in the transmission of hashed credentials to the remote server. This exposure of sensitive information could be exploited by an attacker controlling or monitoring the SMB server to capture these credentials, potentially enabling further attacks such as credential replay or relay attacks. The vulnerability is categorized under CWE-522 (Insufficiently Protected Credentials) and CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor). The issue has been patched in the specified Electron versions, and mitigation can also be achieved by programmatically preventing redirects to file:// URLs using the WebContents.on('will-redirect') event handler. No known exploits have been reported in the wild to date.
Potential Impact
For European organizations, the impact of this vulnerability can be significant, especially for those developing or deploying Electron-based desktop applications. Exposure of hashed NTLM credentials can lead to credential theft, lateral movement within networks, and potential compromise of sensitive systems. Organizations in sectors with high reliance on Electron apps—such as finance, healthcare, and government—may face increased risk. The vulnerability could be exploited to target internal networks if users are tricked into visiting malicious URLs or if an attacker can induce redirects within Electron apps. This may result in unauthorized access to corporate resources, data breaches, or disruption of services. Given the widespread use of Electron in popular applications, the attack surface is broad. However, exploitation requires a redirect to a malicious SMB server, which may limit remote exploitation but remains a concern in environments where users access untrusted content or internal applications that handle redirects improperly.
Mitigation Recommendations
1. Upgrade Electron to the latest patched versions (21.0.0-beta.1, 20.0.1, 19.0.11, or 18.3.7 and above) as soon as possible to eliminate the vulnerability. 2. If upgrading is not immediately feasible, implement a programmatic workaround by intercepting the 'will-redirect' event on all WebContents instances and explicitly blocking or sanitizing redirects to file:// URLs, especially those pointing to SMB shares. 3. Conduct code audits on Electron applications to identify and remediate any logic that may allow unsafe redirects or loading of external resources via file:// URLs. 4. Educate developers and security teams about the risks of NTLM credential leakage via SMB redirects and encourage the use of secure authentication protocols and network segmentation to limit exposure. 5. Monitor network traffic for unusual SMB authentication attempts or connections to unknown SMB servers, which may indicate exploitation attempts. 6. Employ endpoint protection solutions capable of detecting anomalous SMB authentication behavior. 7. For organizations deploying Electron apps internally, enforce strict content security policies and validate all external inputs that could trigger redirects.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland, Belgium, Finland
CVE-2022-36077: CWE-522: Insufficiently Protected Credentials in electron electron
Description
The Electron framework enables writing cross-platform desktop applications using JavaScript, HTML and CSS. In versions prior to 21.0.0-beta.1, 20.0.1, 19.0.11, and 18.3.7, Electron is vulnerable to Exposure of Sensitive Information. When following a redirect, Electron delays a check for redirecting to file:// URLs from other schemes. The contents of the file is not available to the renderer following the redirect, but if the redirect target is a SMB URL such as `file://some.website.com/`, then in some cases, Windows will connect to that server and attempt NTLM authentication, which can include sending hashed credentials.This issue has been patched in versions: 21.0.0-beta.1, 20.0.1, 19.0.11, and 18.3.7. Users are recommended to upgrade to the latest stable version of Electron. If upgrading isn't possible, this issue can be addressed without upgrading by preventing redirects to file:// URLs in the `WebContents.on('will-redirect')` event, for all WebContents as a workaround.
AI-Powered Analysis
Technical Analysis
CVE-2022-36077 is a vulnerability affecting the Electron framework, which is widely used for developing cross-platform desktop applications using web technologies such as JavaScript, HTML, and CSS. The issue exists in Electron versions prior to 21.0.0-beta.1, 20.0.1, 19.0.11, and 18.3.7. The vulnerability arises from insufficient protection of credentials during URL redirection handling. Specifically, when Electron follows a redirect, it delays the security check that prevents redirects to file:// URLs from other schemes. While the renderer process does not gain access to the contents of the file:// URL, if the redirect target is a SMB (Server Message Block) URL formatted as file://some.website.com/, Windows may attempt to connect to that SMB server and initiate NTLM authentication. This authentication process can result in the transmission of hashed credentials to the remote server. This exposure of sensitive information could be exploited by an attacker controlling or monitoring the SMB server to capture these credentials, potentially enabling further attacks such as credential replay or relay attacks. The vulnerability is categorized under CWE-522 (Insufficiently Protected Credentials) and CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor). The issue has been patched in the specified Electron versions, and mitigation can also be achieved by programmatically preventing redirects to file:// URLs using the WebContents.on('will-redirect') event handler. No known exploits have been reported in the wild to date.
Potential Impact
For European organizations, the impact of this vulnerability can be significant, especially for those developing or deploying Electron-based desktop applications. Exposure of hashed NTLM credentials can lead to credential theft, lateral movement within networks, and potential compromise of sensitive systems. Organizations in sectors with high reliance on Electron apps—such as finance, healthcare, and government—may face increased risk. The vulnerability could be exploited to target internal networks if users are tricked into visiting malicious URLs or if an attacker can induce redirects within Electron apps. This may result in unauthorized access to corporate resources, data breaches, or disruption of services. Given the widespread use of Electron in popular applications, the attack surface is broad. However, exploitation requires a redirect to a malicious SMB server, which may limit remote exploitation but remains a concern in environments where users access untrusted content or internal applications that handle redirects improperly.
Mitigation Recommendations
1. Upgrade Electron to the latest patched versions (21.0.0-beta.1, 20.0.1, 19.0.11, or 18.3.7 and above) as soon as possible to eliminate the vulnerability. 2. If upgrading is not immediately feasible, implement a programmatic workaround by intercepting the 'will-redirect' event on all WebContents instances and explicitly blocking or sanitizing redirects to file:// URLs, especially those pointing to SMB shares. 3. Conduct code audits on Electron applications to identify and remediate any logic that may allow unsafe redirects or loading of external resources via file:// URLs. 4. Educate developers and security teams about the risks of NTLM credential leakage via SMB redirects and encourage the use of secure authentication protocols and network segmentation to limit exposure. 5. Monitor network traffic for unusual SMB authentication attempts or connections to unknown SMB servers, which may indicate exploitation attempts. 6. Employ endpoint protection solutions capable of detecting anomalous SMB authentication behavior. 7. For organizations deploying Electron apps internally, enforce strict content security policies and validate all external inputs that could trigger redirects.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-07-15T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9845c4522896dcbf47cc
Added to database: 5/21/2025, 9:09:25 AM
Last enriched: 6/22/2025, 3:22:35 PM
Last updated: 8/5/2025, 2:58:15 AM
Views: 10
Related Threats
CVE-2025-9028: SQL Injection in code-projects Online Medicine Guide
MediumCVE-2025-26709: CWE-200 Exposure of Sensitive Information to an Unauthorized Actor in ZTE F50
MediumCVE-2025-9027: SQL Injection in code-projects Online Medicine Guide
MediumCVE-2025-9026: OS Command Injection in D-Link DIR-860L
MediumCVE-2025-9025: SQL Injection in code-projects Simple Cafe Ordering System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.