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.
8342 vulnerabilities reference this CWE, most recent first.
GHSA-CP9Q-6FWR-C66G
Vulnerability from github – Published: 2023-12-27 21:31 – Updated: 2024-01-09 21:30The com.phlox.tvwebbrowser TV Bro application through 2.0.0 for Android mishandles external intents through WebView. This allows attackers to execute arbitrary code, create arbitrary files. and perform arbitrary downloads via JavaScript that uses takeBlobDownloadData.
{
"affected": [],
"aliases": [
"CVE-2023-43955"
],
"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.phlox.tvwebbrowser TV Bro application through 2.0.0 for Android mishandles external intents through WebView. This allows attackers to execute arbitrary code, create arbitrary files. and perform arbitrary downloads via JavaScript that uses takeBlobDownloadData.",
"id": "GHSA-cp9q-6fwr-c66g",
"modified": "2024-01-09T21:30:28Z",
"published": "2023-12-27T21:31:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-43955"
},
{
"type": "WEB",
"url": "https://github.com/truefedex/tv-bro/pull/182#issue-1901769895"
},
{
"type": "WEB",
"url": "https://github.com/actuator/com.phlox.tvwebbrowser"
},
{
"type": "WEB",
"url": "https://github.com/actuator/com.phlox.tvwebbrowser/blob/main/CWE-94.md"
},
{
"type": "WEB",
"url": "https://github.com/actuator/com.phlox.tvwebbrowser/blob/main/poc.apk"
}
],
"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-CP9W-GP2M-QFM3
Vulnerability from github – Published: 2023-11-15 15:30 – Updated: 2023-11-15 15:30EC-CUBE 3 series (3.0.0 to 3.0.18-p6) and 4 series (4.0.0 to 4.0.6-p3, 4.1.0 to 4.1.2-p2, and 4.2.0 to 4.2.2) contain an arbitrary code execution vulnerability due to improper settings of the template engine Twig included in the product. As a result, arbitrary code may be executed on the server where the product is running by a user with an administrative privilege.
{
"affected": [],
"aliases": [
"CVE-2023-46845"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-11-07T08:15:24Z",
"severity": "HIGH"
},
"details": "EC-CUBE 3 series (3.0.0 to 3.0.18-p6) and 4 series (4.0.0 to 4.0.6-p3, 4.1.0 to 4.1.2-p2, and 4.2.0 to 4.2.2) contain an arbitrary code execution vulnerability due to improper settings of the template engine Twig included in the product. As a result, arbitrary code may be executed on the server where the product is running by a user with an administrative privilege.",
"id": "GHSA-cp9w-gp2m-qfm3",
"modified": "2023-11-15T15:30:20Z",
"published": "2023-11-15T15:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-46845"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/jp/JVN29195731"
},
{
"type": "WEB",
"url": "https://www.ec-cube.net/info/weakness/20231026/index.php"
},
{
"type": "WEB",
"url": "https://www.ec-cube.net/info/weakness/20231026/index_3.php"
},
{
"type": "WEB",
"url": "https://www.ec-cube.net/info/weakness/20231026/index_40.php"
}
],
"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"
}
]
}
GHSA-CPC2-W66G-C9XG
Vulnerability from github – Published: 2022-05-17 00:41 – Updated: 2022-05-17 00:41PHP remote file inclusion vulnerability in includes/todofleetcontrol.php in an older version of Xnova, possibly 0.8 sp1, allows remote attackers to execute arbitrary PHP code via a URL in the ugamela_root_path parameter.
{
"affected": [],
"aliases": [
"CVE-2008-6022"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-02T22:00:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in includes/todofleetcontrol.php in an older version of Xnova, possibly 0.8 sp1, allows remote attackers to execute arbitrary PHP code via a URL in the ugamela_root_path parameter.",
"id": "GHSA-cpc2-w66g-c9xg",
"modified": "2022-05-17T00:41:39Z",
"published": "2022-05-17T00:41:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6022"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/44513"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/6254"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/30715"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-CPCV-4Q8J-MRGM
Vulnerability from github – Published: 2022-05-17 03:49 – Updated: 2022-05-17 03:49Huawei Unified Maintenance Audit (UMA) before V200R001C00SPC200 allows remote attackers to execute arbitrary commands via "special characters," a different vulnerability than CVE-2016-7109.
{
"affected": [],
"aliases": [
"CVE-2016-7110"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2016-09-07T19:28:00Z",
"severity": "CRITICAL"
},
"details": "Huawei Unified Maintenance Audit (UMA) before V200R001C00SPC200 allows remote attackers to execute arbitrary commands via \"special characters,\" a different vulnerability than CVE-2016-7109.",
"id": "GHSA-cpcv-4q8j-mrgm",
"modified": "2022-05-17T03:49:15Z",
"published": "2022-05-17T03:49:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-7110"
},
{
"type": "WEB",
"url": "http://www.huawei.com/en/psirt/security-advisories/huawei-sa-20160824-01-uma-en"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/92617"
}
],
"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-CPFF-VH9V-HMCH
Vulnerability from github – Published: 2024-04-08 15:30 – Updated: 2024-08-13 18:31TOTOLINK EX200 V4.0.3c.7646_B20201211 was discovered to contain a remote code execution (RCE) vulnerability via the hostTime parameter in the NTPSyncWithHost function.
{
"affected": [],
"aliases": [
"CVE-2024-31807"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-08T13:15:08Z",
"severity": "CRITICAL"
},
"details": "TOTOLINK EX200 V4.0.3c.7646_B20201211 was discovered to contain a remote code execution (RCE) vulnerability via the hostTime parameter in the NTPSyncWithHost function.",
"id": "GHSA-cpff-vh9v-hmch",
"modified": "2024-08-13T18:31:13Z",
"published": "2024-04-08T15:30:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31807"
},
{
"type": "WEB",
"url": "https://github.com/4hsien/CVE-vulns/blob/main/TOTOLINK/EX200/CI_2_NTPSyncWithHost/CI.md"
}
],
"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-CPG7-WF7F-WC2R
Vulnerability from github – Published: 2022-05-17 03:30 – Updated: 2025-04-11 04:16The setgid wrapper libx2go-server-db-sqlite3-wrapper.c in X2Go Server before 4.0.0.2 allows remote attackers to execute arbitrary code via unspecified vectors, related to the path to libx2go-server-db-sqlite3-wrapper.pl.
{
"affected": [],
"aliases": [
"CVE-2013-4376"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-12-09T16:36:00Z",
"severity": "HIGH"
},
"details": "The setgid wrapper libx2go-server-db-sqlite3-wrapper.c in X2Go Server before 4.0.0.2 allows remote attackers to execute arbitrary code via unspecified vectors, related to the path to libx2go-server-db-sqlite3-wrapper.pl.",
"id": "GHSA-cpg7-wf7f-wc2r",
"modified": "2025-04-11T04:16:45Z",
"published": "2022-05-17T03:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-4376"
},
{
"type": "WEB",
"url": "https://lists.berlios.de/pipermail/x2go-announcement/2013-May/000125.html"
},
{
"type": "WEB",
"url": "http://code.x2go.org/gitweb?p=x2goserver.git%3Ba=commit%3Bh=42264c88d7885474ebe3763b2991681ddfcfa69a"
},
{
"type": "WEB",
"url": "http://code.x2go.org/gitweb?p=x2goserver.git;a=commit;h=42264c88d7885474ebe3763b2991681ddfcfa69a"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-201310-19.xml"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2013/09/25/11"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-CPJH-38CR-5HJX
Vulnerability from github – Published: 2024-03-12 00:30 – Updated: 2024-08-01 15:31GV-ASManager V6.0.1.0 contains a Local File Inclusion vulnerability in GeoWebServer via Path.
{
"affected": [],
"aliases": [
"CVE-2022-46070"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-11T22:15:54Z",
"severity": "HIGH"
},
"details": "GV-ASManager V6.0.1.0 contains a Local File Inclusion vulnerability in GeoWebServer via Path.",
"id": "GHSA-cpjh-38cr-5hjx",
"modified": "2024-08-01T15:31:32Z",
"published": "2024-03-12T00:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-46070"
},
{
"type": "WEB",
"url": "https://s3.amazonaws.com/geovision_downloads/TechNotice/CyberSecurity/Security_Advistory_ASManager-ASM-2022-11.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-CPJQ-97HC-MC3C
Vulnerability from github – Published: 2022-05-24 17:47 – Updated: 2022-05-24 17:47SAP Commerce, versions - 1808, 1811, 1905, 2005, 2011, Backoffice application allows certain authorized users to create source rules which are translated to drools rule when published to certain modules within the application. An attacker with this authorization can inject malicious code in the source rules and perform remote code execution enabling them to compromise the confidentiality, integrity and availability of the application.
{
"affected": [],
"aliases": [
"CVE-2021-27602"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-04-13T19:15:00Z",
"severity": "CRITICAL"
},
"details": "SAP Commerce, versions - 1808, 1811, 1905, 2005, 2011, Backoffice application allows certain authorized users to create source rules which are translated to drools rule when published to certain modules within the application. An attacker with this authorization can inject malicious code in the source rules and perform remote code execution enabling them to compromise the confidentiality, integrity and availability of the application.",
"id": "GHSA-cpjq-97hc-mc3c",
"modified": "2022-05-24T17:47:17Z",
"published": "2022-05-24T17:47:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-27602"
},
{
"type": "WEB",
"url": "https://launchpad.support.sap.com/#/notes/3040210"
},
{
"type": "WEB",
"url": "https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=573801649"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-CPM8-V4GW-HGVH
Vulnerability from github – Published: 2025-11-25 03:30 – Updated: 2025-11-25 03:30The Sneeit Framework plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 8.3 via the sneeit_articles_pagination_callback() function. This is due to the function accepting user input and then passing that through call_user_func(). This makes it possible for unauthenticated attackers to execute code on the server which can be leveraged to inject backdoors or, for example, create new administrative user accounts.
{
"affected": [],
"aliases": [
"CVE-2025-6389"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-11-25T03:15:44Z",
"severity": "CRITICAL"
},
"details": "The Sneeit Framework plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 8.3 via the sneeit_articles_pagination_callback() function. This is due to the function accepting user input and then passing that through call_user_func(). This makes it possible for unauthenticated attackers to execute code on the server which can be leveraged to inject backdoors or, for example, create new administrative user accounts.",
"id": "GHSA-cpm8-v4gw-hgvh",
"modified": "2025-11-25T03:30:20Z",
"published": "2025-11-25T03:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-6389"
},
{
"type": "WEB",
"url": "https://themeforest.net/item/flat-news-responsive-magazine-wordpress-theme/6000513#item-description__release-notes"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/b5ed8a39-50b0-4acf-9054-ba389c49f345?source=cve"
}
],
"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-CPQC-CF8W-F5WW
Vulnerability from github – Published: 2022-05-01 07:19 – Updated: 2022-05-01 07:19Multiple PHP remote file inclusion vulnerabilities in FlashChat before 4.6.2 allow remote attackers to execute arbitrary PHP code via a URL in the dir[inc] parameter in (1) inc/cmses/aedatingCMS.php, (2) inc/cmses/aedatingCMS2.php, or (3) inc/cmses/aedating4CMS.php.
{
"affected": [],
"aliases": [
"CVE-2006-4583"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-09-06T22:04:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in FlashChat before 4.6.2 allow remote attackers to execute arbitrary PHP code via a URL in the dir[inc] parameter in (1) inc/cmses/aedatingCMS.php, (2) inc/cmses/aedatingCMS2.php, or (3) inc/cmses/aedating4CMS.php.",
"id": "GHSA-cpqc-cf8w-f5ww",
"modified": "2022-05-01T07:19:59Z",
"published": "2022-05-01T07:19:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-4583"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/28706"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2293"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/21756"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1016784"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/445219/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/19826"
},
{
"type": "WEB",
"url": "http://www.tufat.com/changeLog2.htm"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/3449"
}
],
"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.