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.
8387 vulnerabilities reference this CWE, most recent first.
GHSA-66M2-493M-CRH2
Vulnerability from github – Published: 2023-09-25 18:37 – Updated: 2024-10-09 22:52An issue in Arjun Sharda's Searchor before version v.2.4.2 allows an attacker to execute arbitrary code via a crafted script to the eval() function in Searchor's src/searchor/main.py file, affecting the search feature in Searchor's CLI (Command Line Interface).
Impact
Versions equal to, or below 2.4.1 are affected.
Patches
Versions above, or equal to 2.4.2 have patched the vulnerability.
References
https://github.com/nikn0laty/Exploit-for-Searchor-2.4.0-Arbitrary-CMD-Injection https://github.com/nexis-nexis/Searchor-2.4.0-POC-Exploit- https://github.com/jonnyzar/POC-Searchor-2.4.2 https://github.com/ArjunSharda/Searchor/pull/130
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2.4.1"
},
"package": {
"ecosystem": "PyPI",
"name": "searchor"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.4.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-43364"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-09-25T18:37:51Z",
"nvd_published_at": "2023-12-12T18:15:22Z",
"severity": "CRITICAL"
},
"details": " An issue in Arjun Sharda\u0027s Searchor before version v.2.4.2 allows an attacker to\n execute arbitrary code via a crafted script to the eval() function in Searchor\u0027s src/searchor/main.py file, affecting the search feature in Searchor\u0027s CLI (Command Line Interface).\n\n### Impact\nVersions equal to, or below 2.4.1 are affected.\n\n### Patches\nVersions above, or equal to 2.4.2 have patched the vulnerability.\n\n### References\nhttps://github.com/nikn0laty/Exploit-for-Searchor-2.4.0-Arbitrary-CMD-Injection\nhttps://github.com/nexis-nexis/Searchor-2.4.0-POC-Exploit-\nhttps://github.com/jonnyzar/POC-Searchor-2.4.2\nhttps://github.com/ArjunSharda/Searchor/pull/130",
"id": "GHSA-66m2-493m-crh2",
"modified": "2024-10-09T22:52:25Z",
"published": "2023-09-25T18:37:51Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/ArjunSharda/Searchor/security/advisories/GHSA-66m2-493m-crh2"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-43364"
},
{
"type": "WEB",
"url": "https://github.com/ArjunSharda/Searchor/pull/130"
},
{
"type": "WEB",
"url": "https://github.com/ArjunSharda/Searchor/commit/16016506f7bf92b0f21f51841d599126d6fcd15b"
},
{
"type": "PACKAGE",
"url": "https://github.com/ArjunSharda/Searchor"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-66m2-493m-crh2"
},
{
"type": "WEB",
"url": "https://github.com/nexis-nexis/Searchor-2.4.0-POC-Exploit-"
},
{
"type": "WEB",
"url": "https://github.com/nikn0laty/Exploit-for-Searchor-2.4.0-Arbitrary-CMD-Injection"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/searchor/PYSEC-2023-262.yaml"
}
],
"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": "Searchor CLI\u0027s Search vulnerable to Arbitrary Code using Eval"
}
GHSA-66QF-7H58-9Q6Q
Vulnerability from github – Published: 2025-04-16 18:31 – Updated: 2025-04-17 15:32A remote code execution (RCE) vulnerability in the upload_file function of LRQA Nettitude PoshC2 after commit 123db87 allows authenticated attackers to execute arbitrary code via a crafted POST request.
{
"affected": [],
"aliases": [
"CVE-2024-53303"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-04-16T18:16:03Z",
"severity": "HIGH"
},
"details": "A remote code execution (RCE) vulnerability in the upload_file function of LRQA Nettitude PoshC2 after commit 123db87 allows authenticated attackers to execute arbitrary code via a crafted POST request.",
"id": "GHSA-66qf-7h58-9q6q",
"modified": "2025-04-17T15:32:33Z",
"published": "2025-04-16T18:31:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-53303"
},
{
"type": "WEB",
"url": "https://gist.github.com/fern89/3464e8428d7675e4f0f390a6b2b2842e"
}
],
"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-66QP-P5X9-XHXC
Vulnerability from github – Published: 2025-01-08 09:30 – Updated: 2026-04-08 21:32The WordPress File Upload plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 4.24.12 via the 'wfu_ABSPATH' cookie parameter. This makes it possible for unauthenticated attackers to execute code on the server.
{
"affected": [],
"aliases": [
"CVE-2024-11635"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-08T08:15:24Z",
"severity": "CRITICAL"
},
"details": "The WordPress File Upload plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 4.24.12 via the \u0027wfu_ABSPATH\u0027 cookie parameter. This makes it possible for unauthenticated attackers to execute code on the server.",
"id": "GHSA-66qp-p5x9-xhxc",
"modified": "2026-04-08T21:32:59Z",
"published": "2025-01-08T09:30:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-11635"
},
{
"type": "WEB",
"url": "https://abrahack.com/posts/wp-file-upload-rce-part1"
},
{
"type": "WEB",
"url": "https://plugins.svn.wordpress.org/wp-file-upload/trunk/wfu_file_downloader.php"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/b5165f60-6515-4a2c-a124-cc88155eaf01?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-66RH-2CVM-487W
Vulnerability from github – Published: 2026-06-26 03:31 – Updated: 2026-06-26 03:31Bypass to the fix for CVE-2026-34916. Variants of such vectors have been also reported by phucrio and offsetmd. The fix can be bypassed either by sending a disallowed but otherwise valid plugin identifier as type, or using the ox.setChannelTargeting XML-RPC API method.
{
"affected": [],
"aliases": [
"CVE-2026-50741"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-26T02:16:53Z",
"severity": "HIGH"
},
"details": "Bypass to the fix for CVE-2026-34916. Variants of such vectors have been also reported by phucrio and offsetmd. The fix can be bypassed either by sending a disallowed but otherwise valid plugin identifier as `type`, or using the `ox.setChannelTargeting` XML-RPC API method.",
"id": "GHSA-66rh-2cvm-487w",
"modified": "2026-06-26T03:31:30Z",
"published": "2026-06-26T03:31:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-50741"
},
{
"type": "WEB",
"url": "https://hackerone.com/reports/3780854"
},
{
"type": "WEB",
"url": "https://hackerone.com/reports/3781492"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-66V4-M3QW-Q2CH
Vulnerability from github – Published: 2022-05-01 23:36 – Updated: 2022-05-01 23:36Multiple PHP remote file inclusion vulnerabilities in Quantum Game Library 0.7.2c allow remote attackers to execute arbitrary PHP code via a URL in the CONFIG[gameroot] parameter to (1) server_request.php and (2) qlib/smarty.inc.php.
{
"affected": [],
"aliases": [
"CVE-2008-1069"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-02-28T21:44:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Quantum Game Library 0.7.2c allow remote attackers to execute arbitrary PHP code via a URL in the CONFIG[gameroot] parameter to (1) server_request.php and (2) qlib/smarty.inc.php.",
"id": "GHSA-66v4-m3qw-q2ch",
"modified": "2022-05-01T23:36:24Z",
"published": "2022-05-01T23:36:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-1069"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/40776"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5174"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/29077"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/27945"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-66X7-VP27-6978
Vulnerability from github – Published: 2022-05-02 03:33 – Updated: 2022-05-02 03:33Unrestricted file upload vulnerability in member/uploads_edit.php in dedecms 5.3 allows remote attackers to execute arbitrary code by uploading a file with a double extension in the filename, then accessing this file via unspecified vectors, as demonstrated by a .jpg.php filename.
{
"affected": [],
"aliases": [
"CVE-2009-2270"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-07-01T13:00:00Z",
"severity": "MODERATE"
},
"details": "Unrestricted file upload vulnerability in member/uploads_edit.php in dedecms 5.3 allows remote attackers to execute arbitrary code by uploading a file with a double extension in the filename, then accessing this file via unspecified vectors, as demonstrated by a .jpg.php filename.",
"id": "GHSA-66x7-vp27-6978",
"modified": "2022-05-02T03:33:29Z",
"published": "2022-05-02T03:33:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-2270"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/504653/100/0/threaded"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-66XR-7V4J-5CXX
Vulnerability from github – Published: 2022-05-24 17:16 – Updated: 2022-05-24 17:16The BPM component in Genius Bytes Genius Server (Genius CDDS) 3.2.2 allows remote authenticated users to execute arbitrary commands.
{
"affected": [],
"aliases": [
"CVE-2019-16652"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-04-29T13:15:00Z",
"severity": "MODERATE"
},
"details": "The BPM component in Genius Bytes Genius Server (Genius CDDS) 3.2.2 allows remote authenticated users to execute arbitrary commands.",
"id": "GHSA-66xr-7v4j-5cxx",
"modified": "2022-05-24T17:16:48Z",
"published": "2022-05-24T17:16:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-16652"
},
{
"type": "WEB",
"url": "https://www.quantumleap.it/genius-bytes-genius-server-v-3-2-2-multiple-vulnerabilities"
},
{
"type": "WEB",
"url": "https://www.quantumleap.it/news/advisory"
},
{
"type": "WEB",
"url": "https://www2.deloitte.com/it/it/pages/risk/articles/security-advisory-article---deloitte-italy---risk.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6722-XVQ8-3254
Vulnerability from github – Published: 2023-03-06 06:30 – Updated: 2023-03-13 15:29All versions of the package sketchsvg are vulnerable to Arbitrary Code Injection when invoking shell.exec without sanitization nor parametrization while concatenating the current directory as part of the command string.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "sketchsvg"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.0.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-26107"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-03-07T20:30:33Z",
"nvd_published_at": "2023-03-06T05:15:00Z",
"severity": "HIGH"
},
"details": "All versions of the package sketchsvg are vulnerable to Arbitrary Code Injection when invoking `shell.exec` without sanitization nor parametrization while concatenating the current directory as part of the command string.",
"id": "GHSA-6722-xvq8-3254",
"modified": "2023-03-13T15:29:04Z",
"published": "2023-03-06T06:30:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-26107"
},
{
"type": "PACKAGE",
"url": "https://github.com/eBay/SketchSVG"
},
{
"type": "WEB",
"url": "https://github.com/eBay/SketchSVG/blob/dd1036648f0f320a3187ef79d506b676b9eb87a6/lib/index.js#23L115"
},
{
"type": "WEB",
"url": "https://github.com/eBay/SketchSVG/blob/dd1036648f0f320a3187ef79d506b676b9eb87a6/lib/index.js#23L64"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/SNYK-JS-SKETCHSVG-3167969"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "SketchSVG Arbitrary Code Injection vulnerability"
}
GHSA-6752-RC3X-WWPR
Vulnerability from github – Published: 2022-05-17 00:46 – Updated: 2022-05-17 00:46PHP remote file inclusion vulnerability in SezHooTabsAndActions.php in SezHoo 0.1 allows remote attackers to execute arbitrary PHP code via a URL in the IP parameter.
{
"affected": [],
"aliases": [
"CVE-2008-4704"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-10-23T17:17:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in SezHooTabsAndActions.php in SezHoo 0.1 allows remote attackers to execute arbitrary PHP code via a URL in the IP parameter.",
"id": "GHSA-6752-rc3x-wwpr",
"modified": "2022-05-17T00:46:46Z",
"published": "2022-05-17T00:46:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-4704"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/45859"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/6751"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/4473"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/31756"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-675M-3FCR-3CVG
Vulnerability from github – Published: 2025-09-24 15:31 – Updated: 2025-09-24 15:31NVIDIA Megatron-LM for all platforms contains a vulnerability in the tasks/orqa/unsupervised/nq.py component, where an attacker may cause a code injection. A successful exploit of this vulnerability may lead to code execution, escalation of privileges, information disclosure, and data tampering.
{
"affected": [],
"aliases": [
"CVE-2025-23349"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-09-24T14:15:48Z",
"severity": "HIGH"
},
"details": "NVIDIA Megatron-LM for all platforms contains a vulnerability in the tasks/orqa/unsupervised/nq.py component, where an attacker may cause a code injection. A successful exploit of this vulnerability may lead to code execution, escalation of privileges, information disclosure, and data tampering.",
"id": "GHSA-675m-3fcr-3cvg",
"modified": "2025-09-24T15:31:14Z",
"published": "2025-09-24T15:31:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-23349"
},
{
"type": "WEB",
"url": "https://nvidia.custhelp.com/app/answers/detail/a_id/5698"
},
{
"type": "WEB",
"url": "https://www.cve.org/CVERecord?id=CVE-2025-23349"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/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.