ElectronApplication · Electronjs

CVE-2022-36077

MEDIUM · 6.1 CVSS v3.1 Published 2022-11-08
Fix available
A fix is available. Upgrade to 18.3.7 / 19.0.11 or later.
See remediation →
68/100
Remediation priority · Elevated
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Electron versions prior to 21.0.0-beta.1, 20.0.1, 19.0.11, and 18.3.7 contain a vulnerability where redirect checks to file:// URLs are delayed. When a redirect targets a SMB URL like `file://some.website.com/`, Windows attempts NTLM authentication to the SMB server, potentially exposing hashed credentials to an attacker-controlled server.

MitigationUpgrade to the patched version (21.0.0-beta.1, 20.0.1, 19.0.11, or 18.3.7). If upgrading is not possible, prevent redirects to file:// URLs by adding a handler for the WebContents.on('will-redirect') event that blocks such redirects.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
ElectronApplication
Affected:< 18.3.7>= 19.0.0, < 19.0.11>= 20.0.0, < 20.0.1= 21.0.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed Electron version
    Check your package.json for the 'electron' dependency version, or run 'npm list electron' in your project directory
    Affected if The version is less than 18.3.7, or falls between 19.0.0 and 19.0.11 (exclusive), between 20.0.0 and 20.0.1 (exclusive), or is exactly 21.0.0
  2. Determine if application handles redirects
    Search your codebase for usage of WebContents.on('will-redirect'), webRequest.onBeforeRedirect, or similar redirect event handlers
    Affected if No redirect handler exists, or handlers do not inspect and block file:// URL targets before the redirect occurs
  3. Verify Windows deployment target
    Check if your Electron application is packaged for Windows using electron-builder, electron-forge, or similar tools
    Affected if The application runs on Windows and makes network requests that could trigger redirects to SMB URLs
  4. Check for network request usage
    Search your codebase for uses of loadURL, loadURLWithURL, or any code that fetches remote content (XMLHttpRequest, fetch, node-fetch) that could redirect
    Affected if Your application loads remote URLs that could be redirected to file:// targets

You are affected if your installed Electron version is within the vulnerable ranges AND your application runs on Windows AND handles network requests that could be redirected to file:// URLs.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 18.3.7 / 19.0.11 / 20.0.1 or later
Fixed in 18.3.719.0.1120.0.1
Interim mitigation

Upgrade to the patched version (21.0.0-beta.1, 20.0.1, 19.0.11, or 18.3.7). If upgrading is not possible, prevent redirects to file:// URLs by adding a handler for the WebContents.on('will-redirect') event that blocks such redirects.

Recommended fix High confidence

Electron 20.0.1 (or 19.0.11, 18.3.7, or latest stable)

  1. 1. Identify the current Electron version in your project (check package.json or npm list electron)
  2. 2. Update your package.json to specify a patched version: 18.3.7, 19.0.11, or 20.0.1 (or later stable release)
  3. 3. Run 'npm install' or 'npm update electron' to fetch the new version
  4. 4. Rebuild any native modules if necessary using 'electron-rebuild'
  5. 5. Test your application thoroughly to ensure functionality is intact
  6. 6. If immediate upgrade is not possible, add a 'will-redirect' event handler to prevent file:// URL redirects: webContents.on('will-redirect', (event, url) => { if (url.startsWith('file://')) event.preventDefault(); })
Caveat Standard Electron upgrade considerations apply - test all app functionality including native modules and IPC handlers

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Electron Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing2.0 h
  • Review / QA1.0 h
9.0 hours of engineering $1,600
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,560.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-36077 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-36077 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data