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.
8268 vulnerabilities reference this CWE, most recent first.
GHSA-GQ2C-RQG7-FR3G
Vulnerability from github – Published: 2022-05-01 18:01 – Updated: 2022-05-01 18:01Multiple PHP remote file inclusion vulnerabilities in Supasite 1.23b allow remote attackers to execute arbitrary PHP code via a URL in the supa[db_path] parameter to (1) common_functions.php, (2) admin_auth_cookies.php, (3) admin_mods.php, (4) admin_news.php, (5) admin_topics.php, (6) admin_users.php, (7) admin_utilities.php, (8) site_comment.php, or (9) site_news.php; or the supa[include_path] parameter to (10) admin_settings.php or (11) backend_site.php.
{
"affected": [],
"aliases": [
"CVE-2007-2185"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-04-24T17:19:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Supasite 1.23b allow remote attackers to execute arbitrary PHP code via a URL in the supa[db_path] parameter to (1) common_functions.php, (2) admin_auth_cookies.php, (3) admin_mods.php, (4) admin_news.php, (5) admin_topics.php, (6) admin_users.php, (7) admin_utilities.php, (8) site_comment.php, or (9) site_news.php; or the supa[include_path] parameter to (10) admin_settings.php or (11) backend_site.php.",
"id": "GHSA-gq2c-rqg7-fr3g",
"modified": "2022-05-01T18:01:06Z",
"published": "2022-05-01T18:01:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-2185"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/33796"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/3771"
},
{
"type": "WEB",
"url": "http://osvdb.org/38845"
},
{
"type": "WEB",
"url": "http://osvdb.org/38846"
},
{
"type": "WEB",
"url": "http://osvdb.org/38847"
},
{
"type": "WEB",
"url": "http://osvdb.org/38848"
},
{
"type": "WEB",
"url": "http://osvdb.org/38849"
},
{
"type": "WEB",
"url": "http://osvdb.org/38850"
},
{
"type": "WEB",
"url": "http://osvdb.org/38851"
},
{
"type": "WEB",
"url": "http://osvdb.org/38852"
},
{
"type": "WEB",
"url": "http://osvdb.org/38853"
},
{
"type": "WEB",
"url": "http://osvdb.org/38854"
},
{
"type": "WEB",
"url": "http://osvdb.org/38855"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/23581"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/1492"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-GQ5P-84H6-HF7H
Vulnerability from github – Published: 2022-05-14 03:51 – Updated: 2022-05-14 03:51The client in Novell GroupWise 8.0x through 8.02HP3 allows remote attackers to execute arbitrary code or cause a denial of service (heap memory corruption and application crash) via a long e-mail address in an Address Book (aka .NAB) file.
{
"affected": [],
"aliases": [
"CVE-2011-4189"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-03-02T22:55:00Z",
"severity": "HIGH"
},
"details": "The client in Novell GroupWise 8.0x through 8.02HP3 allows remote attackers to execute arbitrary code or cause a denial of service (heap memory corruption and application crash) via a long e-mail address in an Address Book (aka .NAB) file.",
"id": "GHSA-gq5p-84h6-hf7h",
"modified": "2022-05-14T03:51:06Z",
"published": "2022-05-14T03:51:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-4189"
},
{
"type": "WEB",
"url": "https://bugzilla.novell.com/show_bug.cgi?id=733885"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/73588"
},
{
"type": "WEB",
"url": "http://osvdb.org/79720"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/48199"
},
{
"type": "WEB",
"url": "http://www.novell.com/support/viewContent.do?externalId=7010205"
},
{
"type": "WEB",
"url": "http://www.protekresearchlab.com/index.php?option=com_content\u0026view=article\u0026id=37\u0026Itemid=37"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/52233"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1026753"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-GQ6Q-MXVX-GV7H
Vulnerability from github – Published: 2022-05-01 06:57 – Updated: 2022-05-01 06:57X-Scripts X-Poll (xpoll) 2.30 allows remote attackers to execute arbitrary PHP code by using admin/images/add.php to upload a PHP file, then access it.
{
"affected": [],
"aliases": [
"CVE-2006-2281"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-05-10T02:14:00Z",
"severity": "HIGH"
},
"details": "X-Scripts X-Poll (xpoll) 2.30 allows remote attackers to execute arbitrary PHP code by using admin/images/add.php to upload a PHP file, then access it.",
"id": "GHSA-gq6q-mxvx-gv7h",
"modified": "2022-05-01T06:57:44Z",
"published": "2022-05-01T06:57:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-2281"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/26363"
},
{
"type": "WEB",
"url": "http://attrition.org/pipermail/vim/2006-May/000752.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/20057"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/872"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/433220/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/17901"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/1732"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-GQ93-8WPV-4MPX
Vulnerability from github – Published: 2022-05-14 01:43 – Updated: 2022-05-14 01:43UCMS 1.4.7 allows remote attackers to execute arbitrary PHP code by entering this code during an index.php sadmin_fileedit action.
{
"affected": [],
"aliases": [
"CVE-2018-20599"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-12-30T21:29:00Z",
"severity": "HIGH"
},
"details": "UCMS 1.4.7 allows remote attackers to execute arbitrary PHP code by entering this code during an index.php sadmin_fileedit action.",
"id": "GHSA-gq93-8wpv-4mpx",
"modified": "2022-05-14T01:43:14Z",
"published": "2022-05-14T01:43:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-20599"
},
{
"type": "WEB",
"url": "https://github.com/AvaterXXX/CVEs/blob/master/ucms.md#getshell"
}
],
"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-GQC7-MQ8Q-H2VV
Vulnerability from github – Published: 2022-05-01 23:31 – Updated: 2022-05-01 23:31PHP remote file inclusion vulnerability in includes/smarty.php in DeltaScripts PHP Links 1.3 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the full_path_to_public_program parameter.
{
"affected": [],
"aliases": [
"CVE-2008-0566"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-02-05T02:00:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in includes/smarty.php in DeltaScripts PHP Links 1.3 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the full_path_to_public_program parameter.",
"id": "GHSA-gqc7-mq8q-h2vv",
"modified": "2022-05-01T23:31:27Z",
"published": "2022-05-01T23:31:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-0566"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5022"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/27529"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-GQFR-84MJ-FVQR
Vulnerability from github – Published: 2024-03-14 21:30 – Updated: 2024-08-01 15:31zenml v0.55.4 was discovered to contain an arbitrary file upload vulnerability in the load function at /materializers/cloudpickle_materializer.py. This vulnerability allows attackers to execute arbitrary code via uploading a crafted file.
{
"affected": [],
"aliases": [
"CVE-2024-28424"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-14T19:15:50Z",
"severity": "HIGH"
},
"details": "zenml v0.55.4 was discovered to contain an arbitrary file upload vulnerability in the load function at /materializers/cloudpickle_materializer.py. This vulnerability allows attackers to execute arbitrary code via uploading a crafted file.",
"id": "GHSA-gqfr-84mj-fvqr",
"modified": "2024-08-01T15:31:32Z",
"published": "2024-03-14T21:30:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-28424"
},
{
"type": "WEB",
"url": "https://github.com/bayuncao/vul-cve-18"
}
],
"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"
}
]
}
GHSA-GQJF-WVW9-G6PM
Vulnerability from github – Published: 2022-05-05 02:48 – Updated: 2022-05-05 02:48An ActiveX control in HscRemoteDeploy.dll in Honeywell Enterprise Buildings Integrator (EBI) R310, R400.2, R410.1, and R410.2; SymmetrE R310, R410.1, and R410.2; ComfortPoint Open Manager (aka CPO-M) Station R100; and HMIWeb Browser client packages allows remote attackers to execute arbitrary code via a crafted HTML document.
{
"affected": [],
"aliases": [
"CVE-2013-0108"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-02-24T11:48:00Z",
"severity": "MODERATE"
},
"details": "An ActiveX control in HscRemoteDeploy.dll in Honeywell Enterprise Buildings Integrator (EBI) R310, R400.2, R410.1, and R410.2; SymmetrE R310, R410.1, and R410.2; ComfortPoint Open Manager (aka CPO-M) Station R100; and HMIWeb Browser client packages allows remote attackers to execute arbitrary code via a crafted HTML document.",
"id": "GHSA-gqjf-wvw9-g6pm",
"modified": "2022-05-05T02:48:25Z",
"published": "2022-05-05T02:48:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-0108"
},
{
"type": "WEB",
"url": "http://ics-cert.us-cert.gov/pdf/ICSA-13-053-02.pdf"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-GQJJ-VWJ4-P2MG
Vulnerability from github – Published: 2022-04-30 18:22 – Updated: 2022-04-30 18:22Static code injection vulnerability in users.php in MySimpleNews allows remote attackers to inject arbitrary PHP code and HTML via the (1) LOGIN, (2) DATA, and (3) MESS parameters, which are inserted into news.php3.
{
"affected": [],
"aliases": [
"CVE-2002-2319"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2002-12-31T05:00:00Z",
"severity": "HIGH"
},
"details": "Static code injection vulnerability in users.php in MySimpleNews allows remote attackers to inject arbitrary PHP code and HTML via the (1) LOGIN, (2) DATA, and (3) MESS parameters, which are inserted into news.php3.",
"id": "GHSA-gqjj-vwj4-p2mg",
"modified": "2022-04-30T18:22:56Z",
"published": "2022-04-30T18:22:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2002-2319"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/bugtraq/2002-10/0027.html"
},
{
"type": "WEB",
"url": "http://www.iss.net/security_center/static/10296.php"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/5865"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-GQMC-QC62-72H3
Vulnerability from github – Published: 2023-07-07 00:30 – Updated: 2024-04-04 05:50PiiGAB M-Bus
SoftwarePack 900S
does not correctly sanitize user input, which could allow an attacker to inject arbitrary commands.
{
"affected": [],
"aliases": [
"CVE-2023-36859"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-07-06T23:15:09Z",
"severity": "CRITICAL"
},
"details": "\nPiiGAB M-Bus \n\nSoftwarePack 900S\n\ndoes not correctly sanitize user input, which could allow an attacker to inject arbitrary commands.\n\n",
"id": "GHSA-gqmc-qc62-72h3",
"modified": "2024-04-04T05:50:10Z",
"published": "2023-07-07T00:30:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-36859"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/news-events/ics-advisories/icsa-23-187-01"
}
],
"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-GQMG-CFHG-MW2Q
Vulnerability from github – Published: 2026-06-15 21:30 – Updated: 2026-06-16 15:33An issue in the loopback request handling component of fossar selfoss v2.20-SNAPSHOT allows attackers to execute arbitrary commands and obtain sensitive information via supplying a crafted HTTP request.
{
"affected": [],
"aliases": [
"CVE-2026-50872"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-15T20:16:29Z",
"severity": "CRITICAL"
},
"details": "An issue in the loopback request handling component of fossar selfoss v2.20-SNAPSHOT allows attackers to execute arbitrary commands and obtain sensitive information via supplying a crafted HTTP request.",
"id": "GHSA-gqmg-cfhg-mw2q",
"modified": "2026-06-16T15:33:47Z",
"published": "2026-06-15T21:30:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-50872"
},
{
"type": "WEB",
"url": "https://gist.github.com/pyuysig/272bf96c028ed45ad010b7c75937c914"
}
],
"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"
}
]
}
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.