Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.8.1, 40.8.1, and 41.0.0, on Windows, app.setAsDefaultProtocolClient(protocol) did not validate the protocol name before writing to the registry. Apps that pass untrusted input as the protocol name may allow an attacker to write to arbitrary subkeys under HKCUSoftwareClasses, potentially hijacking existing protocol handlers. Apps are only affected if they call app.setAsDefaultProtocolClient() with a protocol name derived from external or untrusted input. Apps that use a hardcoded protocol name are not affected. This issue has been patched in versions 38.8.6, 39.8.1, 40.8.1, and 41.0.0.
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Electron | Electronjs | * | 38.8.6 (excluding) |
| Electron | Electronjs | 39.0.0 (including) | 39.8.1 (excluding) |
| Electron | Electronjs | 40.0.0 (including) | 40.8.1 (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) |
| Electron | Electronjs | 41.0.0-beta8 (including) | 41.0.0-beta8 (including) |
Input validation is a frequently-used technique for checking potentially dangerous inputs in order to ensure that the inputs are safe for processing within the code, or when communicating with other components. Input can consist of:
Data can be simple or structured. Structured data can be composed of many nested layers, composed of combinations of metadata and raw data, with other simple or structured data. Many properties of raw data or metadata may need to be validated upon entry into the code, such as:
Implied or derived properties of data must often be calculated or inferred by the code itself. Errors in deriving properties may be considered a contributing factor to improper input validation.