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.
8284 vulnerabilities reference this CWE, most recent first.
GHSA-JFW2-9V4J-CMRF
Vulnerability from github – Published: 2022-04-29 00:00 – Updated: 2022-05-06 00:01In JetBrains IntelliJ IDEA before 2022.1 local code execution via HTML descriptions in custom JSON schemas was possible
{
"affected": [],
"aliases": [
"CVE-2022-29814"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-04-28T10:15:00Z",
"severity": "HIGH"
},
"details": "In JetBrains IntelliJ IDEA before 2022.1 local code execution via HTML descriptions in custom JSON schemas was possible",
"id": "GHSA-jfw2-9v4j-cmrf",
"modified": "2022-05-06T00:01:00Z",
"published": "2022-04-29T00:00:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-29814"
},
{
"type": "WEB",
"url": "https://www.jetbrains.com/privacy-security/issues-fixed"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-JFX8-86F7-X4H2
Vulnerability from github – Published: 2024-12-26 06:30 – Updated: 2026-03-02 18:31A Improper Control of Generation of Code ('Code Injection') vulnerability in groovy script function in SmartRobot′s Conversational AI Platform before v7.2.0 allows remote authenticated users to perform arbitrary system commands via Groovy code.
{
"affected": [],
"aliases": [
"CVE-2024-12652"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-26T04:15:05Z",
"severity": "CRITICAL"
},
"details": "A Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in groovy script function in SmartRobot\u2032s Conversational AI Platform before v7.2.0 allows remote authenticated users to perform arbitrary system commands via Groovy code.",
"id": "GHSA-jfx8-86f7-x4h2",
"modified": "2026-03-02T18:31:38Z",
"published": "2024-12-26T06:30:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12652"
},
{
"type": "WEB",
"url": "https://zuso.ai/advisory/za-2024-13"
}
],
"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:L/SI:L/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"
}
]
}
GHSA-JG29-JQ4F-C8F4
Vulnerability from github – Published: 2022-05-01 23:37 – Updated: 2022-05-01 23:37** DISPUTED ** Multiple PHP remote file inclusion vulnerabilities in the 123 Flash Chat Module for phpBB allow remote attackers to execute arbitrary PHP code via a URL in the phpbb_root_path parameter to (1) 123flashchat.php and (2) phpbb_login_chat.php. NOTE: CVE disputes this issue because $phpbb_root_path is explicitly set to "./" in both programs.
{
"affected": [],
"aliases": [
"CVE-2008-1171"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-03-05T23:44:00Z",
"severity": "MODERATE"
},
"details": "** DISPUTED ** Multiple PHP remote file inclusion vulnerabilities in the 123 Flash Chat Module for phpBB allow remote attackers to execute arbitrary PHP code via a URL in the phpbb_root_path parameter to (1) 123flashchat.php and (2) phpbb_login_chat.php. NOTE: CVE disputes this issue because $phpbb_root_path is explicitly set to \"./\" in both programs.",
"id": "GHSA-jg29-jq4f-c8f4",
"modified": "2022-05-01T23:37:21Z",
"published": "2022-05-01T23:37:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-1171"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/3716"
},
{
"type": "WEB",
"url": "http://www.attrition.org/pipermail/vim/2008-March/001913.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/488914/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/488922/100/0/threaded"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JG2G-JQ85-V7JW
Vulnerability from github – Published: 2022-05-24 17:41 – Updated: 2022-05-24 17:41SAP Commerce Cloud, versions - 1808,1811,1905,2005,2011, enables certain users with required privileges to edit drools rules, an authenticated attacker with this privilege will be able to inject malicious code in the drools rules which when executed leads to Remote Code Execution vulnerability enabling the attacker to compromise the underlying host enabling him to impair confidentiality, integrity and availability of the application.
{
"affected": [],
"aliases": [
"CVE-2021-21477"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-02-09T21:15:00Z",
"severity": "CRITICAL"
},
"details": "SAP Commerce Cloud, versions - 1808,1811,1905,2005,2011, enables certain users with required privileges to edit drools rules, an authenticated attacker with this privilege will be able to inject malicious code in the drools rules which when executed leads to Remote Code Execution vulnerability enabling the attacker to compromise the underlying host enabling him to impair confidentiality, integrity and availability of the application.",
"id": "GHSA-jg2g-jq85-v7jw",
"modified": "2022-05-24T17:41:37Z",
"published": "2022-05-24T17:41:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-21477"
},
{
"type": "WEB",
"url": "https://launchpad.support.sap.com/#/notes/3014121"
},
{
"type": "WEB",
"url": "https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=568460543"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JG2P-3MCJ-HP8F
Vulnerability from github – Published: 2022-05-17 04:31 – Updated: 2022-05-17 04:31The default configuration in the accessibility engine in SpagoBI 5.0.0 does not set FEATURE_SECURE_PROCESSING, which allows remote authenticated users to execute arbitrary Java code via a crafted XSL document.
{
"affected": [],
"aliases": [
"CVE-2014-7296"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-10-08T19:55:00Z",
"severity": "MODERATE"
},
"details": "The default configuration in the accessibility engine in SpagoBI 5.0.0 does not set FEATURE_SECURE_PROCESSING, which allows remote authenticated users to execute arbitrary Java code via a crafted XSL document.",
"id": "GHSA-jg2p-3mcj-hp8f",
"modified": "2022-05-17T04:31:36Z",
"published": "2022-05-17T04:31:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-7296"
},
{
"type": "WEB",
"url": "http://spagoworld.org/jira/browse/SPAGOBI-1885"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/70240"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JG32-M8MR-6XVG
Vulnerability from github – Published: 2025-12-11 00:30 – Updated: 2025-12-19 18:31PopojiCMS 2.0.1 contains an authenticated remote command execution vulnerability that allows administrative users to inject malicious PHP code through the metadata settings endpoint. Attackers can log in and modify the meta content to create a web shell that executes arbitrary system commands through a GET parameter.
{
"affected": [],
"aliases": [
"CVE-2024-58284"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-10T22:16:20Z",
"severity": "HIGH"
},
"details": "PopojiCMS 2.0.1 contains an authenticated remote command execution vulnerability that allows administrative users to inject malicious PHP code through the metadata settings endpoint. Attackers can log in and modify the meta content to create a web shell that executes arbitrary system commands through a GET parameter.",
"id": "GHSA-jg32-m8mr-6xvg",
"modified": "2025-12-19T18:31:11Z",
"published": "2025-12-11T00:30:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-58284"
},
{
"type": "WEB",
"url": "https://github.com/PopojiCMS/PopojiCMS"
},
{
"type": "WEB",
"url": "https://github.com/PopojiCMS/PopojiCMS/archive/refs/tags/v2.0.1.zip"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/52022"
},
{
"type": "WEB",
"url": "https://www.popojicms.org"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/popojicms-remote-command-execution-via-authenticated-metadata-settings"
}
],
"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"
},
{
"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-JG4M-Q6W8-VRJP
Vulnerability from github – Published: 2017-10-24 18:33 – Updated: 2023-01-26 21:04The self.run_gpg function in lib/rgpg/gpg_helper.rb in the rgpg gem before 0.2.3 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in unspecified vectors.
{
"affected": [
{
"package": {
"ecosystem": "RubyGems",
"name": "rgpg"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.2.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2013-4203"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:43:21Z",
"nvd_published_at": "2013-10-11T22:55:39Z",
"severity": "HIGH"
},
"details": "The `self.run_gpg` function in `lib/rgpg/gpg_helper.rb` in the rgpg gem before 0.2.3 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in unspecified vectors.",
"id": "GHSA-jg4m-q6w8-vrjp",
"modified": "2023-01-26T21:04:14Z",
"published": "2017-10-24T18:33:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-4203"
},
{
"type": "WEB",
"url": "https://github.com/rcook/rgpg/commit/b819b13d198495f3ecd2762a0dbe27bb6fae3505"
},
{
"type": "PACKAGE",
"url": "https://github.com/rcook/rgpg"
},
{
"type": "WEB",
"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rgpg/CVE-2013-4203.yml"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2013/08/03/2"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "rgpg Code Injection vulnerability"
}
GHSA-JG74-X32P-R6HV
Vulnerability from github – Published: 2022-05-04 00:29 – Updated: 2022-05-04 00:29The file-management system in Movable Type before 4.38, 5.0x before 5.07, and 5.1x before 5.13 allows remote authenticated users to execute arbitrary commands by leveraging the file-upload feature, related to an "OS Command Injection" issue.
{
"affected": [],
"aliases": [
"CVE-2012-0319"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-03-03T04:04:00Z",
"severity": "MODERATE"
},
"details": "The file-management system in Movable Type before 4.38, 5.0x before 5.07, and 5.1x before 5.13 allows remote authenticated users to execute arbitrary commands by leveraging the file-upload feature, related to an \"OS Command Injection\" issue.",
"id": "GHSA-jg74-x32p-r6hv",
"modified": "2022-05-04T00:29:23Z",
"published": "2022-05-04T00:29:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-0319"
},
{
"type": "WEB",
"url": "http://jvn.jp/en/jp/JVN92683325/index.html"
},
{
"type": "WEB",
"url": "http://jvndb.jvn.jp/jvndb/JVNDB-2012-000017"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2012/dsa-2423"
},
{
"type": "WEB",
"url": "http://www.movabletype.org/2012/02/movable_type_513_507_and_438_security_updates.html"
},
{
"type": "WEB",
"url": "http://www.movabletype.org/documentation/appendices/release-notes/513.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/52138"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1026738"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JG89-GJ56-FCRP
Vulnerability from github – Published: 2022-05-01 18:27 – Updated: 2022-05-01 18:27Multiple PHP remote file inclusion vulnerabilities in WebED in Markus Iser ED Engine 0.8999 alpha allow remote attackers to execute arbitrary PHP code via a URL in the Codebase parameter to (1) channeledit.php, (2) post.php, (3) view.php, or (4) viewitem.php in source/mod/rss/.
{
"affected": [],
"aliases": [
"CVE-2007-4815"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-09-11T19:17:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in WebED in Markus Iser ED Engine 0.8999 alpha allow remote attackers to execute arbitrary PHP code via a URL in the Codebase parameter to (1) channeledit.php, (2) post.php, (3) view.php, or (4) viewitem.php in source/mod/rss/.",
"id": "GHSA-jg89-gj56-fcrp",
"modified": "2022-05-01T18:27:27Z",
"published": "2022-05-01T18:27:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-4815"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36532"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4384"
},
{
"type": "WEB",
"url": "http://osvdb.org/38395"
},
{
"type": "WEB",
"url": "http://osvdb.org/38396"
},
{
"type": "WEB",
"url": "http://osvdb.org/38397"
},
{
"type": "WEB",
"url": "http://osvdb.org/38398"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/480108/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/25608"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/3171"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JG8F-G534-227P
Vulnerability from github – Published: 2022-05-24 16:55 – Updated: 2024-04-04 01:54SAP NetWeaver Application Server Java Web Container, ENGINEAPI (before versions 7.10, 7.20, 7.30, 7.31, 7.40, 7.50) and SAP-JEECOR (before versions 6.40, 7.0, 7.01), allows an attacker to inject code that can be executed by the application. An attacker could thereby control the behaviour of the application.
{
"affected": [],
"aliases": [
"CVE-2019-0355"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-09-10T17:15:00Z",
"severity": "HIGH"
},
"details": "SAP NetWeaver Application Server Java Web Container, ENGINEAPI (before versions 7.10, 7.20, 7.30, 7.31, 7.40, 7.50) and SAP-JEECOR (before versions 6.40, 7.0, 7.01), allows an attacker to inject code that can be executed by the application. An attacker could thereby control the behaviour of the application.",
"id": "GHSA-jg8f-g534-227p",
"modified": "2024-04-04T01:54:50Z",
"published": "2022-05-24T16:55:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-0355"
},
{
"type": "WEB",
"url": "https://launchpad.support.sap.com/#/notes/2798336"
},
{
"type": "WEB",
"url": "https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=525962506"
}
],
"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"
}
]
}
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.