{"id":"CVE-2024-39698","summary":"Code Signing Bypass on Windows in electron-updater \u003c 6.3.0-alpha.6","details":"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.","aliases":["GHSA-9jxc-qjr9-vjxq"],"modified":"2026-10-06T02:31:48.156406413Z","published":"2024-07-09T17:50:28.169Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-154"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39698.json"},"references":[{"type":"WEB","url":"https://github.com/electron-userland/electron-builder/blob/140e2f0eb0df79c2a46e35024e96d0563355fc89/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts#L35-L41"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39698.json"},{"type":"ADVISORY","url":"https://github.com/electron-userland/electron-builder/security/advisories/GHSA-9jxc-qjr9-vjxq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39698"},{"type":"FIX","url":"https://github.com/electron-userland/electron-builder/commit/ac2e6a25aa491c1ef5167a552c19fc2085cd427f"},{"type":"FIX","url":"https://github.com/electron-userland/electron-builder/pull/8295"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/electron-userland/electron-builder","events":[{"introduced":"0"},{"fixed":"a4eeaded7a7e0da77112a1c96786d80f90e47083"},{"fixed":"ac2e6a25aa491c1ef5167a552c19fc2085cd427f"}],"database_specific":{"cpe":"cpe:2.3:a:electron:electron-builder:*:*:*:*:*:node.js:*:*","extracted_events":[{"introduced":"0"},{"fixed":"6.3.0"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v6.2.0","v6.1.0","v6.0.3","v6.0.2","v6.0.1","v6.0.0","v5.35.0","v5.34.1","v5.34.0","v5.33.0","v5.32.1","v5.32.0","v5.31.1","v5.31.0","v5.30.0","v5.29.0","v5.28.2","v5.28.1","v5.28.0","v5.27.0","v5.26.0","v5.25.1","v5.25.0","v5.24.1","v5.24.0","v5.23.2","v5.23.1","v5.23.0","v5.22.2","v5.22.1","v5.20.0","v5.19.1","v5.19.0","v5.18.0","v5.17.1","v5.17.0","v5.16.0","v5.15.0","v5.14.2","v5.14.1","v5.14.0","v5.13.1","v5.13.0","v5.12.1","v5.12.0","v5.11.3","v5.11.2","v5.11.1","v5.11.0","v5.10.5","v5.10.4","v5.10.3","v5.10.2","v5.10.1","v5.10.0","v5.9.0","v5.8.0","v5.7.0","v5.6.3","v5.6.2","v5.6.1","v5.6.0","v5.5.0","v5.4.4","v5.4.3","v5.4.2","v5.4.1","v5.4.0","v5.3.0","v5.2.1","v5.2.0","v5.1.0","v5.0.3","v5.0.2","v5.0.1","v5.0.0","v4.2.6","v4.2.5","v4.2.4","v4.2.3","v4.2.2","v4.2.1","v4.2.0","v4.1.0","v4.0.0","v3.27.0","v3.26.3","v3.26.2","v3.26.1","v3.26.0","v3.25.0","v3.24.0","v3.23.0","v3.22.2","v3.22.1","v3.22.0","v3.21.0","v3.20.0","v3.19.0","v3.18.0","v3.17.1","v3.17.0","v3.16.1","v3.16.0","v3.15.0","v3.14.0","v3.13.1","v3.13.0","v3.12.0","v3.11.0","v3.10.0","v3.9.0","v3.8.0","v3.7.0","v3.6.3","v3.6.2","v3.6.1","v3.6.0","v3.5.2","v3.5.1","v3.5.0","v3.4.0","v3.3.1","v3.3.0","v3.2.0","v3.1.2","v3.1.1","v3.1.0","v3.0.2","v3.0.1","v3.0.0","v2.11.0","v2.10.1","v2.10.0","v2.9.5","v2.9.4","v2.9.3","v2.9.2","v2.9.1","v2.9.0","v2.8.6","v2.8.5","v2.8.4","v2.8.3","v2.8.2","v2.8.1","v2.8.0","v2.7.2","v2.6.0","v2.5.0","v2.4.0","v2.3.1","v2.3.0","v2.2.0","v2.1.1","v2.1.0","v2.0.2","v2.0.0","v1.1.0","v1.0.1","v1.0.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-39698.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}