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.
8357 vulnerabilities reference this CWE, most recent first.
GHSA-9598-XHF2-CW82
Vulnerability from github – Published: 2022-05-01 07:14 – Updated: 2022-05-01 07:14PHP remote file inclusion vulnerability in SAPID CMS 123 rc3 allows remote attackers to execute arbitrary PHP code via a URL in the (1) root_path parameter in usr/extensions/get_infochannel.inc.php and the (2) GLOBALS["root_path"] parameter in usr/extensions/get_tree.inc.php.
{
"affected": [],
"aliases": [
"CVE-2006-4026"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-08-09T00:04:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in SAPID CMS 123 rc3 allows remote attackers to execute arbitrary PHP code via a URL in the (1) root_path parameter in usr/extensions/get_infochannel.inc.php and the (2) GLOBALS[\"root_path\"] parameter in usr/extensions/get_tree.inc.php.",
"id": "GHSA-9598-xhf2-cw82",
"modified": "2022-05-01T07:14:40Z",
"published": "2022-05-01T07:14:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-4026"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/28250"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2128"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/21410"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/1346"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1016650"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/442425/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/19383"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/3191"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-95G8-GQRV-F83G
Vulnerability from github – Published: 2024-04-11 03:35 – Updated: 2024-08-27 18:31NFS in a BSD derived codebase, as used in OpenBSD through 7.4 and FreeBSD through 14.0-RELEASE, allows remote attackers to execute arbitrary code via a bug that is unrelated to memory corruption.
{
"affected": [],
"aliases": [
"CVE-2024-29937"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-11T01:25:15Z",
"severity": "CRITICAL"
},
"details": "NFS in a BSD derived codebase, as used in OpenBSD through 7.4 and FreeBSD through 14.0-RELEASE, allows remote attackers to execute arbitrary code via a bug that is unrelated to memory corruption.",
"id": "GHSA-95g8-gqrv-f83g",
"modified": "2024-08-27T18:31:34Z",
"published": "2024-04-11T03:35:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-29937"
},
{
"type": "WEB",
"url": "https://news.ycombinator.com/item?id=39778203"
},
{
"type": "WEB",
"url": "https://t2.fi/schedule/2024"
},
{
"type": "WEB",
"url": "https://www.signedness.org/t2.fi.2024"
},
{
"type": "WEB",
"url": "https://www.youtube.com/watch?v=i_JOkHaCdzk"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-95P4-XMXW-7258
Vulnerability from github – Published: 2023-11-03 18:30 – Updated: 2023-11-14 15:30An issue in Best Courier Management System v.1.0 allows a remote attacker to execute arbitrary code and escalate privileges via a crafted script to the userID parameter.
{
"affected": [],
"aliases": [
"CVE-2023-46980"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-11-03T16:15:31Z",
"severity": "CRITICAL"
},
"details": "An issue in Best Courier Management System v.1.0 allows a remote attacker to execute arbitrary code and escalate privileges via a crafted script to the userID parameter.",
"id": "GHSA-95p4-xmxw-7258",
"modified": "2023-11-14T15:30:23Z",
"published": "2023-11-03T18:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-46980"
},
{
"type": "WEB",
"url": "https://github.com/sajaljat/CVE-2023-46980/tree/main"
},
{
"type": "WEB",
"url": "https://youtu.be/3Mz2lSElg7Y"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-95QJ-39W7-8CP5
Vulnerability from github – Published: 2022-05-01 18:33 – Updated: 2022-05-01 18:33Multiple PHP remote file inclusion vulnerabilities in Michael Dempfle Joomla Flash Uploader (com_jfu or com_joomla_flash_uploader) 2.5.1 component for Joomla! allow remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter to (1) install.joomla_flash_uploader.php and (2) uninstall.joomla_flash_uploader.php.
{
"affected": [],
"aliases": [
"CVE-2007-5457"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-10-14T19:17:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Michael Dempfle Joomla Flash Uploader (com_jfu or com_joomla_flash_uploader) 2.5.1 component for Joomla! allow remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter to (1) install.joomla_flash_uploader.php and (2) uninstall.joomla_flash_uploader.php.",
"id": "GHSA-95qj-39w7-8cp5",
"modified": "2022-05-01T18:33:33Z",
"published": "2022-05-01T18:33:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5457"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/37181"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/39737"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4521"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/486475/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/26044"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-95VP-X967-M83G
Vulnerability from github – Published: 2022-05-14 02:01 – Updated: 2022-05-14 02:01BigTree CMS 4.2.23 allows remote authenticated users, if possessing privileges to set hooks, to execute arbitrary code via /core/admin/auto-modules/forms/process.php.
{
"affected": [],
"aliases": [
"CVE-2018-17030"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-09-14T02:29:00Z",
"severity": "HIGH"
},
"details": "BigTree CMS 4.2.23 allows remote authenticated users, if possessing privileges to set hooks, to execute arbitrary code via /core/admin/auto-modules/forms/process.php.",
"id": "GHSA-95vp-x967-m83g",
"modified": "2022-05-14T02:01:44Z",
"published": "2022-05-14T02:01:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-17030"
},
{
"type": "WEB",
"url": "https://github.com/bigtreecms/BigTree-CMS/issues/342"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-95WW-JMV3-VQH8
Vulnerability from github – Published: 2025-11-12 21:31 – Updated: 2025-11-12 21:31Dell SmartFabric OS10 Software, versions prior to 10.6.1.0, contain an Improper Control of Generation of Code ('Code Injection') vulnerability. A high privileged attacker with local access could potentially exploit this vulnerability, leading to Code execution.
{
"affected": [],
"aliases": [
"CVE-2024-48829"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-11-12T20:15:34Z",
"severity": "MODERATE"
},
"details": "Dell SmartFabric OS10 Software, versions prior to 10.6.1.0, contain an Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability. A high privileged attacker with local access could potentially exploit this vulnerability, leading to Code execution.",
"id": "GHSA-95ww-jmv3-vqh8",
"modified": "2025-11-12T21:31:08Z",
"published": "2025-11-12T21:31:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-48829"
},
{
"type": "WEB",
"url": "https://www.dell.com/support/kbdoc/en-us/000391062/dsa-2025-407-security-update-for-dell-networking-os10-vulnerabilities"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-9629-MFJ6-679X
Vulnerability from github – Published: 2023-06-19 12:30 – Updated: 2024-04-04 04:56The Slider Revolution WordPress plugin through 6.6.12 does not check for valid image files upon import, leading to an arbitrary file upload which may be escalated to Remote Code Execution in some server configurations.
{
"affected": [],
"aliases": [
"CVE-2023-2359"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-06-19T11:15:10Z",
"severity": "HIGH"
},
"details": "The Slider Revolution WordPress plugin through 6.6.12 does not check for valid image files upon import, leading to an arbitrary file upload which may be escalated to Remote Code Execution in some server configurations.",
"id": "GHSA-9629-mfj6-679x",
"modified": "2024-04-04T04:56:39Z",
"published": "2023-06-19T12:30:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-2359"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/a8350890-e6d4-4b04-a158-2b0ee3748e65"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-9637-782J-WQ7F
Vulnerability from github – Published: 2022-05-01 18:36 – Updated: 2022-05-01 18:36PHP remote file inclusion vulnerability in urlinn_includes/config.php in phpFaber URLInn 2.0.5 allows remote attackers to execute arbitrary PHP code via a URL in the dir_ws parameter.
{
"affected": [],
"aliases": [
"CVE-2007-5754"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-10-31T17:46:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in urlinn_includes/config.php in phpFaber URLInn 2.0.5 allows remote attackers to execute arbitrary PHP code via a URL in the dir_ws parameter.",
"id": "GHSA-9637-782j-wq7f",
"modified": "2022-05-01T18:36:33Z",
"published": "2022-05-01T18:36:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5754"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38182"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4588"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/26261"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-9639-6PF9-JH9R
Vulnerability from github – Published: 2026-06-26 12:30 – Updated: 2026-06-26 12:30A Code Injection vulnerability existed in Trellix Network Security CM and NX. A locally authenticated admin user can execute arbitrary code using the web interface and Alert artifact details.
{
"affected": [],
"aliases": [
"CVE-2025-7958"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-26T11:16:30Z",
"severity": "HIGH"
},
"details": "A Code Injection vulnerability existed in Trellix Network Security CM and NX. A locally authenticated admin user can execute arbitrary code using the web interface and Alert artifact details.",
"id": "GHSA-9639-6pf9-jh9r",
"modified": "2026-06-26T12:30:29Z",
"published": "2026-06-26T12:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-7958"
},
{
"type": "WEB",
"url": "https://support.trellix.com/s/article/000015433"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:A/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/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-963V-CPJR-8G28
Vulnerability from github – Published: 2022-05-02 03:37 – Updated: 2022-05-02 03:37PHP remote file inclusion vulnerability in app_and_readme/navigator/index.php in School Data Navigator allows remote attackers to execute arbitrary PHP code via a URL in the page parameter. NOTE: this can also be leveraged to include and execute arbitrary local files via .. (dot dot) sequences.
{
"affected": [],
"aliases": [
"CVE-2009-2641"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-07-28T19:30:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in app_and_readme/navigator/index.php in School Data Navigator allows remote attackers to execute arbitrary PHP code via a URL in the page parameter. NOTE: this can also be leveraged to include and execute arbitrary local files via .. (dot dot) sequences.",
"id": "GHSA-963v-cpjr-8g28",
"modified": "2022-05-02T03:37:15Z",
"published": "2022-05-02T03:37:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-2641"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/8924"
}
],
"schema_version": "1.4.0",
"severity": []
}
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.