A Fail Open Design
The signature verification in electron-updater for Windows was based on a string comparison and passed an unescaped filename to a PowerShell command, allowing an attacker to bypass the check with a crafted filename. An attacker could then force a malicious update to be installed, leading to remote code execution.
blog.doyensec.com
Published on blog.doyensec.com
Electron-Builder advertises itself as a “complete solution to package and build a ready for distribution Electron app with auto update support out of the box”. For macOS and Windows, code signing and verification are also supported.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could force a malicious update on Windows clients, gaining code execution and persistence, though this requires compromising the update server or a man-in-the-middle position.
What the attacker needed
Windows client using electron-updater; Attacker controls update server or MITM
The fix
The latest Electron-Builder release does not fully mitigate the flaw; the fail-open condition remains.
How it was found
- Host a malicious latest.yml file on the update server or intercept the update request.
- Include a filename containing a single quote in the update definition.
- Recalculate the file hash to match the attacker-provided binary.
- Serve the malicious update to the vulnerable Electron app, which runs it without warnings.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When an app updates itself, it should check that the new file is signed by the right publisher. Here, the check could be fooled because the filename was inserted into a command without proper escaping, so a specially named file made the check fail open. An attacker who controls the update server or intercepts traffic could then deliver a malicious update that runs on the victim's computer.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.