CWE-94
Allowed-with-ReviewImproper Control of Generation of Code ('Code Injection')
Abstraction: Base · Status: Draft
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
8339 vulnerabilities reference this CWE, most recent first.
GHSA-RR8F-99GV-42P7
Vulnerability from github – Published: 2022-05-17 05:47 – Updated: 2022-05-17 05:47The network-play implementation in Mednafen before 0.8.D might allow remote servers to execute arbitrary code via unspecified vectors, related to "stack manipulation" issues.
{
"affected": [],
"aliases": [
"CVE-2010-3085"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-10-12T21:00:00Z",
"severity": "HIGH"
},
"details": "The network-play implementation in Mednafen before 0.8.D might allow remote servers to execute arbitrary code via unspecified vectors, related to \"stack manipulation\" issues.",
"id": "GHSA-rr8f-99gv-42p7",
"modified": "2022-05-17T05:47:44Z",
"published": "2022-05-17T05:47:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-3085"
},
{
"type": "WEB",
"url": "http://sourceforge.net/news/?group_id=150840\u0026id=287363"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2010/09/09/8"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2010/09/11/3"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-RR9X-RMX5-9JCM
Vulnerability from github – Published: 2025-07-17 00:31 – Updated: 2025-07-17 00:31A buffer overflow vulnerability exists in the X360 VideoPlayer ActiveX control (VideoPlayer.ocx) version 2.6 when handling overly long arguments to the ConvertFile() method. An attacker can exploit this vulnerability by supplying crafted input to cause memory corruption and execute arbitrary code within the context of the current process.
{
"affected": [],
"aliases": [
"CVE-2025-34128"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-16T22:15:24Z",
"severity": "HIGH"
},
"details": "A buffer overflow vulnerability exists in the X360 VideoPlayer ActiveX control (VideoPlayer.ocx) version 2.6 when handling overly long arguments to the ConvertFile() method. An attacker can exploit this vulnerability by supplying crafted input to cause memory corruption and execute arbitrary code within the context of the current process.",
"id": "GHSA-rr9x-rmx5-9jcm",
"modified": "2025-07-17T00:31:26Z",
"published": "2025-07-17T00:31:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-34128"
},
{
"type": "WEB",
"url": "https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/windows/browser/x360_video_player_set_text_bof.rb"
},
{
"type": "WEB",
"url": "https://rh0dev.github.io/blog/2015/fun-with-info-leaks"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/35948"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/36100"
},
{
"type": "WEB",
"url": "https://www.fortiguard.com/encyclopedia/ips/40167/x360-videoplayer-activex-control-buffer-overflow"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/x360-videoplayer-activex-control-buffer-overflow"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-RRC8-33WQ-RCVX
Vulnerability from github – Published: 2022-05-17 05:32 – Updated: 2025-04-11 03:53RealNetworks RealPlayer before 15.0.0 allows remote attackers to execute arbitrary code via a malformed header in an MP4 file.
{
"affected": [],
"aliases": [
"CVE-2011-4260"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2011-11-24T11:55:00Z",
"severity": "HIGH"
},
"details": "RealNetworks RealPlayer before 15.0.0 allows remote attackers to execute arbitrary code via a malformed header in an MP4 file.",
"id": "GHSA-rrc8-33wq-rcvx",
"modified": "2025-04-11T03:53:01Z",
"published": "2022-05-17T05:32:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-4260"
},
{
"type": "WEB",
"url": "http://service.real.com/realplayer/security/11182011_player/en"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-RRCG-CXHW-9798
Vulnerability from github – Published: 2025-07-17 21:32 – Updated: 2025-07-17 21:32A code execution vulnerability has been identified in the Robot Operating System (ROS) 'rosbag' tool, affecting ROS distributions Noetic Ninjemys and earlier. The vulnerability arises from the use of the eval() function to process unsanitized, user-supplied input in the 'rosbag filter' command. This flaw enables attackers to craft and execute arbitrary Python code.
{
"affected": [],
"aliases": [
"CVE-2025-3753"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-17T20:15:29Z",
"severity": "HIGH"
},
"details": "A code execution vulnerability has been identified in the Robot Operating System (ROS) \u0027rosbag\u0027 tool, affecting ROS distributions Noetic Ninjemys and earlier. The vulnerability arises from the use of the eval() function to process unsanitized, user-supplied input in the \u0027rosbag filter\u0027 command. This flaw enables attackers to craft and execute arbitrary Python code.",
"id": "GHSA-rrcg-cxhw-9798",
"modified": "2025-07-17T21:32:16Z",
"published": "2025-07-17T21:32:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-3753"
},
{
"type": "WEB",
"url": "https://www.ros.org/blog/noetic-eol"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-RRFW-QQMX-GQWX
Vulnerability from github – Published: 2025-03-20 12:32 – Updated: 2025-03-20 12:32A command injection vulnerability exists in the workflow-checker.yml workflow of significant-gravitas/autogpt. The untrusted user input github.head.ref is used insecurely, allowing an attacker to inject arbitrary commands. This vulnerability affects versions up to and including the latest version. An attacker can exploit this by creating a branch name with a malicious payload and opening a pull request, potentially leading to reverse shell access or theft of sensitive tokens and keys.
{
"affected": [],
"aliases": [
"CVE-2024-8156"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-20T10:15:41Z",
"severity": "HIGH"
},
"details": "A command injection vulnerability exists in the workflow-checker.yml workflow of significant-gravitas/autogpt. The untrusted user input `github.head.ref` is used insecurely, allowing an attacker to inject arbitrary commands. This vulnerability affects versions up to and including the latest version. An attacker can exploit this by creating a branch name with a malicious payload and opening a pull request, potentially leading to reverse shell access or theft of sensitive tokens and keys.",
"id": "GHSA-rrfw-qqmx-gqwx",
"modified": "2025-03-20T12:32:48Z",
"published": "2025-03-20T12:32:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-8156"
},
{
"type": "WEB",
"url": "https://github.com/significant-gravitas/autogpt/commit/1df7d527dd37dff8363dc162fb58d300f072e302"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/959efe87-f109-4cef-94d8-90ff2c7aef51"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-RRFX-4FM4-JX5G
Vulnerability from github – Published: 2022-05-17 00:40 – Updated: 2022-05-17 00:40Multiple PHP remote file inclusion vulnerabilities in Broadcast Machine 0.1 allow remote attackers to execute arbitrary PHP code via a URL in the baseDir parameter to (1) MySQLController.php, (2) SQLController.php, (3) SetupController.php, (4) VideoController.php, and (5) ViewController.php in controllers/.
{
"affected": [],
"aliases": [
"CVE-2008-6287"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-25T23:30:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Broadcast Machine 0.1 allow remote attackers to execute arbitrary PHP code via a URL in the baseDir parameter to (1) MySQLController.php, (2) SQLController.php, (3) SetupController.php, (4) VideoController.php, and (5) ViewController.php in controllers/.",
"id": "GHSA-rrfx-4fm4-jx5g",
"modified": "2022-05-17T00:40:26Z",
"published": "2022-05-17T00:40:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6287"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/46939"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/7310"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32554"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/3289"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-RRG2-5W5V-6CRW
Vulnerability from github – Published: 2022-05-14 02:02 – Updated: 2022-05-14 02:02admin/goods_update.php in PHPMyWind 5.5 allows Admin users to execute arbitrary code via the attrvalue[] array parameter.
{
"affected": [],
"aliases": [
"CVE-2018-17132"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-09-17T04:29:00Z",
"severity": "HIGH"
},
"details": "admin/goods_update.php in PHPMyWind 5.5 allows Admin users to execute arbitrary code via the attrvalue[] array parameter.",
"id": "GHSA-rrg2-5w5v-6crw",
"modified": "2022-05-14T02:02:59Z",
"published": "2022-05-14T02:02:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-17132"
},
{
"type": "WEB",
"url": "https://github.com/panghusec/exploit/issues/4"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-RRJG-XX76-7W45
Vulnerability from github – Published: 2022-05-14 02:32 – Updated: 2022-05-14 02:32Microsoft Internet Explorer 9 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted web site, aka "Internet Explorer Memory Corruption Vulnerability," a different vulnerability than CVE-2014-1788 and CVE-2014-2754.
{
"affected": [],
"aliases": [
"CVE-2014-1774"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-06-11T04:56:00Z",
"severity": "HIGH"
},
"details": "Microsoft Internet Explorer 9 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted web site, aka \"Internet Explorer Memory Corruption Vulnerability,\" a different vulnerability than CVE-2014-1788 and CVE-2014-2754.",
"id": "GHSA-rrjg-xx76-7w45",
"modified": "2022-05-14T02:32:18Z",
"published": "2022-05-14T02:32:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-1774"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2014/ms14-035"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/67867"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1030370"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-RRM4-5QP7-HX75
Vulnerability from github – Published: 2024-10-25 18:30 – Updated: 2024-10-29 21:30Kliqqi-CMS has a background arbitrary code execution vulnerability that attackers can exploit to implant backdoors or getShell via the edit_page.php component.
{
"affected": [],
"aliases": [
"CVE-2024-48700"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-10-25T18:15:04Z",
"severity": "HIGH"
},
"details": "Kliqqi-CMS has a background arbitrary code execution vulnerability that attackers can exploit to implant backdoors or getShell via the edit_page.php component.",
"id": "GHSA-rrm4-5qp7-hx75",
"modified": "2024-10-29T21:30:48Z",
"published": "2024-10-25T18:30:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-48700"
},
{
"type": "WEB",
"url": "https://github.com/ChangeYourWay/post/blob/main/CVE-2024-48700"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-RRPM-PJ7P-7J9Q
Vulnerability from github – Published: 2018-10-18 18:05 – Updated: 2024-05-14 17:55Spring Security OAuth versions prior to 2.3.3, prior to 2.2.2, prior to 2.1.2, and prior to 2.0.15 contain a remote code execution vulnerability. An attacker can craft an authorization request to the authorization endpoint that can lead to remote code execution when the resource owner is forwarded to the approval endpoint.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security.oauth:spring-security-oauth2"
},
"ranges": [
{
"events": [
{
"introduced": "2.3.0"
},
{
"fixed": "2.3.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security.oauth:spring-security-oauth2"
},
"ranges": [
{
"events": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security.oauth:spring-security-oauth2"
},
"ranges": [
{
"events": [
{
"introduced": "2.1.0"
},
{
"fixed": "2.1.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security.oauth:spring-security-oauth2"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.0.15"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.springframework.security.oauth:spring-security-oauth2"
},
"ranges": [
{
"events": [
{
"introduced": "1.0.0"
},
{
"last_affected": "1.0.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2018-1260"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:55:47Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "Spring Security OAuth versions prior to 2.3.3, prior to 2.2.2, prior to 2.1.2, and prior to 2.0.15 contain a remote code execution vulnerability. An attacker can craft an authorization request to the authorization endpoint that can lead to remote code execution when the resource owner is forwarded to the approval endpoint. ",
"id": "GHSA-rrpm-pj7p-7j9q",
"modified": "2024-05-14T17:55:41Z",
"published": "2018-10-18T18:05:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-1260"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:1809"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2018:2939"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-rrpm-pj7p-7j9q"
},
{
"type": "PACKAGE",
"url": "https://github.com/spring-attic/spring-security-oauth"
},
{
"type": "WEB",
"url": "https://pivotal.io/security/cve-2018-1260"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20200227123539/http://www.securityfocus.com/bid/104158"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Spring Security OAuth vulnerable to remote code execution (RCE)"
}
Mitigation
Strategy: Refactoring
Refactor your program so that you do not have to dynamically generate code.
Mitigation
- Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product.
- Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- To reduce the likelihood of code injection, use stringent allowlists that limit which constructs are allowed. If you are dynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient. An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().
Mitigation
Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
Mitigation MIT-32
Strategy: Compilation or Build Hardening
Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).
Mitigation MIT-32
Strategy: Environment Hardening
Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).
Mitigation
For Python programs, it is frequently encouraged to use the ast.literal_eval() function instead of eval, since it is intentionally designed to avoid executing code. However, an adversary could still cause excessive memory or stack consumption via deeply nested structures [REF-1372], so the python documentation discourages use of ast.literal_eval() on untrusted data [REF-1373].
CAPEC-242: Code Injection
An adversary exploits a weakness in input validation on the target to inject new code into that which is currently executing. This differs from code inclusion in that code inclusion involves the addition or replacement of a reference to a code file, which is subsequently loaded by the target and used as part of the code of some application.
CAPEC-35: Leverage Executable Code in Non-Executable Files
An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.
CAPEC-77: Manipulating User-Controlled Variables
This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.