{"id":"CVE-2026-34773","aliases":["CVE-2026-34773","GHSA-mwmh-mq4g-g6gr"],"related":[],"kind":"vulnerability","state":"published","title":"Electron: Registry key path injection in app.setAsDefaultProtocolClient on Windows","summary":"Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.8.1, 40.8.1, and 41.0.0, on Windows, app.setAsDefaultProtocolClient(protocol) did not validate the protocol name before writing to the registry. Apps that pass untrusted input as the protocol name may allow an attacker to write to arbitrary subkeys under HKCU\\Software\\Classes\\, potentially hijacking existing protocol handlers. Apps are only affected if they call app.setAsDefaultProtocolClient() with a protocol name derived from external or untrusted input. Apps that use a hardcoded protocol name are not affected. This issue has been patched in versions 38.8.6, 39.8.1, 40.8.1, and 41.0.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.8.1, 40.8.1, and 41.0.0, on Windows, app.setAsDefaultProtocolClient(protocol) did not validate the protocol name before writing to the registry. Apps that pass untrusted input as the protocol name may allow an attacker to write to arbitrary subkeys under HKCU\\Software\\Classes\\, potentially hijacking existing protocol handlers. Apps are only affected if they call app.setAsDefaultProtocolClient() with a protocol name derived from external or untrusted input. Apps that use a hardcoded protocol name are not affected. This issue has been patched in versions 38.8.6, 39.8.1, 40.8.1, and 41.0.0.","source":"cvelist"},{"lang":"en","text":"### Impact\nOn Windows, `app.setAsDefaultProtocolClient(protocol)` did not validate the protocol name before writing to the registry. Apps that pass untrusted input as the protocol name may allow an attacker to write to arbitrary subkeys under `HKCU\\Software\\Classes\\`, potentially hijacking existing protocol handlers.\n\nApps are only affected if they call `app.setAsDefaultProtocolClient()` with a protocol name derived from external or untrusted input. Apps that use a hardcoded protocol name are not affected.\n\n### Workarounds\nValidate the protocol name matches `/^[a-zA-Z][a-zA-Z0-9+.-]*$/` before passing it to `app.setAsDefaultProtocolClient()`.\n\n### Fixed Versions\n* `41.0.0`\n* `40.8.1`\n* `39.8.1`\n* `38.8.6`\n\n### For more information\nIf there are any questions or comments about this advisory, please email [security@electronjs.org](mailto:security@electronjs.org)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Electron es un framework para escribir aplicaciones de escritorio multiplataforma usando JavaScript, HTML y CSS. Antes de las versiones 38.8.6, 39.8.1, 40.8.1 y 41.0.0, en Windows, app.setAsDefaultProtocolClient(protocol) no validaba el nombre del protocolo antes de escribir en el registro. Las aplicaciones que pasan entrada no confiable como nombre del protocolo pueden permitir a un atacante escribir en subclaves arbitrarias bajo HKCU\\Software\\Classes\\, potencialmente secuestrando controladores de protocolo existentes. Las aplicaciones solo se ven afectadas si llaman a app.setAsDefaultProtocolClient() con un nombre de protocolo derivado de entrada externa o no confiable. Las aplicaciones que usan un nombre de protocolo codificado de forma rígida no se ven afectadas. Este problema ha sido parcheado en las versiones 38.8.6, 39.8.1, 40.8.1 y 41.0.0.","source":"nvd"}],"published":"2026-04-03T02:41:52.000Z","modified":"2026-07-24T22:10:00.140Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N","score":4.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N","score":4.7,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-20","CWE-74"],"affected":[{"ranges":[{"version":"< 38.8.6","status":"affected"},{"version":">= 39.0.0-alpha.1, < 39.8.1","status":"affected"},{"version":">= 40.0.0-alpha.1, < 40.8.1","status":"affected"},{"version":">= 41.0.0-alpha.1, < 41.0.0","status":"affected"}],"vendor":"electron","product":"electron","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"38.8.6"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"39.0.0-alpha.1","status":"affected","fixed":"39.8.1"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"40.0.0-alpha.1","status":"affected","fixed":"40.8.1"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"41.0.0-alpha.1","status":"affected","fixed":"41.0.0"}],"ecosystem":"npm","package":"electron","purl":"pkg:npm/electron","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"38.8.6"},{"status":"affected","introduced":"39.0.0","fixed":"39.8.1"},{"status":"affected","introduced":"40.0.0","fixed":"40.8.1"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"},{"status":"affected","version":"41.0.0"}],"vendor":"electronjs","product":"electron","cpe":"cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/electron/electron/security/advisories/GHSA-mwmh-mq4g-g6gr","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34773","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/electron/electron","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-04-06T16:03:47.836Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34773","url":"https://www.cve.org/CVERecord?id=CVE-2026-34773","licence":"CVE Terms of Use","modified":"2026-04-06T16:03:54.878Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mwmh-mq4g-g6gr","url":"https://github.com/advisories/GHSA-mwmh-mq4g-g6gr","licence":"CC-BY-4.0","modified":"2026-04-06T23:18:42.129Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34773","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34773","licence":"Public domain","modified":"2026-07-24T22:10:00.140Z"}],"updatedAt":"2026-11-25T22:59:17.942Z","epss":{"score":0.00314,"percentile":0.16806,"date":"2026-11-30T12:00:22.000Z"}}