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.
8420 vulnerabilities reference this CWE, most recent first.
GHSA-H957-4JFH-QC3P
Vulnerability from github – Published: 2026-04-28 15:30 – Updated: 2026-04-28 15:30OpenCATS prior to commit 3002a29 contains a PHP code injection vulnerability in the installer AJAX endpoint that allows unauthenticated attackers to execute arbitrary code by injecting PHP statements into the databaseConnectivity action parameter. Attackers can break out of the define() string context in config.php using a single quote and statement separator to inject malicious PHP code that persists and executes on every subsequent page load when the installation wizard remains incomplete.
{
"affected": [],
"aliases": [
"CVE-2026-27760"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-04-28T15:16:26Z",
"severity": "CRITICAL"
},
"details": "OpenCATS prior to commit 3002a29 contains a PHP code injection vulnerability in the installer AJAX endpoint that allows unauthenticated attackers to execute arbitrary code by injecting PHP statements into the databaseConnectivity action parameter. Attackers can break out of the define() string context in config.php using a single quote and statement separator to inject malicious PHP code that persists and executes on every subsequent page load when the installation wizard remains incomplete.",
"id": "GHSA-h957-4jfh-qc3p",
"modified": "2026-04-28T15:30:51Z",
"published": "2026-04-28T15:30:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27760"
},
{
"type": "WEB",
"url": "https://github.com/opencats/OpenCATS/pull/706"
},
{
"type": "WEB",
"url": "https://github.com/opencats/OpenCATS/commit/3002a29f4c3cada1aa2c4f3d4ae4e189906606b6"
},
{
"type": "WEB",
"url": "https://chocapikk.com/posts/2026/opencats-installer-rce"
},
{
"type": "WEB",
"url": "https://github.com/opencats/OpenCATS/blob/46e4727/lib/CATSUtility.php#L142-L172"
},
{
"type": "WEB",
"url": "https://github.com/opencats/OpenCATS/blob/46e4727/modules/install/ajax/ui.php#L130"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/opencats-php-code-injection-via-installer-ajax-endpoint"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/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-H95W-P3X6-WWJ6
Vulnerability from github – Published: 2022-11-04 19:01 – Updated: 2025-05-02 21:57Froxlor prior to version 0.10.39 is vulnerable to Code Injection.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "froxlor/froxlor"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.10.39"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-3721"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-11-04T20:54:01Z",
"nvd_published_at": "2022-11-04T13:15:00Z",
"severity": "MODERATE"
},
"details": "Froxlor prior to version 0.10.39 is vulnerable to Code Injection.",
"id": "GHSA-h95w-p3x6-wwj6",
"modified": "2025-05-02T21:57:41Z",
"published": "2022-11-04T19:01:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-3721"
},
{
"type": "WEB",
"url": "https://github.com/froxlor/froxlor/commit/1182453c18a83309a3470b2775c148ede740806c"
},
{
"type": "PACKAGE",
"url": "https://github.com/froxlor/froxlor"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/a3c506f0-5f8a-4eaa-b8cc-46fb9e35cf7a"
},
{
"type": "WEB",
"url": "https://huntr.dev/bounties/a3c506f0-5f8a-4eaa-b8cc-46fb9e35cf7a"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Froxlor vulnerable to Code Injection"
}
GHSA-H95X-26F3-88HR
Vulnerability from github – Published: 2024-06-20 18:34 – Updated: 2024-07-05 17:36An issue in the component js2py.disable_pyimport() of js2py up to v0.74 allows attackers to execute arbitrary code via a crafted API call.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "js2py"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.74"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-28397"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-06-20T19:19:56Z",
"nvd_published_at": "2024-06-20T17:15:50Z",
"severity": "HIGH"
},
"details": "An issue in the component `js2py.disable_pyimport()` of js2py up to v0.74 allows attackers to execute arbitrary code via a crafted API call.",
"id": "GHSA-h95x-26f3-88hr",
"modified": "2024-07-05T17:36:08Z",
"published": "2024-06-20T18:34:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-28397"
},
{
"type": "WEB",
"url": "https://github.com/PiotrDabkowski/Js2Py/pull/323"
},
{
"type": "WEB",
"url": "https://github.com/Marven11"
},
{
"type": "WEB",
"url": "https://github.com/Marven11/CVE-2024-28397-js2py-Sandbox-Escape"
},
{
"type": "PACKAGE",
"url": "https://github.com/PiotrDabkowski/Js2Py"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "js2py allows remote code execution"
}
GHSA-H965-CCM7-WVG6
Vulnerability from github – Published: 2022-05-17 00:39 – Updated: 2022-05-17 00:39Static code injection vulnerability in the Guestbook component in CMS MAXSITE allows remote attackers to inject arbitrary PHP code into the guestbook via the message parameter.
{
"affected": [],
"aliases": [
"CVE-2008-6446"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-03-09T14:30:00Z",
"severity": "HIGH"
},
"details": "Static code injection vulnerability in the Guestbook component in CMS MAXSITE allows remote attackers to inject arbitrary PHP code into the guestbook via the message parameter.",
"id": "GHSA-h965-ccm7-wvg6",
"modified": "2022-05-17T00:39:33Z",
"published": "2022-05-17T00:39:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6446"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/47025"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/7322"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32588"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H9FM-HCXM-C6MF
Vulnerability from github – Published: 2022-04-29 02:59 – Updated: 2022-04-29 02:59PHP remote file inclusion vulnerability in ZeroBoard 4.1pl4 and earlier allows remote attackers to execute arbitrary PHP code by modifying the (1) _zb_path parameter to outlogin.php or (2) dir parameter to write.php to reference a URL on a remote web server that contains the code.
{
"affected": [],
"aliases": [
"CVE-2004-1419"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2004-12-31T05:00:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in ZeroBoard 4.1pl4 and earlier allows remote attackers to execute arbitrary PHP code by modifying the (1) _zb_path parameter to outlogin.php or (2) dir parameter to write.php to reference a URL on a remote web server that contains the code.",
"id": "GHSA-h9fm-hcxm-c6mf",
"modified": "2022-04-29T02:59:32Z",
"published": "2022-04-29T02:59:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2004-1419"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/18677"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/18679"
},
{
"type": "WEB",
"url": "http://lists.grok.org.uk/pipermail/full-disclosure/2004-December/030224.html"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=110391024404947\u0026w=2"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/13649"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1012677"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/12580"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/12581"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/12103"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H9FQ-FC86-73FW
Vulnerability from github – Published: 2023-09-06 18:30 – Updated: 2024-04-04 07:32Vulnerabilities exist in the BIOS implementation of Aruba 9200 and 9000 Series Controllers and Gateways that could allow an attacker to execute arbitrary code early in the boot sequence. An attacker could exploit this vulnerability to gain access to and change underlying sensitive information in the affected controller leading to complete system compromise.
{
"affected": [],
"aliases": [
"CVE-2023-38484"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-09-06T18:15:08Z",
"severity": "MODERATE"
},
"details": "Vulnerabilities exist in the BIOS implementation of Aruba 9200 and 9000 Series Controllers and Gateways that could\u00a0allow an attacker to execute arbitrary code early in the boot\u00a0sequence. An attacker could exploit this vulnerability to\u00a0gain access to and change underlying sensitive information\u00a0in the affected controller leading to complete system\u00a0compromise.",
"id": "GHSA-h9fq-fc86-73fw",
"modified": "2024-04-04T07:32:11Z",
"published": "2023-09-06T18:30:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-38484"
},
{
"type": "WEB",
"url": "https://www.arubanetworks.com/assets/alert/ARUBA-PSA-2023-014.txt"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-H9H6-4WFQ-8VWM
Vulnerability from github – Published: 2024-09-23 18:30 – Updated: 2024-09-23 18:30A condition exists in FlashArray Purity whereby an user with array admin role can execute arbitrary commands remotely to escalate privilege on the array.
{
"affected": [],
"aliases": [
"CVE-2024-0004"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-23T18:15:04Z",
"severity": "CRITICAL"
},
"details": "A condition exists in FlashArray Purity whereby an user with array admin role can execute arbitrary commands remotely to escalate privilege on the array.",
"id": "GHSA-h9h6-4wfq-8vwm",
"modified": "2024-09-23T18:30:35Z",
"published": "2024-09-23T18:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-0004"
},
{
"type": "WEB",
"url": "https://purestorage.com/security"
}
],
"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"
}
]
}
GHSA-H9HG-544V-FH29
Vulnerability from github – Published: 2025-02-21 18:31 – Updated: 2025-04-17 18:31A Remote Code Execution (RCE) vulnerability in Loggrove v.1.0 allows a remote attacker to execute arbitrary code via the path parameter.
{
"affected": [],
"aliases": [
"CVE-2025-26014"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-21T17:15:14Z",
"severity": "CRITICAL"
},
"details": "A Remote Code Execution (RCE) vulnerability in Loggrove v.1.0 allows a remote attacker to execute arbitrary code via the path parameter.",
"id": "GHSA-h9hg-544v-fh29",
"modified": "2025-04-17T18:31:10Z",
"published": "2025-02-21T18:31:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-26014"
},
{
"type": "WEB",
"url": "https://gitee.com/olajowon/loggrove"
},
{
"type": "WEB",
"url": "https://gitee.com/olajowon/loggrove/issues/IBJT1K"
},
{
"type": "WEB",
"url": "https://github.com/olajowon/loggrove"
}
],
"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-H9HG-759G-265V
Vulnerability from github – Published: 2022-03-29 00:01 – Updated: 2022-04-06 00:02Clash for Windows v0.19.8 was discovered to allow arbitrary code execution via a crafted payload injected into the Proxies name column.
{
"affected": [],
"aliases": [
"CVE-2022-26255"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-03-28T00:15:00Z",
"severity": "CRITICAL"
},
"details": "Clash for Windows v0.19.8 was discovered to allow arbitrary code execution via a crafted payload injected into the Proxies name column.",
"id": "GHSA-h9hg-759g-265v",
"modified": "2022-04-06T00:02:13Z",
"published": "2022-03-29T00:01:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-26255"
},
{
"type": "WEB",
"url": "https://github.com/Fndroid/clash_for_windows_pkg/issues/2710"
}
],
"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-H9M9-95J2-CPMJ
Vulnerability from github – Published: 2023-02-20 18:30 – Updated: 2024-07-23 21:31PHP code injection in watolib auth.php and hosttags.php in Tribe29's Checkmk <= 2.1.0p10, Checkmk <= 2.0.0p27, and Checkmk <= 1.6.0p29 allows an attacker to inject and execute PHP code which will be executed upon request of the vulnerable component.
{
"affected": [],
"aliases": [
"CVE-2022-46836"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-02-20T17:15:00Z",
"severity": "HIGH"
},
"details": "PHP code injection in watolib auth.php and hosttags.php in Tribe29\u0027s Checkmk \u003c= 2.1.0p10, Checkmk \u003c= 2.0.0p27, and Checkmk \u003c= 1.6.0p29 allows an attacker to inject and execute PHP code which will be executed upon request of the vulnerable component.",
"id": "GHSA-h9m9-95j2-cpmj",
"modified": "2024-07-23T21:31:32Z",
"published": "2023-02-20T18:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-46836"
},
{
"type": "WEB",
"url": "https://checkmk.com/werk/14383"
},
{
"type": "WEB",
"url": "https://www.sonarsource.com/blog/checkmk-rce-chain-3"
}
],
"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"
}
]
}
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.