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.
8378 vulnerabilities reference this CWE, most recent first.
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"
}
]
}
GHSA-8CXX-C564-663P
Vulnerability from github – Published: 2022-05-17 04:43 – Updated: 2022-05-17 04:43DataLife Engine (DLE) 9.7 allows remote attackers to execute arbitrary PHP code via the catlist[] parameter to engine/preview.php, which is used in a preg_replace function call with an e modifier.
{
"affected": [],
"aliases": [
"CVE-2013-1412"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-06-02T15:55:00Z",
"severity": "HIGH"
},
"details": "DataLife Engine (DLE) 9.7 allows remote attackers to execute arbitrary PHP code via the catlist[] parameter to engine/preview.php, which is used in a preg_replace function call with an e modifier.",
"id": "GHSA-8cxx-c564-663p",
"modified": "2022-05-17T04:43:02Z",
"published": "2022-05-17T04:43:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-1412"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/bugtraq/2013-01/0117.html"
},
{
"type": "WEB",
"url": "http://dleviet.com/dle/bug-fix/3281-security-patches-for-dle-97.html"
},
{
"type": "WEB",
"url": "http://karmainsecurity.com/KIS-2013-01"
},
{
"type": "WEB",
"url": "http://osvdb.org/89662"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/51971"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/24438"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/24444"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/57603"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8F8R-Q8V9-7RCF
Vulnerability from github – Published: 2022-05-17 02:24 – Updated: 2022-05-17 02:24dayrui FineCms 5.0.9 has remote PHP code execution via the param parameter in an action=cache request to libraries/Template.php, aka Eval Injection.
{
"affected": [],
"aliases": [
"CVE-2017-11585"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-07-24T00:29:00Z",
"severity": "CRITICAL"
},
"details": "dayrui FineCms 5.0.9 has remote PHP code execution via the param parameter in an action=cache request to libraries/Template.php, aka Eval Injection.",
"id": "GHSA-8f8r-q8v9-7rcf",
"modified": "2022-05-17T02:24:07Z",
"published": "2022-05-17T02:24:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-11585"
},
{
"type": "WEB",
"url": "http://lorexxar.cn/2017/07/20/FineCMS%20multi%20vulnerablity%20before%20v5.0.9/#remote-php-code-execution"
}
],
"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-8FFC-79XG-29W8
Vulnerability from github – Published: 2022-02-12 00:00 – Updated: 2022-08-11 19:20When running Apache Cassandra with the following configuration: enable_user_defined_functions: true enable_scripted_user_defined_functions: true enable_user_defined_functions_threads: false it is possible for an attacker to execute arbitrary code on the host. The attacker would need to have enough permissions to create user defined functions in the cluster to be able to exploit this. Note that this configuration is documented as unsafe, and will continue to be considered unsafe after this CVE.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.cassandra:cassandra-all"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.0.26"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.cassandra:cassandra-all"
},
"ranges": [
{
"events": [
{
"introduced": "3.11.0"
},
{
"fixed": "3.11.12"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.cassandra:cassandra-all"
},
"ranges": [
{
"events": [
{
"introduced": "4.0.0"
},
{
"fixed": "4.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-44521"
],
"database_specific": {
"cwe_ids": [
"CWE-732",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-02-23T16:10:04Z",
"nvd_published_at": "2022-02-11T13:15:00Z",
"severity": "CRITICAL"
},
"details": "When running Apache Cassandra with the following configuration: enable_user_defined_functions: true enable_scripted_user_defined_functions: true enable_user_defined_functions_threads: false it is possible for an attacker to execute arbitrary code on the host. The attacker would need to have enough permissions to create user defined functions in the cluster to be able to exploit this. Note that this configuration is documented as unsafe, and will continue to be considered unsafe after this CVE.",
"id": "GHSA-8ffc-79xg-29w8",
"modified": "2022-08-11T19:20:55Z",
"published": "2022-02-12T00:00:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-44521"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/cassandra"
},
{
"type": "WEB",
"url": "https://issues.apache.org/jira/browse/CASSANDRA-17352"
},
{
"type": "WEB",
"url": "https://jfrog.com/blog/cve-2021-44521-exploiting-apache-cassandra-user-defined-functions-for-remote-code-execution"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/y4nb9s4co34j8hdfmrshyl09lokm7356"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20220225-0001"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2022/02/11/4"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Apache Cassandra vulnerable to Code Injection due to unsafe configuration"
}
GHSA-8FFW-GXC2-M2WC
Vulnerability from github – Published: 2022-05-14 01:13 – Updated: 2022-05-14 01:13Application/Admin/Controller/ConfigController.class.php in 74cms v5.0.1 allows remote attackers to execute arbitrary PHP code via the index.php?m=Admin&c=config&a=edit site_domain parameter.
{
"affected": [],
"aliases": [
"CVE-2019-10684"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-04-01T16:29:00Z",
"severity": "CRITICAL"
},
"details": "Application/Admin/Controller/ConfigController.class.php in 74cms v5.0.1 allows remote attackers to execute arbitrary PHP code via the index.php?m=Admin\u0026c=config\u0026a=edit site_domain parameter.",
"id": "GHSA-8ffw-gxc2-m2wc",
"modified": "2022-05-14T01:13:34Z",
"published": "2022-05-14T01:13:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-10684"
},
{
"type": "WEB",
"url": "https://github.com/kyrie403/Vuln/blob/master/74cms/74cms%20v5.0.1%20remote%20code%20execution.md"
}
],
"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-8FGR-W2W7-3965
Vulnerability from github – Published: 2023-03-22 00:30 – Updated: 2023-03-24 21:30An issue found in Paradox Security Systems IPR512 allows attackers to cause a denial of service via the login.html and login.xml parameters.
{
"affected": [],
"aliases": [
"CVE-2023-24709"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-03-21T23:15:00Z",
"severity": "HIGH"
},
"details": "An issue found in Paradox Security Systems IPR512 allows attackers to cause a denial of service via the login.html and login.xml parameters.",
"id": "GHSA-8fgr-w2w7-3965",
"modified": "2023-03-24T21:30:54Z",
"published": "2023-03-22T00:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-24709"
},
{
"type": "WEB",
"url": "https://github.com/SlashXzerozero/Injection-vulnerability-in-Paradox-Security-Systems-IPR512"
},
{
"type": "WEB",
"url": "https://github.com/sunktitanic/Injection-vulnerability-in-Paradox-Security-Systems-IPR512"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/171783/Paradox-Security-Systems-IPR512-Denial-Of-Service.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-8FH9-FCCM-V79P
Vulnerability from github – Published: 2022-05-02 06:20 – Updated: 2022-05-02 06:20Unspecified vulnerability in Microsoft Office Excel 2002 SP3, Office 2004 for Mac, Office 2008 for Mac, and Open XML File Format Converter for Mac allows remote attackers to execute arbitrary code via an Excel file with a malformed SxView (0xB0) record, aka "Excel Record Memory Corruption Vulnerability," a different vulnerability than CVE-2010-0824 and CVE-2010-0821.
{
"affected": [],
"aliases": [
"CVE-2010-1245"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-06-08T20:30:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in Microsoft Office Excel 2002 SP3, Office 2004 for Mac, Office 2008 for Mac, and Open XML File Format Converter for Mac allows remote attackers to execute arbitrary code via an Excel file with a malformed SxView (0xB0) record, aka \"Excel Record Memory Corruption Vulnerability,\" a different vulnerability than CVE-2010-0824 and CVE-2010-0821.",
"id": "GHSA-8fh9-fccm-v79p",
"modified": "2022-05-02T06:20:35Z",
"published": "2022-05-02T06:20:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-1245"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2010/ms10-038"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6877"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/511753/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA10-159B.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8FP9-43PW-56VW
Vulnerability from github – Published: 2023-08-15 18:31 – Updated: 2023-08-22 18:38An issue in pandas-ai v.0.8.1 and before allows a remote attacker to execute arbitrary code via the _is_jailbreak function.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "pandasai"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.8.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-39661"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-08-15T21:10:21Z",
"nvd_published_at": "2023-08-15T17:15:13Z",
"severity": "CRITICAL"
},
"details": "An issue in pandas-ai v.0.8.1 and before allows a remote attacker to execute arbitrary code via the `_is_jailbreak` function.",
"id": "GHSA-8fp9-43pw-56vw",
"modified": "2023-08-22T18:38:18Z",
"published": "2023-08-15T18:31:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-39661"
},
{
"type": "WEB",
"url": "https://github.com/gventuri/pandas-ai/issues/410"
},
{
"type": "PACKAGE",
"url": "https://github.com/gventuri/pandas-ai"
}
],
"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"
}
],
"summary": "PandasAI vulnerable to arbitrary code execution"
}
GHSA-8FQ9-7WWX-42V9
Vulnerability from github – Published: 2024-06-19 21:32 – Updated: 2024-07-03 18:46In the module "Module Live Chat Pro (All in One Messaging)" (livechatpro) <=8.4.0, a guest can perform PHP Code injection. Due to a predictable token, the method Lcp::saveTranslations() suffer of a white writer that can inject PHP code into a PHP file.
{
"affected": [],
"aliases": [
"CVE-2024-36679"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-06-19T21:15:57Z",
"severity": "CRITICAL"
},
"details": "In the module \"Module Live Chat Pro (All in One Messaging)\" (livechatpro) \u003c=8.4.0, a guest can perform PHP Code injection. Due to a predictable token, the method `Lcp::saveTranslations()` suffer of a white writer that can inject PHP code into a PHP file.",
"id": "GHSA-8fq9-7wwx-42v9",
"modified": "2024-07-03T18:46:04Z",
"published": "2024-06-19T21:32:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-36679"
},
{
"type": "WEB",
"url": "https://security.friendsofpresta.org/modules/2024/06/18/livechatpro.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/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.