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.
8834 vulnerabilities reference this CWE, most recent first.
GHSA-WQWX-HHF2-X4Q9
Vulnerability from github – Published: 2022-05-17 05:43 – Updated: 2022-05-17 05:43The (1) tomboy and (2) tomboy-panel scripts in GNOME Tomboy 1.5.2 and earlier place a zero-length directory name in the LD_LIBRARY_PATH, which allows local users to gain privileges via a Trojan horse shared library in the current working directory. NOTE: vector 1 exists because of an incorrect fix for CVE-2005-4790.2.
{
"affected": [],
"aliases": [
"CVE-2010-4005"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-11-06T00:00:00Z",
"severity": "MODERATE"
},
"details": "The (1) tomboy and (2) tomboy-panel scripts in GNOME Tomboy 1.5.2 and earlier place a zero-length directory name in the LD_LIBRARY_PATH, which allows local users to gain privileges via a Trojan horse shared library in the current working directory. NOTE: vector 1 exists because of an incorrect fix for CVE-2005-4790.2.",
"id": "GHSA-wqwx-hhf2-x4q9",
"modified": "2022-05-17T05:43:18Z",
"published": "2022-05-17T05:43:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-4005"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=644606"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2010-12/msg00000.html"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2011:035"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2011/0457"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WR2F-45VV-3HJC
Vulnerability from github – Published: 2024-06-11 21:32 – Updated: 2024-07-03 18:44Improper deep link validation in McAfee Security: Antivirus VPN for Android before 8.3.0 could allow an attacker to launch an arbitrary URL within the app.
{
"affected": [],
"aliases": [
"CVE-2024-34405"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-06-11T19:16:07Z",
"severity": "CRITICAL"
},
"details": "Improper deep link validation in McAfee Security: Antivirus VPN for Android before 8.3.0 could allow an attacker to launch an arbitrary URL within the app.",
"id": "GHSA-wr2f-45vv-3hjc",
"modified": "2024-07-03T18:44:48Z",
"published": "2024-06-11T21:32:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-34405"
},
{
"type": "WEB",
"url": "https://www.mcafee.com/en-us/consumer-corporate/mcafee-labs/product-security-bulletins.html"
},
{
"type": "WEB",
"url": "https://www.mcafee.com/support/?page=shell\u0026shell=article-view\u0026articleId=000002403"
}
],
"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:N",
"type": "CVSS_V3"
}
]
}
GHSA-WR2X-XWW3-Q8W6
Vulnerability from github – Published: 2022-05-17 05:24 – Updated: 2022-05-17 05:24CRLF injection vulnerability in mime.php in @Mail WebMail Client in AtMail Open-Source before 1.05 allows remote attackers to conduct directory traversal attacks and read arbitrary files via a %0A sequence followed by a .. (dot dot) in the file parameter.
{
"affected": [],
"aliases": [
"CVE-2012-1919"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-03-27T19:55:00Z",
"severity": "MODERATE"
},
"details": "CRLF injection vulnerability in mime.php in @Mail WebMail Client in AtMail Open-Source before 1.05 allows remote attackers to conduct directory traversal attacks and read arbitrary files via a %0A sequence followed by a .. (dot dot) in the file parameter.",
"id": "GHSA-wr2x-xww3-q8w6",
"modified": "2022-05-17T05:24:16Z",
"published": "2022-05-17T05:24:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-1919"
},
{
"type": "WEB",
"url": "http://atmail.org/download/atmailopen.tgz"
},
{
"type": "WEB",
"url": "http://en.securitylab.ru/lab/PT-2011-48"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/47012"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/743555"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WR32-2GVX-J9C7
Vulnerability from github – Published: 2022-05-01 07:22 – Updated: 2022-05-01 07:22PHP remote file inclusion vulnerability in install.serverstat.php in the Serverstat (com_serverstat) 0.4.4 and earlier component for Mambo allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.
{
"affected": [],
"aliases": [
"CVE-2006-4858"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-09-19T18:07:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in install.serverstat.php in the Serverstat (com_serverstat) 0.4.4 and earlier component for Mambo allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.",
"id": "GHSA-wr32-2gvx-j9c7",
"modified": "2022-05-01T07:22:34Z",
"published": "2022-05-01T07:22:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-4858"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/28959"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2367"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/21943"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/1598"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/446110/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20018"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/3610"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WR3F-MXFC-4Q69
Vulnerability from github – Published: 2022-05-01 23:30 – Updated: 2022-05-01 23:30Multiple PHP remote file inclusion vulnerabilities in BLOG:CMS 4.2.1.c allow remote attackers to execute arbitrary PHP code via a URL in the (1) DIR_PLUGINS parameter to (a) index.php, and the (2) DIR_LIBS parameter to (b) media.php and (c) xmlrpc/server.php in admin/.
{
"affected": [],
"aliases": [
"CVE-2008-0450"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-01-25T00:00:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in BLOG:CMS 4.2.1.c allow remote attackers to execute arbitrary PHP code via a URL in the (1) DIR_PLUGINS parameter to (a) index.php, and the (2) DIR_LIBS parameter to (b) media.php and (c) xmlrpc/server.php in admin/.",
"id": "GHSA-wr3f-mxfc-4q69",
"modified": "2022-05-01T23:30:25Z",
"published": "2022-05-01T23:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-0450"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/3576"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/486743/100/0/threaded"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WR4F-QP59-PWR3
Vulnerability from github – Published: 2023-03-16 21:30 – Updated: 2023-03-23 21:30GE Digital Proficy iFIX 2022, GE Digital Proficy iFIX v6.1, and GE Digital Proficy iFIX v6.5 are vulnerable to code injection, which may allow an attacker to insert malicious configuration files in the expected web server execution path and gain full control of the HMI software.
{
"affected": [],
"aliases": [
"CVE-2023-0598"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-03-16T20:15:00Z",
"severity": "CRITICAL"
},
"details": "GE Digital Proficy iFIX 2022, GE Digital Proficy iFIX v6.1, and GE Digital Proficy iFIX v6.5 are vulnerable to code injection, which may allow an attacker to insert malicious configuration files in the expected web server execution path and gain full control of the HMI software.",
"id": "GHSA-wr4f-qp59-pwr3",
"modified": "2023-03-23T21:30:20Z",
"published": "2023-03-16T21:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-0598"
},
{
"type": "WEB",
"url": "https://digitalsupport.ge.com/s/article/iFIX-Secure-Deployment-Guide?language=en_US"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/news-events/ics-advisories/icsa-23-073-03"
}
],
"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-WR5Q-Q78Q-XQ5J
Vulnerability from github – Published: 2023-05-06 00:30 – Updated: 2024-04-04 03:50S-CMS v5.0 was discovered to contain an authenticated remote code execution (RCE) vulnerability via the component /admin/ajax.php.
{
"affected": [],
"aliases": [
"CVE-2023-29963"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-05-05T23:15:09Z",
"severity": "HIGH"
},
"details": "S-CMS v5.0 was discovered to contain an authenticated remote code execution (RCE) vulnerability via the component /admin/ajax.php.",
"id": "GHSA-wr5q-q78q-xq5j",
"modified": "2024-04-04T03:50:01Z",
"published": "2023-05-06T00:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29963"
},
{
"type": "WEB",
"url": "https://github.com/superjock1988/debug/blob/main/s-cms_rce.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WR68-H4RJ-4XVR
Vulnerability from github – Published: 2022-05-01 07:44 – Updated: 2025-04-09 03:38Multiple PHP remote file inclusion vulnerabilities in JAF CMS 4.0 and 4.0 RC2 allow remote attackers to execute arbitrary PHP code via a URL in the main_dir parameter to (1) forum/main.php and (2) forum/headlines.php.
{
"affected": [],
"aliases": [
"CVE-2006-7127"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-03-06T01:19:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in JAF CMS 4.0 and 4.0 RC2 allow remote attackers to execute arbitrary PHP code via a URL in the main_dir parameter to (1) forum/main.php and (2) forum/headlines.php.",
"id": "GHSA-wr68-h4rj-4xvr",
"modified": "2025-04-09T03:38:29Z",
"published": "2022-05-01T07:44:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-7127"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/29348"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2474"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5317"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/22143"
},
{
"type": "WEB",
"url": "http://www.rahim.webd.pl/exploity/Exploits/92.txt"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20329"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WR6G-6FVQ-3JR7
Vulnerability from github – Published: 2022-05-01 07:27 – Updated: 2022-05-01 07:27Multiple PHP remote file inclusion vulnerabilities in PHPmybibli 3.0.1 and earlier allow remote attackers to execute arbitrary PHP code via a URL in the (1) class_path, (2) javascript_path, and (3) include_path parameters in (a) cart.php; the (4) class_path parameter in (b) index.php; the (5) javascript_path parameter in (c) edit.php; the (6) include_path parameter in (d) circ.php; unspecified parameters in (e) select.php; and unspecified parameters in other files.
{
"affected": [],
"aliases": [
"CVE-2006-5402"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-10-18T23:07:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in PHPmybibli 3.0.1 and earlier allow remote attackers to execute arbitrary PHP code via a URL in the (1) class_path, (2) javascript_path, and (3) include_path parameters in (a) cart.php; the (4) class_path parameter in (b) index.php; the (5) javascript_path parameter in (c) edit.php; the (6) include_path parameter in (d) circ.php; unspecified parameters in (e) select.php; and unspecified parameters in other files.",
"id": "GHSA-wr6g-6fvq-3jr7",
"modified": "2022-05-01T07:27:59Z",
"published": "2022-05-01T07:27:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-5402"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/29627"
},
{
"type": "WEB",
"url": "http://advisories.echo.or.id/adv/adv55-theday-2006.txt"
},
{
"type": "WEB",
"url": "http://attrition.org/pipermail/vim/2006-October/001087.html"
},
{
"type": "WEB",
"url": "http://attrition.org/pipermail/vim/2006-October/001088.html"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=116110988829381\u0026w=2"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20578"
},
{
"type": "WEB",
"url": "http://www.sigb.net/patch.php"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/4064"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WR74-RXV7-FPWQ
Vulnerability from github – Published: 2022-05-14 02:32 – Updated: 2022-05-14 02:32Microsoft Internet Explorer 11 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted web site, aka "Internet Explorer Memory Corruption Vulnerability," a different vulnerability than CVE-2014-1782, CVE-2014-1785, CVE-2014-2753, CVE-2014-2755, CVE-2014-2760, CVE-2014-2761, CVE-2014-2772, and CVE-2014-2776.
{
"affected": [],
"aliases": [
"CVE-2014-1769"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-06-11T04:56:00Z",
"severity": "HIGH"
},
"details": "Microsoft Internet Explorer 11 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted web site, aka \"Internet Explorer Memory Corruption Vulnerability,\" a different vulnerability than CVE-2014-1782, CVE-2014-1785, CVE-2014-2753, CVE-2014-2755, CVE-2014-2760, CVE-2014-2761, CVE-2014-2772, and CVE-2014-2776.",
"id": "GHSA-wr74-rxv7-fpwq",
"modified": "2022-05-14T02:32:18Z",
"published": "2022-05-14T02:32:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-1769"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2014/ms14-035"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/67863"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1030370"
}
],
"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.