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.
8376 vulnerabilities reference this CWE, most recent first.
GHSA-89W9-GMVC-MFP8
Vulnerability from github – Published: 2022-05-14 02:50 – Updated: 2022-05-14 02:50Static code injection vulnerability in install.php in Morfy CMS 1.05 allows remote authenticated users to inject arbitrary PHP code into config.php via the site_url parameter.
{
"affected": [],
"aliases": [
"CVE-2014-9185"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-12-19T15:59:00Z",
"severity": "MODERATE"
},
"details": "Static code injection vulnerability in install.php in Morfy CMS 1.05 allows remote authenticated users to inject arbitrary PHP code into config.php via the site_url parameter.",
"id": "GHSA-89w9-gmvc-mfp8",
"modified": "2022-05-14T02:50:12Z",
"published": "2022-05-14T02:50:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-9185"
},
{
"type": "WEB",
"url": "https://github.com/Awilum/monstra-cms/issues/351"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/129624/Morfy-CMS-1.05-Remote-Command-Execution.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2014/Dec/70"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/534271/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.vulnerability-lab.com/get_content.php?id=1367"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-89X3-JGXJ-39CX
Vulnerability from github – Published: 2024-02-06 21:30 – Updated: 2024-02-14 00:35An issue discovered in iSpyConnect.com Agent DVR 5.1.6.0 allows attackers to run arbitrary files by restoring a crafted backup file.
{
"affected": [],
"aliases": [
"CVE-2024-22514"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-06T21:15:09Z",
"severity": "HIGH"
},
"details": "An issue discovered in iSpyConnect.com Agent DVR 5.1.6.0 allows attackers to run arbitrary files by restoring a crafted backup file.",
"id": "GHSA-89x3-jgxj-39cx",
"modified": "2024-02-14T00:35:42Z",
"published": "2024-02-06T21:30:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22514"
},
{
"type": "WEB",
"url": "https://github.com/Orange-418/CVE-2024-22514-Remote-Code-Execution"
}
],
"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-8C9C-M8QR-PQ2X
Vulnerability from github – Published: 2022-05-02 03:25 – Updated: 2022-05-02 03:25The Intel LANDesk Common Base Agent (CBA) in Symantec Alert Management System 2 (AMS2), as used in Symantec System Center (SSS); Symantec AntiVirus Server; Symantec AntiVirus Central Quarantine Server; Symantec AntiVirus (SAV) Corporate Edition 9 before 9.0 MR7, 10.0 and 10.1 before 10.1 MR8, and 10.2 before 10.2 MR2; Symantec Client Security (SCS) 2 before 2.0 MR7 and 3 before 3.1 MR8; and Symantec Endpoint Protection (SEP) before 11.0 MR3, allows remote attackers to execute arbitrary commands via a crafted packet whose contents are interpreted as a command to be launched in a new process by the CreateProcessA function.
{
"affected": [],
"aliases": [
"CVE-2009-1429"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-04-29T15:30:00Z",
"severity": "HIGH"
},
"details": "The Intel LANDesk Common Base Agent (CBA) in Symantec Alert Management System 2 (AMS2), as used in Symantec System Center (SSS); Symantec AntiVirus Server; Symantec AntiVirus Central Quarantine Server; Symantec AntiVirus (SAV) Corporate Edition 9 before 9.0 MR7, 10.0 and 10.1 before 10.1 MR8, and 10.2 before 10.2 MR2; Symantec Client Security (SCS) 2 before 2.0 MR7 and 3 before 3.1 MR8; and Symantec Endpoint Protection (SEP) before 11.0 MR3, allows remote attackers to execute arbitrary commands via a crafted packet whose contents are interpreted as a command to be launched in a new process by the CreateProcessA function.",
"id": "GHSA-8c9c-m8qr-pq2x",
"modified": "2022-05-02T03:25:04Z",
"published": "2022-05-02T03:25:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-1429"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/50176"
},
{
"type": "WEB",
"url": "http://osvdb.org/54157"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/34856"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/8346"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/34671"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1022130"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1022131"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1022132"
},
{
"type": "WEB",
"url": "http://www.symantec.com/security_response/securityupdates/detail.jsp?fid=security_advisory\u0026pvid=security_advisory\u0026year=2009\u0026suid=20090428_02"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1204"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8CC3-P77G-5PCC
Vulnerability from github – Published: 2022-05-14 00:55 – Updated: 2022-05-14 00:55JBoss RichFaces before 4.5.4 allows remote attackers to inject expression language (EL) expressions and execute arbitrary Java code via the do parameter.
{
"affected": [],
"aliases": [
"CVE-2015-0279"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2015-03-26T14:59:00Z",
"severity": "MODERATE"
},
"details": "JBoss RichFaces before 4.5.4 allows remote attackers to inject expression language (EL) expressions and execute arbitrary Java code via the do parameter.",
"id": "GHSA-8cc3-p77g-5pcc",
"modified": "2022-05-14T00:55:57Z",
"published": "2022-05-14T00:55:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2015-0279"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=1192140"
},
{
"type": "WEB",
"url": "http://jvn.jp/en/jp/JVN56297719/index.html"
},
{
"type": "WEB",
"url": "http://jvndb.jvn.jp/en/contents/2015/JVNDB-2015-001959.html"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/153734/Tufin-Secure-Change-Remote-Code-Execution.html"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/156663/Richsploit-RichFaces-Exploitation-Toolkit.html"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2015-0719.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2019/Jul/21"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2020/Mar/21"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8CGG-97VC-PP86
Vulnerability from github – Published: 2022-03-28 00:00 – Updated: 2022-04-01 00:00Marky commit 3686565726c65756e was discovered to contain a remote code execution (RCE) vulnerability via the Display text fields. This vulnerability allows attackers to execute arbitrary code via injection of a crafted payload.
{
"affected": [],
"aliases": [
"CVE-2022-26205"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-03-27T01:15:00Z",
"severity": "CRITICAL"
},
"details": "Marky commit 3686565726c65756e was discovered to contain a remote code execution (RCE) vulnerability via the Display text fields. This vulnerability allows attackers to execute arbitrary code via injection of a crafted payload.",
"id": "GHSA-8cgg-97vc-pp86",
"modified": "2022-04-01T00:00:49Z",
"published": "2022-03-28T00:00:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-26205"
},
{
"type": "WEB",
"url": "https://github.com/V1ntLyn/marky_3686565726c65756e"
}
],
"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-8CJ5-HXPV-XWGG
Vulnerability from github – Published: 2022-05-01 02:19 – Updated: 2025-04-03 04:19The CodeSupport.ocx ActiveX control, as used by Sony to uninstall the First4Internet XCP DRM, has "safe for scripting" enabled, which allows remote attackers to execute arbitrary code by calling vulnerable functions such as RebootMachine, IsAdministrator, and ExecuteCode.
{
"affected": [],
"aliases": [
"CVE-2005-3650"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2005-11-17T11:02:00Z",
"severity": "HIGH"
},
"details": "The CodeSupport.ocx ActiveX control, as used by Sony to uninstall the First4Internet XCP DRM, has \"safe for scripting\" enabled, which allows remote attackers to execute arbitrary code by calling vulnerable functions such as RebootMachine, IsAdministrator, and ExecuteCode.",
"id": "GHSA-8cj5-hxpv-xwgg",
"modified": "2025-04-03T04:19:53Z",
"published": "2022-05-01T02:19:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2005-3650"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/23063"
},
{
"type": "WEB",
"url": "http://hack.fi/~muzzy/sony-drm"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/17610"
},
{
"type": "WEB",
"url": "http://www.freedom-to-tinker.com/?p=927"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/312073"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/20887"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/15430"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2005/2454"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8CJP-9CG5-VCJH
Vulnerability from github – Published: 2026-03-11 06:31 – Updated: 2026-03-11 06:31Code injection vulnerability exists in MR-GM5L-S1 and MR-GM5A-L1, which may allow an attacker with administrative privileges to execute arbitrary commands.
{
"affected": [],
"aliases": [
"CVE-2026-20892"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-11T06:17:13Z",
"severity": "HIGH"
},
"details": "Code injection vulnerability exists in MR-GM5L-S1 and MR-GM5A-L1, which may allow an attacker with administrative privileges to execute arbitrary commands.",
"id": "GHSA-8cjp-9cg5-vcjh",
"modified": "2026-03-11T06:31:41Z",
"published": "2026-03-11T06:31:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-20892"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/vu/JVNVU98103854"
},
{
"type": "WEB",
"url": "https://www.mrl.co.jp/download/security/JVNVU98103854.pdf"
}
],
"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"
},
{
"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-8CJQ-457M-XW4W
Vulnerability from github – Published: 2022-05-17 03:35 – Updated: 2022-05-17 03:35HP Continuous Delivery Automation (CDA) 1.30 allows remote attackers to execute arbitrary commands via a crafted serialized Java object, related to the Apache Commons Collections library.
{
"affected": [],
"aliases": [
"CVE-2016-1986"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2016-02-12T01:59:00Z",
"severity": "CRITICAL"
},
"details": "HP Continuous Delivery Automation (CDA) 1.30 allows remote attackers to execute arbitrary commands via a crafted serialized Java object, related to the Apache Commons Collections library.",
"id": "GHSA-8cjq-457m-xw4w",
"modified": "2022-05-17T03:35:56Z",
"published": "2022-05-17T03:35:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-1986"
},
{
"type": "WEB",
"url": "https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c04958567"
}
],
"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"
}
]
}
GHSA-8CW5-3844-5574
Vulnerability from github – Published: 2022-05-02 03:57 – Updated: 2022-05-02 03:57Unspecified vulnerability in the JASS script interpreter in Warcraft III: The Frozen Throne 1.24b and earlier allows user-assisted remote attackers to execute arbitrary code via a crafted custom map. NOTE: some of these details are obtained from third party information.
{
"affected": [],
"aliases": [
"CVE-2009-4768"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-04-20T14:30:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in the JASS script interpreter in Warcraft III: The Frozen Throne 1.24b and earlier allows user-assisted remote attackers to execute arbitrary code via a crafted custom map. NOTE: some of these details are obtained from third party information.",
"id": "GHSA-8cw5-3844-5574",
"modified": "2022-05-02T03:57:55Z",
"published": "2022-05-02T03:57:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-4768"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/54324"
},
{
"type": "WEB",
"url": "http://forums.battle.net/thread.html?topicId=16888549346"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37390"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/37052"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8CX9-HX49-R833
Vulnerability from github – Published: 2023-07-13 06:30 – Updated: 2024-04-04 06:06Code injection vulnerability in ELECOM wireless LAN routers allows a network-adjacent authenticated attacker to execute arbitrary code by sending a specially crafted request. Affected products and versions are as follows: WRC-1167GHBK-S v1.03 and earlier, WRC-1167GEBK-S v1.03 and earlier, WRC-1167FEBK-S v1.04 and earlier, WRC-1167GHBK3-A v1.24 and earlier, and WRC-1167FEBK-A v1.18 and earlier.
{
"affected": [],
"aliases": [
"CVE-2023-37565"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-07-13T04:15:10Z",
"severity": "HIGH"
},
"details": "Code injection vulnerability in ELECOM wireless LAN routers allows a network-adjacent authenticated attacker to execute arbitrary code by sending a specially crafted request. Affected products and versions are as follows: WRC-1167GHBK-S v1.03 and earlier, WRC-1167GEBK-S v1.03 and earlier, WRC-1167FEBK-S v1.04 and earlier, WRC-1167GHBK3-A v1.24 and earlier, and WRC-1167FEBK-A v1.18 and earlier.",
"id": "GHSA-8cx9-hx49-r833",
"modified": "2024-04-04T06:06:36Z",
"published": "2023-07-13T06:30:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-37565"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/jp/JVN05223215"
},
{
"type": "WEB",
"url": "https://www.elecom.co.jp/news/security/20230711-01"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:L/PR:L/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.