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.
8305 vulnerabilities reference this CWE, most recent first.
GHSA-JM3M-G3QW-QR2V
Vulnerability from github – Published: 2022-05-01 07:30 – Updated: 2025-04-03 18:30PHP remote file inclusion vulnerability in player/includes/common.php in Teake Nutma Foing, as modified in Fully Modded phpBB (phpbbfm) 2021.4.40, allows remote attackers to execute arbitrary PHP code via a URL in the phpbb_root_path parameter.
{
"affected": [],
"aliases": [
"CVE-2006-5610"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-10-31T00:07:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in player/includes/common.php in Teake Nutma Foing, as modified in Fully Modded phpBB (phpbbfm) 2021.4.40, allows remote attackers to execute arbitrary PHP code via a URL in the phpbb_root_path parameter.",
"id": "GHSA-jm3m-g3qw-qr2v",
"modified": "2025-04-03T18:30:26Z",
"published": "2022-05-01T07:30:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-5610"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/22499"
}
],
"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-JM3V-M7PQ-RWRH
Vulnerability from github – Published: 2022-05-14 01:45 – Updated: 2022-05-14 01:45Vanilla 2.6.x before 2.6.4 allows remote code execution.
{
"affected": [],
"aliases": [
"CVE-2018-18903"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-11-03T05:29:00Z",
"severity": "CRITICAL"
},
"details": "Vanilla 2.6.x before 2.6.4 allows remote code execution.",
"id": "GHSA-jm3v-m7pq-rwrh",
"modified": "2022-05-14T01:45:29Z",
"published": "2022-05-14T01:45:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-18903"
},
{
"type": "WEB",
"url": "https://github.com/vanilla/vanilla/releases/tag/Vanilla_2.6.4"
},
{
"type": "WEB",
"url": "https://open.vanillaforums.com/discussion/36771/security-update-vanilla-2-6-4"
},
{
"type": "WEB",
"url": "https://srcincite.io/blog/2018/10/02/old-school-pwning-with-new-school-tricks-vanilla-forums-remote-code-execution.html"
}
],
"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-JM69-H2QJ-3QWX
Vulnerability from github – Published: 2022-05-14 01:47 – Updated: 2022-05-14 01:47In YXcms 1.4.7, protected/apps/appmanage/controller/indexController.php allow remote authenticated Administrators to execute any PHP code by creating a ZIP archive containing a config.php file, hosting the .zip file at an external URL, and visiting index.php?r=appmanage/index/onlineinstall&url= followed by that URL. This is related to the onlineinstall and import functions.
{
"affected": [],
"aliases": [
"CVE-2018-19404"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-11-21T00:29:00Z",
"severity": "HIGH"
},
"details": "In YXcms 1.4.7, protected/apps/appmanage/controller/indexController.php allow remote authenticated Administrators to execute any PHP code by creating a ZIP archive containing a config.php file, hosting the .zip file at an external URL, and visiting index.php?r=appmanage/index/onlineinstall\u0026url= followed by that URL. This is related to the onlineinstall and import functions.",
"id": "GHSA-jm69-h2qj-3qwx",
"modified": "2022-05-14T01:47:08Z",
"published": "2022-05-14T01:47:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-19404"
},
{
"type": "WEB",
"url": "https://github.com/HF9/yxcms-code-audit/blob/master/Any%20PHP%20Code%20Execution"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-JM9X-4PC8-3RV4
Vulnerability from github – Published: 2022-05-24 16:54 – Updated: 2024-04-04 01:49The groundhogg plugin before 1.3.5 for WordPress has wp-admin/admin-ajax.php?action=bulk_action_listener remote code execution.
{
"affected": [],
"aliases": [
"CVE-2019-15647"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-08-27T12:15:00Z",
"severity": "HIGH"
},
"details": "The groundhogg plugin before 1.3.5 for WordPress has wp-admin/admin-ajax.php?action=bulk_action_listener remote code execution.",
"id": "GHSA-jm9x-4pc8-3rv4",
"modified": "2024-04-04T01:49:04Z",
"published": "2022-05-24T16:54:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-15647"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/groundhogg/#developers"
},
{
"type": "WEB",
"url": "https://wpvulndb.com/vulnerabilities/9834"
},
{
"type": "WEB",
"url": "https://www.pluginvulnerabilities.com/2019/04/05/our-proactive-monitoring-caught-an-authenticated-remote-code-execution-rce-vulnerability-being-introduced-in-to-groundhogg"
}
],
"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-JMF2-H546-V465
Vulnerability from github – Published: 2022-05-24 17:21 – Updated: 2022-05-24 17:21An issue was discovered in Mattermost Desktop App before 4.3.0 on macOS. It allows dylib injection.
{
"affected": [],
"aliases": [
"CVE-2019-20856"
],
"database_specific": {
"cwe_ids": [
"CWE-427",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-06-19T15:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in Mattermost Desktop App before 4.3.0 on macOS. It allows dylib injection.",
"id": "GHSA-jmf2-h546-v465",
"modified": "2022-05-24T17:21:12Z",
"published": "2022-05-24T17:21:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-20856"
},
{
"type": "WEB",
"url": "https://mattermost.com/security-updates"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JMFJ-RGC6-43MH
Vulnerability from github – Published: 2022-05-17 02:17 – Updated: 2022-05-17 02:17Unspecified vulnerability in Adobe Flash Player for Linux 10.0.12.36, and 9.0.151.0 and earlier, allows remote attackers to execute arbitrary code via a crafted SWF file.
{
"affected": [],
"aliases": [
"CVE-2008-5499"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-12-18T00:30:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in Adobe Flash Player for Linux 10.0.12.36, and 9.0.151.0 and earlier, allows remote attackers to execute arbitrary code via a crafted SWF file.",
"id": "GHSA-jmfj-rgc6-43mh",
"modified": "2022-05-17T02:17:31Z",
"published": "2022-05-17T02:17:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-5499"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/47445"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2008-12/msg00006.html"
},
{
"type": "WEB",
"url": "http://osvdb.org/50796"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/33221"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/33267"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/33294"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/34226"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-200903-23.xml"
},
{
"type": "WEB",
"url": "http://www.adobe.com/support/security/bulletins/apsb08-24.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2008-1047.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32896"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1021458"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/3449"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JMHJ-WQ27-83JG
Vulnerability from github – Published: 2022-05-14 02:56 – Updated: 2022-05-14 02:56Static code injection vulnerability in Simploo CMS 1.7.1 and earlier allows remote authenticated users to inject arbitrary PHP code into config/custom/base.ini.php via the ftpserver parameter (FTP-Server field) to the sicore/updates/optionssav operation for index.php.
{
"affected": [],
"aliases": [
"CVE-2011-0635"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2011-01-22T22:00:00Z",
"severity": "MODERATE"
},
"details": "Static code injection vulnerability in Simploo CMS 1.7.1 and earlier allows remote authenticated users to inject arbitrary PHP code into config/custom/base.ini.php via the ftpserver parameter (FTP-Server field) to the sicore/updates/optionssav operation for index.php.",
"id": "GHSA-jmhj-wq27-83jg",
"modified": "2022-05-14T02:56:35Z",
"published": "2022-05-14T02:56:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-0635"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/64826"
},
{
"type": "WEB",
"url": "http://osvdb.org/70487"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/42953"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/16016"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/515809/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/45906"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JMRW-J3GJ-4XQ7
Vulnerability from github – Published: 2024-04-29 18:30 – Updated: 2024-07-03 18:37An issue in onethink v.1.1 allows a remote attacker to execute arbitrary code via a crafted script to the AddonsController.class.php component.
{
"affected": [],
"aliases": [
"CVE-2024-33443"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-29T18:15:08Z",
"severity": "HIGH"
},
"details": "An issue in onethink v.1.1 allows a remote attacker to execute arbitrary code via a crafted script to the AddonsController.class.php component.",
"id": "GHSA-jmrw-j3gj-4xq7",
"modified": "2024-07-03T18:37:28Z",
"published": "2024-04-29T18:30:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-33443"
},
{
"type": "WEB",
"url": "https://github.com/liu21st/onethink/issues/40"
},
{
"type": "WEB",
"url": "https://gist.github.com/LioTree/a81111fb0c598a920cb49aaf0bd64e58"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-JMWC-V96P-WC34
Vulnerability from github – Published: 2022-05-13 01:54 – Updated: 2022-05-13 01:54Couchbase Server exposed the '/diag/eval' endpoint which by default is available on TCP/8091 and/or TCP/18091. Authenticated users that have 'Full Admin' role assigned could send arbitrary Erlang code to the 'diag/eval' endpoint of the API and the code would subsequently be executed in the underlying operating system with privileges of the user which was used to start Couchbase. Affects Version: 4.0.0, 4.1.2, 4.5.1, 5.0.0, 4.6.5, 5.0.1, 5.1.1, 5.5.0, 5.5.1. Fix Version: 6.0.0, 5.5.2
{
"affected": [],
"aliases": [
"CVE-2018-15728"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-08-24T19:29:00Z",
"severity": "HIGH"
},
"details": "Couchbase Server exposed the \u0027/diag/eval\u0027 endpoint which by default is available on TCP/8091 and/or TCP/18091. Authenticated users that have \u0027Full Admin\u0027 role assigned could send arbitrary Erlang code to the \u0027diag/eval\u0027 endpoint of the API and the code would subsequently be executed in the underlying operating system with privileges of the user which was used to start Couchbase. Affects Version: 4.0.0, 4.1.2, 4.5.1, 5.0.0, 4.6.5, 5.0.1, 5.1.1, 5.5.0, 5.5.1. Fix Version: 6.0.0, 5.5.2",
"id": "GHSA-jmwc-v96p-wc34",
"modified": "2022-05-13T01:54:07Z",
"published": "2022-05-13T01:54:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-15728"
},
{
"type": "WEB",
"url": "https://www.couchbase.com/resources/security#SecurityAlerts"
},
{
"type": "WEB",
"url": "http://seclists.org/bugtraq/2018/Aug/49"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/105157"
}
],
"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-JP38-8M55-7QCQ
Vulnerability from github – Published: 2024-06-10 21:30 – Updated: 2024-06-12 18:30A memory corruption issue was addressed with improved validation. This issue is fixed in macOS Monterey 12.5. Processing a maliciously crafted tiff file may lead to arbitrary code execution.
{
"affected": [],
"aliases": [
"CVE-2022-32897"
],
"database_specific": {
"cwe_ids": [
"CWE-787",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-06-10T20:15:12Z",
"severity": "HIGH"
},
"details": "A memory corruption issue was addressed with improved validation. This issue is fixed in macOS Monterey 12.5. Processing a maliciously crafted tiff file may lead to arbitrary code execution.",
"id": "GHSA-jp38-8m55-7qcq",
"modified": "2024-06-12T18:30:40Z",
"published": "2024-06-10T21:30:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32897"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/HT213345"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/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.