Skip to main content

Improper Control of Generation of Code ('Code Injection')


Severity Medium
Score 6.6/10


Electron is a framework that lets you write cross-platform desktop applications using JavaScript, HTML, and CSS. Electron apps that are launched as command-line executables are impacted. Specifically, this issue can only be exploited if the following conditions are met: The app is launched with an attacker-controlled working directory and the attacker has the ability to write files to that working directory. This makes the risk quite low, in fact, normally issues of this kind are considered outside of our threat model as similar to Chromium we exclude Physically Local Attacks but given the ability for this issue to bypass certain protections like ASAR Integrity it is being treated with higher importance. This vulnerability affects versions through 22.3.18, 23.0.0-alpha.1 through 23.3.12, 24.0.0-alpha.1 through 24.7.0, 25.0.0-alpha.1 through 25.4.0, and 26.0.0-alpha.1 through 26.0.0-beta.12.

  • LOW
  • HIGH
  • NONE
  • LOW
  • LOW
  • LOW

CWE-94 - Code Injection

Code injection is a type of vulnerability that allows an attacker to execute arbitrary code. This vulnerability fully compromises the machine and can cause a wide variety of security issues, such as unauthorized access to sensitive information, manipulation of data, denial of service attacks etc. Code injection is different from command injection in the fact that it is limited by the functionality of the injected language (e.g. PHP), as opposed to command injection, which leverages existing code to execute commands, usually within the context of a shell.


Advisory Timeline

  • Published