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.
8358 vulnerabilities reference this CWE, most recent first.
GHSA-8XJH-FHMF-89Q3
Vulnerability from github – Published: 2022-05-02 03:25 – Updated: 2022-05-02 03:25Static code injection vulnerability in razorCMS before 0.4 allows remote attackers to inject arbitrary PHP code into any page by saving content as a .php file.
{
"affected": [],
"aliases": [
"CVE-2009-1463"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-04-28T16:30:00Z",
"severity": "HIGH"
},
"details": "Static code injection vulnerability in razorCMS before 0.4 allows remote attackers to inject arbitrary PHP code into any page by saving content as a .php file.",
"id": "GHSA-8xjh-fhmf-89q3",
"modified": "2022-05-02T03:25:25Z",
"published": "2022-05-02T03:25:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-1463"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/50359"
},
{
"type": "WEB",
"url": "http://marc.info/?l=full-disclosure\u0026m=123990481506680\u0026w=2"
},
{
"type": "WEB",
"url": "http://marc.info/?l=full-disclosure\u0026m=123998062108561\u0026w=2"
},
{
"type": "WEB",
"url": "http://razorcms.co.uk/support/viewtopic.php?f=13\u0026t=325"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/34566"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8XP7-RF4H-MFMG
Vulnerability from github – Published: 2023-10-10 18:31 – Updated: 2024-04-04 08:30Microsoft Message Queuing Remote Code Execution Vulnerability
{
"affected": [],
"aliases": [
"CVE-2023-36570"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-10-10T18:15:13Z",
"severity": "HIGH"
},
"details": "Microsoft Message Queuing Remote Code Execution Vulnerability",
"id": "GHSA-8xp7-rf4h-mfmg",
"modified": "2024-04-04T08:30:53Z",
"published": "2023-10-10T18:31:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-36570"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-36570"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-8XQ7-GQJ3-MH42
Vulnerability from github – Published: 2022-05-17 02:06 – Updated: 2022-05-17 02:06index.pl in Miyabi CGI Tools SEO Links 1.02 allows remote attackers to execute arbitrary commands via shell metacharacters in the fn command. NOTE: some of these details are obtained from third party information.
{
"affected": [],
"aliases": [
"CVE-2010-2626"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-07-02T20:30:00Z",
"severity": "HIGH"
},
"details": "index.pl in Miyabi CGI Tools SEO Links 1.02 allows remote attackers to execute arbitrary commands via shell metacharacters in the fn command. NOTE: some of these details are obtained from third party information.",
"id": "GHSA-8xq7-gqj3-mh42",
"modified": "2022-05-17T02:06:42Z",
"published": "2022-05-17T02:06:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-2626"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/59908"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/fulldisclosure/2010-06/0614.html"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/fulldisclosure/2010-06/0615.html"
},
{
"type": "WEB",
"url": "http://osvdb.org/65884"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/40419"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/41228"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8XQW-6Q3F-W3JP
Vulnerability from github – Published: 2022-05-17 04:52 – Updated: 2022-05-17 04:52An ActiveX control in IcoLaunch.dll in Mitsubishi Electric Automation MC-WorX Suite 8.02 allows user-assisted remote attackers to execute arbitrary programs via a crafted HTML document in conjunction with a Login Client button click.
{
"affected": [],
"aliases": [
"CVE-2013-2817"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-02-24T04:48:00Z",
"severity": "HIGH"
},
"details": "An ActiveX control in IcoLaunch.dll in Mitsubishi Electric Automation MC-WorX Suite 8.02 allows user-assisted remote attackers to execute arbitrary programs via a crafted HTML document in conjunction with a Login Client button click.",
"id": "GHSA-8xqw-6q3f-w3jp",
"modified": "2022-05-17T04:52:05Z",
"published": "2022-05-17T04:52:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-2817"
},
{
"type": "WEB",
"url": "http://ics-cert.us-cert.gov/advisories/ICSA-14-051-02"
},
{
"type": "WEB",
"url": "http://www.meau.com/eprise/main/sites/public/Products/Software/-MC_Works"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8XRG-QHP8-H7WH
Vulnerability from github – Published: 2025-09-19 21:31 – Updated: 2025-09-19 21:31Server-side template injection (SSTI) vulnerability in PPress 0.0.9 allows attackers to execute arbitrary code via crafted themes.
{
"affected": [],
"aliases": [
"CVE-2025-54815"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-09-19T20:15:39Z",
"severity": "HIGH"
},
"details": "Server-side template injection (SSTI) vulnerability in PPress 0.0.9 allows attackers to execute arbitrary code via crafted themes.",
"id": "GHSA-8xrg-qhp8-h7wh",
"modified": "2025-09-19T21:31:21Z",
"published": "2025-09-19T21:31:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-54815"
},
{
"type": "WEB",
"url": "https://github.com/quarter77/PPress-CMS_vulnerability_chain_details/blob/main/CVE-2025-54815%20Details.md"
},
{
"type": "WEB",
"url": "https://github.com/yandaozi/PPress/releases/tag/v0.0.9-beta"
}
],
"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-8XVC-MXV2-C4GQ
Vulnerability from github – Published: 2022-05-14 02:01 – Updated: 2022-05-14 02:01OTCMS 3.61 allows remote attackers to execute arbitrary PHP code via the accBackupDir parameter.
{
"affected": [],
"aliases": [
"CVE-2018-17364"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-09-23T18:29:00Z",
"severity": "HIGH"
},
"details": "OTCMS 3.61 allows remote attackers to execute arbitrary PHP code via the accBackupDir parameter.",
"id": "GHSA-8xvc-mxv2-c4gq",
"modified": "2022-05-14T02:01:19Z",
"published": "2022-05-14T02:01:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-17364"
},
{
"type": "WEB",
"url": "https://xiaohuihui1.blogspot.com/2018/09/otcms-361-command-execution.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-8XWH-69G8-MR3R
Vulnerability from github – Published: 2023-03-21 18:30 – Updated: 2025-02-26 18:30An authenticated attacker can leverage an exposed resource.db() accessor method to smuggle Python method calls via a Jinja template, which can lead to code execution. This issue was resolved in the Managed and SaaS deployments on February 1, 2023, and in version 23.2.1 of the Self-Managed version of InsightCloudSec.
{
"affected": [],
"aliases": [
"CVE-2023-1306"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-03-21T17:15:00Z",
"severity": "HIGH"
},
"details": "An authenticated attacker can leverage an exposed resource.db() accessor method to smuggle Python method calls via a Jinja template, which can lead to code execution. This issue was resolved in the Managed and SaaS deployments on February 1, 2023, and in version 23.2.1 of the Self-Managed version of InsightCloudSec.",
"id": "GHSA-8xwh-69g8-mr3r",
"modified": "2025-02-26T18:30:37Z",
"published": "2023-03-21T18:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-1306"
},
{
"type": "WEB",
"url": "https://docs.divvycloud.com/changelog/23321-release-notes"
},
{
"type": "WEB",
"url": "https://nephosec.com/exploiting-rapid7s-insightcloudsec"
}
],
"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-9253-C6R3-526Q
Vulnerability from github – Published: 2022-05-24 17:16 – Updated: 2022-05-24 17:16Formula Injection exists in the export feature in SolarWinds WebHelpDesk 12.7.1 via a value (provided by a low-privileged user in the Subject field of a help request form) that is mishandled in a TicketActions/view?tab=group TSV export by an admin user.
{
"affected": [],
"aliases": [
"CVE-2019-20002"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-04-27T15:15:00Z",
"severity": "MODERATE"
},
"details": "Formula Injection exists in the export feature in SolarWinds WebHelpDesk 12.7.1 via a value (provided by a low-privileged user in the Subject field of a help request form) that is mishandled in a TicketActions/view?tab=group TSV export by an admin user.",
"id": "GHSA-9253-c6r3-526q",
"modified": "2022-05-24T17:16:33Z",
"published": "2022-05-24T17:16:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-20002"
},
{
"type": "WEB",
"url": "https://medium.com/@ayaan.saikia91/formula-injection-vulnerability-on-solarwinds-webhelpdesk-12-7-1-37569cd4cdc1"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-925C-69P2-M4HJ
Vulnerability from github – Published: 2022-05-13 01:32 – Updated: 2022-05-13 01:32IBM WebSphere MQ 8.0.0.0 through 8.0.0.10, 9.0.0.0 through 9.0.0.5, 9.0.1 through 9.0.5, and 9.1.0.0 could allow a local user to inject code that could be executed with root privileges. IBM X-Force ID: 148947.
{
"affected": [],
"aliases": [
"CVE-2018-1792"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-11-13T15:29:00Z",
"severity": "HIGH"
},
"details": "IBM WebSphere MQ 8.0.0.0 through 8.0.0.10, 9.0.0.0 through 9.0.0.5, 9.0.1 through 9.0.5, and 9.1.0.0 could allow a local user to inject code that could be executed with root privileges. IBM X-Force ID: 148947.",
"id": "GHSA-925c-69p2-m4hj",
"modified": "2022-05-13T01:32:40Z",
"published": "2022-05-13T01:32:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-1792"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/148947"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/docview.wss?uid=ibm10734447"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/105936"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-9297-53FW-X6CQ
Vulnerability from github – Published: 2022-05-02 03:57 – Updated: 2022-05-02 03:57Adobe Reader 8.x and 9.x on Windows is able to execute EXE files that are embedded in a PDF document, which makes it easier for remote attackers to trick users into executing arbitrary code via a crafted document.
{
"affected": [],
"aliases": [
"CVE-2009-4764"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-04-05T15:30:00Z",
"severity": "HIGH"
},
"details": "Adobe Reader 8.x and 9.x on Windows is able to execute EXE files that are embedded in a PDF document, which makes it easier for remote attackers to trick users into executing arbitrary code via a crafted document.",
"id": "GHSA-9297-53fw-x6cq",
"modified": "2022-05-02T03:57:54Z",
"published": "2022-05-02T03:57:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-4764"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/57994"
},
{
"type": "WEB",
"url": "https://forum.immunityinc.com/board/thread/1199/exploiting-pdf-files-without-vulnerabili/?page=1#post-1199"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6976"
},
{
"type": "WEB",
"url": "http://lists.immunitysec.com/pipermail/dailydave/2010-April/006072.html"
},
{
"type": "WEB",
"url": "http://lists.immunitysec.com/pipermail/dailydave/2010-April/006074.html"
},
{
"type": "WEB",
"url": "http://www.metasploit.com/redmine/projects/framework/repository/revisions/8379/changes/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe.rb"
}
],
"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.