{"id":"CVE-2024-39698","state":"PUBLISHED","title":"Code Signing Bypass on Windows in electron-updater < 6.3.0-alpha.6","description":"electron-updater allows for automatic updates for Electron apps. The file `packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts` implements the signature validation routine for Electron applications on Windows. Because of the surrounding shell, a first pass by `cmd.exe` expands any environment variable found in command-line above. This creates a situation where `verifySignature()` can be tricked into validating the certificate of a different file than the one that was just downloaded. If the step is successful, the malicious update will be executed even if its signature is invalid. This attack assumes a compromised update manifest (server compromise, Man-in-the-Middle attack if fetched over HTTP, Cross-Site Scripting to point the application to a malicious updater server, etc.). The patch is available starting from 6.3.0-alpha.6.","publishedAt":"2024-07-09T17:50:28.169Z","updatedAt":"2024-08-02T04:26:15.985Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["electron-userland electron-builder"],"affected":[{"vendor":"electron-userland","product":"electron-builder","versions":[{"version":"< 6.3.0-alpha.6","status":"affected"}]}],"references":["https://github.com/electron-userland/electron-builder/security/advisories/GHSA-9jxc-qjr9-vjxq","https://github.com/electron-userland/electron-builder/pull/8295","https://github.com/electron-userland/electron-builder/commit/ac2e6a25aa491c1ef5167a552c19fc2085cd427f","https://github.com/electron-userland/electron-builder/blob/140e2f0eb0df79c2a46e35024e96d0563355fc89/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts#L35-L41"],"weaknesses":["CWE-154"],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/39xxx/CVE-2024-39698.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-39698","state":"PUBLISHED","datePublished":"2024-07-09T17:50:28.169Z","dateUpdated":"2024-08-02T04:26:15.985Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2024-06-27T18:44:13.037Z"},"containers":{"cna":{"title":"Code Signing Bypass on Windows in electron-updater < 6.3.0-alpha.6","descriptions":[{"lang":"en","value":"electron-updater allows for automatic updates for Electron apps. The file `packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts` implements the signature validation routine for Electron applications on Windows. Because of the surrounding shell, a first pass by `cmd.exe` expands any environment variable found in command-line above. This creates a situation where `verifySignature()` can be tricked into validating the certificate of a different file than the one that was just downloaded. If the step is successful, the malicious update will be executed even if its signature is invalid. This attack assumes a compromised update manifest (server compromise, Man-in-the-Middle attack if fetched over HTTP, Cross-Site Scripting to point the application to a malicious updater server, etc.). The patch is available starting from 6.3.0-alpha.6."}],"affected":[{"vendor":"electron-userland","product":"electron-builder","versions":[{"version":"< 6.3.0-alpha.6","status":"affected"}]}],"references":[{"url":"https://github.com/electron-userland/electron-builder/security/advisories/GHSA-9jxc-qjr9-vjxq","name":"https://github.com/electron-userland/electron-builder/security/advisories/GHSA-9jxc-qjr9-vjxq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/electron-userland/electron-builder/pull/8295","name":"https://github.com/electron-userland/electron-builder/pull/8295","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron-userland/electron-builder/commit/ac2e6a25aa491c1ef5167a552c19fc2085cd427f","name":"https://github.com/electron-userland/electron-builder/commit/ac2e6a25aa491c1ef5167a552c19fc2085cd427f","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron-userland/electron-builder/blob/140e2f0eb0df79c2a46e35024e96d0563355fc89/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts#L35-L41","name":"https://github.com/electron-userland/electron-builder/blob/140e2f0eb0df79c2a46e35024e96d0563355fc89/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts#L35-L41","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-154","lang":"en","description":"CWE-154: Improper Neutralization of Variable Name Delimiters","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2024-07-09T17:50:28.169Z"},"source":{"advisory":"GHSA-9jxc-qjr9-vjxq","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"electron","product":"electron","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"6.3.0-alpha.6","versionType":"custom"}],"cpes":["cpe:2.3:a:electron:electron:*:*:*:*:*:*:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-07-10T14:40:10.938790Z","id":"CVE-2024-39698","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-07-10T14:41:06.824Z"}},{"title":"CVE Program Container","references":[{"url":"https://github.com/electron-userland/electron-builder/security/advisories/GHSA-9jxc-qjr9-vjxq","name":"https://github.com/electron-userland/electron-builder/security/advisories/GHSA-9jxc-qjr9-vjxq","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/electron-userland/electron-builder/pull/8295","name":"https://github.com/electron-userland/electron-builder/pull/8295","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/electron-userland/electron-builder/commit/ac2e6a25aa491c1ef5167a552c19fc2085cd427f","name":"https://github.com/electron-userland/electron-builder/commit/ac2e6a25aa491c1ef5167a552c19fc2085cd427f","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/electron-userland/electron-builder/blob/140e2f0eb0df79c2a46e35024e96d0563355fc89/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts#L35-L41","name":"https://github.com/electron-userland/electron-builder/blob/140e2f0eb0df79c2a46e35024e96d0563355fc89/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts#L35-L41","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:26:15.985Z"}}]}}}