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-9Q7P-HGMR-J66G
Vulnerability from github – Published: 2022-05-01 23:28 – Updated: 2022-05-01 23:28PHP remote file inclusion vulnerability in /aides/index.php in DomPHP 0.81 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the page parameter.
{
"affected": [],
"aliases": [
"CVE-2008-0283"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-01-15T21:00:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in /aides/index.php in DomPHP 0.81 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the page parameter.",
"id": "GHSA-9q7p-hgmr-j66g",
"modified": "2022-05-01T23:28:50Z",
"published": "2022-05-01T23:28:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-0283"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4883"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/27226"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-9Q7Q-6C8F-Q8GH
Vulnerability from github – Published: 2025-12-23 21:30 – Updated: 2025-12-23 21:30CMSimple 5.4 contains an authenticated remote code execution vulnerability that allows logged-in attackers to inject malicious PHP code into template files. Attackers can exploit the template editing functionality by crafting a reverse shell payload and saving it through the template editing endpoint with a valid CSRF token.
{
"affected": [],
"aliases": [
"CVE-2021-47735"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-23T20:15:45Z",
"severity": "HIGH"
},
"details": "CMSimple 5.4 contains an authenticated remote code execution vulnerability that allows logged-in attackers to inject malicious PHP code into template files. Attackers can exploit the template editing functionality by crafting a reverse shell payload and saving it through the template editing endpoint with a valid CSRF token.",
"id": "GHSA-9q7q-6c8f-q8gh",
"modified": "2025-12-23T21:30:29Z",
"published": "2025-12-23T21:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-47735"
},
{
"type": "WEB",
"url": "https://www.cmsimple.org"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/50356"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/cmsimple-authenticated-remote-code-execution-via-template-editing"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/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-9Q82-VH99-V4RP
Vulnerability from github – Published: 2022-05-24 17:43 – Updated: 2022-05-24 17:43SAP MII allows users to create dashboards and save them as JSP through the SSCE (Self Service Composition Environment). An attacker can intercept a request to the server, inject malicious JSP code in the request and forward to server. When this dashboard is opened by Users having at least SAP_XMII_Developer role, malicious content in the dashboard gets executed, leading to remote code execution in the server, which allows privilege escalation. The malicious JSP code can contain certain OS commands, through which an attacker can read sensitive files in the server, modify files or even delete contents in the server thus compromising the confidentiality, integrity and availability of the server hosting the SAP MII application.
{
"affected": [],
"aliases": [
"CVE-2021-21480"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-03-09T15:15:00Z",
"severity": "HIGH"
},
"details": "SAP MII allows users to create dashboards and save them as JSP through the SSCE (Self Service Composition Environment). An attacker can intercept a request to the server, inject malicious JSP code in the request and forward to server. When this dashboard is opened by Users having at least SAP_XMII_Developer role, malicious content in the dashboard gets executed, leading to remote code execution in the server, which allows privilege escalation. The malicious JSP code can contain certain OS commands, through which an attacker can read sensitive files in the server, modify files or even delete contents in the server thus compromising the confidentiality, integrity and availability of the server hosting the SAP MII application.",
"id": "GHSA-9q82-vh99-v4rp",
"modified": "2022-05-24T17:43:59Z",
"published": "2022-05-24T17:43:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-21480"
},
{
"type": "WEB",
"url": "https://launchpad.support.sap.com/#/notes/3022622"
},
{
"type": "WEB",
"url": "https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=571343107"
},
{
"type": "WEB",
"url": "https://www.sap.com/documents/2022/02/fa865ea4-167e-0010-bca6-c68f7e60039b.html"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/163164/SAP-XMII-Remote-Code-Execution.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2021/Jun/30"
}
],
"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-9Q83-CV5J-75HV
Vulnerability from github – Published: 2022-05-02 03:12 – Updated: 2022-05-02 03:12Multiple PHP remote file inclusion vulnerabilities in playSMS 0.9.3 allow remote attackers to execute arbitrary PHP code via a URL in the (1) apps_path[plug] parameter to plugin/gateway/gnokii/init.php, the (2) apps_path[themes] parameter to plugin/themes/default/init.php, and the (3) apps_path[libs] parameter to lib/function.php.
{
"affected": [],
"aliases": [
"CVE-2009-0103"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-01-09T18:30:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in playSMS 0.9.3 allow remote attackers to execute arbitrary PHP code via a URL in the (1) apps_path[plug] parameter to plugin/gateway/gnokii/init.php, the (2) apps_path[themes] parameter to plugin/themes/default/init.php, and the (3) apps_path[libs] parameter to lib/function.php.",
"id": "GHSA-9q83-cv5j-75hv",
"modified": "2022-05-02T03:12:49Z",
"published": "2022-05-02T03:12:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0103"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/7687"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/33386"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/4888"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/33138"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-9Q9M-C65C-37PQ
Vulnerability from github – Published: 2023-06-05 18:30 – Updated: 2025-01-08 21:51Reportlab up to and including v3.6.12 allows attackers to execute arbitrary code via supplying a crafted PDF file.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.6.12"
},
"package": {
"ecosystem": "PyPI",
"name": "reportlab"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.6.13"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-33733"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-08-28T17:16:39Z",
"nvd_published_at": "2023-06-05T16:15:09Z",
"severity": "HIGH"
},
"details": "Reportlab up to and including v3.6.12 allows attackers to execute arbitrary code via supplying a crafted PDF file.",
"id": "GHSA-9q9m-c65c-37pq",
"modified": "2025-01-08T21:51:23Z",
"published": "2023-06-05T18:30:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-33733"
},
{
"type": "WEB",
"url": "https://github.com/c53elyas/CVE-2023-33733"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2024/10/msg00008.html"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/36WOY22ECJCPOXHVTNCHEWOQLL7JSWP4"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6ALE727IRACYBTTOFIFG57RS4OA2SHIJ"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/36WOY22ECJCPOXHVTNCHEWOQLL7JSWP4"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6ALE727IRACYBTTOFIFG57RS4OA2SHIJ"
}
],
"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"
}
],
"summary": "Reportlab vulnerable to remote code execution"
}
GHSA-9QHQ-5MJ7-JJ76
Vulnerability from github – Published: 2023-12-27 21:31 – Updated: 2024-01-09 21:30The com.altamirano.fabricio.tvbrowser TV browser application through 4.5.1 for Android is vulnerable to JavaScript code execution via an explicit intent due to an exposed MainActivity.
{
"affected": [],
"aliases": [
"CVE-2023-47883"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-12-27T21:15:08Z",
"severity": "CRITICAL"
},
"details": "The com.altamirano.fabricio.tvbrowser TV browser application through 4.5.1 for Android is vulnerable to JavaScript code execution via an explicit intent due to an exposed MainActivity.",
"id": "GHSA-9qhq-5mj7-jj76",
"modified": "2024-01-09T21:30:28Z",
"published": "2023-12-27T21:31:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-47883"
},
{
"type": "WEB",
"url": "https://github.com/actuator/com.altamirano.fabricio.tvbrowser/blob/main/AFC-POC.apk"
},
{
"type": "WEB",
"url": "https://github.com/actuator/com.altamirano.fabricio.tvbrowser/blob/main/CWE-94.md"
},
{
"type": "WEB",
"url": "https://github.com/actuator/com.altamirano.fabricio.tvbrowser/blob/main/TVBrowserDemo.gif"
}
],
"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-9QJX-V3P5-XFRF
Vulnerability from github – Published: 2022-05-24 16:57 – Updated: 2024-04-04 02:09getStats.php in Centreon Web before 2.8.28 allows authenticated attackers to execute arbitrary code via the ns_id parameter.
{
"affected": [],
"aliases": [
"CVE-2018-21023"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-10-08T13:15:00Z",
"severity": "HIGH"
},
"details": "getStats.php in Centreon Web before 2.8.28 allows authenticated attackers to execute arbitrary code via the ns_id parameter.",
"id": "GHSA-9qjx-v3p5-xfrf",
"modified": "2024-04-04T02:09:26Z",
"published": "2022-05-24T16:57:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-21023"
},
{
"type": "WEB",
"url": "https://github.com/centreon/centreon/pull/7083"
},
{
"type": "WEB",
"url": "https://github.com/centreon/centreon/pull/7271"
},
{
"type": "WEB",
"url": "https://www.openwall.com/lists/oss-security/2019/10/08/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2019/10/09/2"
}
],
"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-9QP8-XGH5-RQ98
Vulnerability from github – Published: 2022-05-17 05:49 – Updated: 2025-04-11 03:37solid.exe in IBM solidDB before 6.5 FP2 allows remote attackers to execute arbitrary code via a long username field in the first handshake packet.
{
"affected": [],
"aliases": [
"CVE-2010-2771"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-07-22T05:43:00Z",
"severity": "HIGH"
},
"details": "solid.exe in IBM solidDB before 6.5 FP2 allows remote attackers to execute arbitrary code via a long username field in the first handshake packet.",
"id": "GHSA-9qp8-xgh5-rq98",
"modified": "2025-04-11T03:37:35Z",
"published": "2022-05-17T05:49:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-2771"
},
{
"type": "WEB",
"url": "http://publib.boulder.ibm.com/infocenter/soliddb/v6r5/index.jsp?topic=/com.ibm.swg.im.soliddb.common.doc/doc/detailed.list.fixes.html"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1024203"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/41653"
},
{
"type": "WEB",
"url": "http://www.zerodayinitiative.com/advisories/ZDI-10-125"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-9QPJ-HJ7F-QXR6
Vulnerability from github – Published: 2022-05-01 06:37 – Updated: 2022-05-01 06:37PHP remote file include vulnerability in includes/orderSuccess.inc.php in CubeCart allows remote attackers to execute arbitrary PHP code via a URL in the glob[rootDir] parameter.
{
"affected": [],
"aliases": [
"CVE-2006-0064"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-01-03T22:03:00Z",
"severity": "HIGH"
},
"details": "PHP remote file include vulnerability in includes/orderSuccess.inc.php in CubeCart allows remote attackers to execute arbitrary PHP code via a URL in the glob[rootDir] parameter.",
"id": "GHSA-9qpj-hj7f-qxr6",
"modified": "2022-05-01T06:37:14Z",
"published": "2022-05-01T06:37:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-0064"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/1398"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/0016"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-9QPP-VGRG-5MHJ
Vulnerability from github – Published: 2026-07-22 00:32 – Updated: 2026-07-22 00:32Autel Maxi Charger Single firmware through V1.03.51 allows unauthenticated remote code execution via the service listening on TCP port 9002. A crafted request to the /test endpoint can cause the device to download, extract, and execute attacker-controlled files with root privileges.
{
"affected": [],
"aliases": [
"CVE-2026-8984"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-21T22:19:10Z",
"severity": "CRITICAL"
},
"details": "Autel Maxi Charger Single firmware through V1.03.51 allows unauthenticated remote code execution via the service listening on TCP port 9002. A crafted request to the /test endpoint can cause the device to download, extract, and execute attacker-controlled files with root privileges.",
"id": "GHSA-9qpp-vgrg-5mhj",
"modified": "2026-07-22T00:32:35Z",
"published": "2026-07-22T00:32:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-8984"
},
{
"type": "WEB",
"url": "https://cyberdanube.com/security-research/multiple-vulnerabilities-in-autel-maxi-charger"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/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"
}
]
}
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.