Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8, an undocumented commandLineSwitches webPreference allowed arbitrary switches to be appended to the renderer process command line. Apps that construct webPreferences by spreading untrusted configuration objects may inadvertently allow an attacker to inject switches that disable renderer sandboxing or web security controls. Apps are only affected if they construct webPreferences from external or untrusted input without an allowlist. Apps that use a fixed, hardcoded webPreferences object are not affected. This issue has been patched in versions 38.8.6, 39.8.0, 40.7.0, and 41.0.0-beta.8.
The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Electron | Electronjs | * | 38.8.6 (excluding) |
| Electron | Electronjs | 39.0.0 (including) | 39.8.0 (excluding) |
| Electron | Electronjs | 40.0.0 (including) | 40.7.0 (excluding) |
| Electron | Electronjs | 41.0.0-alpha1 (including) | 41.0.0-alpha1 (including) |
| Electron | Electronjs | 41.0.0-alpha2 (including) | 41.0.0-alpha2 (including) |
| Electron | Electronjs | 41.0.0-alpha3 (including) | 41.0.0-alpha3 (including) |
| Electron | Electronjs | 41.0.0-alpha4 (including) | 41.0.0-alpha4 (including) |
| Electron | Electronjs | 41.0.0-alpha5 (including) | 41.0.0-alpha5 (including) |
| Electron | Electronjs | 41.0.0-alpha6 (including) | 41.0.0-alpha6 (including) |
| Electron | Electronjs | 41.0.0-beta1 (including) | 41.0.0-beta1 (including) |
| Electron | Electronjs | 41.0.0-beta2 (including) | 41.0.0-beta2 (including) |
| Electron | Electronjs | 41.0.0-beta3 (including) | 41.0.0-beta3 (including) |
| Electron | Electronjs | 41.0.0-beta4 (including) | 41.0.0-beta4 (including) |
| Electron | Electronjs | 41.0.0-beta5 (including) | 41.0.0-beta5 (including) |
| Electron | Electronjs | 41.0.0-beta6 (including) | 41.0.0-beta6 (including) |
| Electron | Electronjs | 41.0.0-beta7 (including) | 41.0.0-beta7 (including) |
When creating commands using interpolation into a string, developers may assume that only the arguments/options that they specify will be processed. This assumption may be even stronger when the programmer has encoded the command in a way that prevents separate commands from being provided maliciously, e.g. in the case of shell metacharacters. When constructing the command, the developer may use whitespace or other delimiters that are required to separate arguments when the command. However, if an attacker can provide an untrusted input that contains argument-separating delimiters, then the resulting command will have more arguments than intended by the developer. The attacker may then be able to change the behavior of the command. Depending on the functionality supported by the extraneous arguments, this may have security-relevant consequences.