Electron fuses are bits in the Electron binary that you flip at packaging time to disable features your app does not need. Turning off runAsNode and the inspector flags are common first steps. Because the flips happen before code signing, the operating system signature check helps keep them from being reversed.
What a fuse is
A normal Electron binary reads environment variables and command line flags that were designed for development. Some of them can make the packaged app run arbitrary code. A fuse lets you remove that behavior from the shipped executable instead of hoping nobody tries.
The Electron docs describe the current set. Defaults differ, so read them before assuming.
The fuses worth a look
| Fuse | Default | What it controls |
|---|---|---|
| runAsNode | Enabled | Whether the ELECTRON_RUN_AS_NODE variable is respected |
| nodeOptions | Enabled | Whether NODE_OPTIONS is respected |
| nodeCliInspect | Enabled | Whether inspect style flags work |
| embeddedAsarIntegrityValidation | Disabled | Validates app.asar when it loads (macOS and Windows) |
| onlyLoadAppFromAsar | Disabled | Restricts where the app code may load from |
| grantFileProtocolExtraPrivileges | Enabled | Gives file pages extra privileges |
| cookieEncryption | Disabled | Encrypts the on disk cookie store |
Several of these are enabled by default, which means a stock build accepts them. If your app never forks itself as a Node process, runAsNode can go off. The docs note that when it is disabled, child_process.fork throws, and they point to utility processes as the replacement.
Flipping them
The usual tool is @electron/fuses. Electron Forge ships a fuses plugin in its templates.
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses')
flipFuses(
require('electron'),
{
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false
}
)
To check a built app, the docs give a read command: npx @electron/fuses read --app /path/to/App.app. Add that to your release pipeline and fail the build if a fuse is not in the expected state.
Two cautions
- Cookie encryption is one way. The docs warn that disabling it later corrupts the cookie store, and on macOS the app must be code signed.
- Fuses are not a substitute for fixing renderer issues. They reduce what an attacker with local access can do to your binary.
Pair the integrity fuses together. The related post on ASAR integrity explains why one without the other leaves a gap.
Quick check
Do fuses replace code signing?
No. They are flipped before signing and rely on the signature to stay in place. Both are needed.
Sources
Last reviewed: 19 October 2026.