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-WQ7C-GV3R-8F5J
Vulnerability from github – Published: 2022-04-29 01:28 – Updated: 2022-04-29 01:28PHP remote file inclusion vulnerability in emailreader_execute_on_each_page.inc.php in Cedric Email Reader 0.4 allows remote attackers to execute arbitrary PHP code via the emailreader_ini parameter.
{
"affected": [],
"aliases": [
"CVE-2003-1411"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2003-12-31T05:00:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in emailreader_execute_on_each_page.inc.php in Cedric Email Reader 0.4 allows remote attackers to execute arbitrary PHP code via the emailreader_ini parameter.",
"id": "GHSA-wq7c-gv3r-8f5j",
"modified": "2022-04-29T01:28:03Z",
"published": "2022-04-29T01:28:03Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2003-1411"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/11278"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/8024"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/5900"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/311173"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/6820"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WQ88-7MXF-GGCP
Vulnerability from github – Published: 2022-05-14 01:05 – Updated: 2022-05-14 01:05Bamboo 2.2 before 5.8.5 and 5.9.x before 5.9.7 allows remote attackers with access to the Bamboo web interface to execute arbitrary Java code via an unspecified resource.
{
"affected": [],
"aliases": [
"CVE-2015-6576"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-10-03T01:29:00Z",
"severity": "HIGH"
},
"details": "Bamboo 2.2 before 5.8.5 and 5.9.x before 5.9.7 allows remote attackers with access to the Bamboo web interface to execute arbitrary Java code via an unspecified resource.",
"id": "GHSA-wq88-7mxf-ggcp",
"modified": "2022-05-14T01:05:51Z",
"published": "2022-05-14T01:05:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2015-6576"
},
{
"type": "WEB",
"url": "https://confluence.atlassian.com/x/Hw7RLg"
},
{
"type": "WEB",
"url": "https://jira.atlassian.com/browse/BAM-16439"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/134065/Bamboo-Java-Code-Execution.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/536747/100/0/threaded"
}
],
"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-WQ8W-M2G8-MV57
Vulnerability from github – Published: 2024-11-12 00:30 – Updated: 2024-11-19 21:31PyMOL 2.5.0 contains a vulnerability in its "Run Script" function, which allows the execution of arbitrary Python code embedded within .PYM files. Attackers can craft a malicious .PYM file containing a Python reverse shell payload and exploit the function to achieve Remote Command Execution (RCE). This vulnerability arises because PyMOL treats .PYM files as Python scripts without properly validating or restricting the commands within the script, enabling attackers to run unauthorized commands in the context of the user running the application.
{
"affected": [],
"aliases": [
"CVE-2024-50636"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-11T23:15:05Z",
"severity": "CRITICAL"
},
"details": "PyMOL 2.5.0 contains a vulnerability in its \"Run Script\" function, which allows the execution of arbitrary Python code embedded within .PYM files. Attackers can craft a malicious .PYM file containing a Python reverse shell payload and exploit the function to achieve Remote Command Execution (RCE). This vulnerability arises because PyMOL treats .PYM files as Python scripts without properly validating or restricting the commands within the script, enabling attackers to run unauthorized commands in the context of the user running the application.",
"id": "GHSA-wq8w-m2g8-mv57",
"modified": "2024-11-19T21:31:31Z",
"published": "2024-11-12T00:30:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-50636"
},
{
"type": "WEB",
"url": "https://github.com/schrodinger/pymol-open-source/issues/405"
},
{
"type": "WEB",
"url": "https://github.com/yamerooo123/CVE/blob/main/CVE-2024-50636/Description.md"
},
{
"type": "WEB",
"url": "https://youtu.be/SWnN_a1tUNc"
}
],
"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-WQC8-9V27-R965
Vulnerability from github – Published: 2026-04-01 15:31 – Updated: 2026-04-03 18:31MetInfo CMS versions 7.9, 8.0, and 8.1 contain an unauthenticated PHP code injection vulnerability that allows remote attackers to execute arbitrary code by sending crafted requests with malicious PHP code. Attackers can exploit insufficient input neutralization in the execution path to achieve remote code execution and gain full control over the affected server.
{
"affected": [],
"aliases": [
"CVE-2026-29014"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-04-01T13:16:35Z",
"severity": "CRITICAL"
},
"details": "MetInfo CMS versions 7.9, 8.0, and 8.1 contain an unauthenticated PHP code injection vulnerability that allows remote attackers to execute arbitrary code by sending crafted requests with malicious PHP code. Attackers can exploit insufficient input neutralization in the execution path to achieve remote code execution and gain full control over the affected server.",
"id": "GHSA-wqc8-9v27-r965",
"modified": "2026-04-03T18:31:06Z",
"published": "2026-04-01T15:31:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-29014"
},
{
"type": "WEB",
"url": "https://karmainsecurity.com/KIS-2026-06"
},
{
"type": "WEB",
"url": "https://websec.net/blog/cve-2026-29014-metinfo-cms-unauthenticated-php-code-injection-69cdc290c14a8a99e1f91b7a"
},
{
"type": "WEB",
"url": "https://www.metinfo.cn"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/metinfo-cms-unauthenticated-php-code-injection-rce"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2026/Apr/1"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/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-WQCF-Q92W-MCGR
Vulnerability from github – Published: 2022-05-14 00:57 – Updated: 2022-05-14 00:57An issue was discovered in BageCMS 3.1.3. The attacker can execute arbitrary PHP code on the web server and can read any file on the web server via an index.php?r=admini/template/updateTpl&filename= URI.
{
"affected": [],
"aliases": [
"CVE-2018-18258"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-10-11T21:01:00Z",
"severity": "CRITICAL"
},
"details": "An issue was discovered in BageCMS 3.1.3. The attacker can execute arbitrary PHP code on the web server and can read any file on the web server via an index.php?r=admini/template/updateTpl\u0026filename= URI.",
"id": "GHSA-wqcf-q92w-mcgr",
"modified": "2022-05-14T00:57:40Z",
"published": "2022-05-14T00:57:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-18258"
},
{
"type": "WEB",
"url": "https://github.com/rakjong/vuln/blob/master/Bagecms_vuln_1.pdf"
},
{
"type": "WEB",
"url": "https://kc.mcafee.com/corporate/index?page=content\u0026id=SB10284"
}
],
"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-WQFH-9M4G-7X6X
Vulnerability from github – Published: 2022-02-09 22:14 – Updated: 2024-03-14 21:56A regression has been introduced in the commit preventing JMX re-bind. By passing an empty environment map to RMIConnectorServer, instead of the map that contains the authentication credentials, it leaves ActiveMQ open to the following attack - A remote client could create a javax.management.loading.MLet MBean and use it to create new MBeans from arbitrary URLs, at least if there is no security manager. In other words, a rogue remote client could make your Java application execute arbitrary code. Mitigation - Upgrade to Apache ActiveMQ 5.15.13
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.activemq:activemq-parent"
},
"ranges": [
{
"events": [
{
"introduced": "5.15.12"
},
{
"fixed": "5.15.13"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"5.15.12"
]
}
],
"aliases": [
"CVE-2020-11998"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2021-04-05T23:02:39Z",
"nvd_published_at": "2020-09-10T19:15:00Z",
"severity": "CRITICAL"
},
"details": "A regression has been introduced in the commit preventing JMX re-bind. By passing an empty environment map to RMIConnectorServer, instead of the map that contains the authentication credentials, it leaves ActiveMQ open to the following attack - A remote client could create a javax.management.loading.MLet MBean and use it to create new MBeans from arbitrary URLs, at least if there is no security manager. In other words, a rogue remote client could make your Java application execute arbitrary code. Mitigation - Upgrade to Apache ActiveMQ 5.15.13",
"id": "GHSA-wqfh-9m4g-7x6x",
"modified": "2024-03-14T21:56:27Z",
"published": "2022-02-09T22:14:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-11998"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/commit/0d6e5f2"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/commit/88b78d0"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/commit/aa8900c"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread.html/r946488fb942fd35c6a6e0359f52504a558ed438574a8f14d36d7dcd7@%3Ccommits.activemq.apache.org%3E"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread.html/rb2fd3bf2dce042e0ab3f3c94c4767c96bb2e7e6737624d63162df36d@%3Ccommits.activemq.apache.org%3E"
},
{
"type": "WEB",
"url": "https://www.oracle.com//security-alerts/cpujul2021.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpuApr2021.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpujan2021.html"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpuoct2021.html"
},
{
"type": "WEB",
"url": "http://activemq.apache.org/security-advisories.data/CVE-2020-11998-announcement.txt"
}
],
"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"
}
],
"summary": "Remote code execution in Apache ActiveMQ"
}
GHSA-WQMG-Q854-X6X6
Vulnerability from github – Published: 2022-05-01 23:56 – Updated: 2022-05-01 23:56The shellescape function in Vim 7.0 through 7.2, including 7.2a.10, allows user-assisted attackers to execute arbitrary code via the "!" (exclamation point) shell metacharacter in (1) the filename of a ZIP archive and possibly (2) the filename of the first file in a ZIP archive, which is not properly handled by zip.vim in the VIM ZIP plugin (zipPlugin.vim) v.11 through v.21, as demonstrated by the zipplugin and zipplugin.v2 test cases. NOTE: this issue reportedly exists because of an incomplete fix for CVE-2008-2712. NOTE: this issue has the same root cause as CVE-2008-3074. NOTE: due to the complexity of the associated disclosures and the incomplete information related to them, there may be inaccuracies in this CVE description and in external mappings to this identifier.
{
"affected": [],
"aliases": [
"CVE-2008-3075"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-21T22:30:00Z",
"severity": "HIGH"
},
"details": "The shellescape function in Vim 7.0 through 7.2, including 7.2a.10, allows user-assisted attackers to execute arbitrary code via the \"!\" (exclamation point) shell metacharacter in (1) the filename of a ZIP archive and possibly (2) the filename of the first file in a ZIP archive, which is not properly handled by zip.vim in the VIM ZIP plugin (zipPlugin.vim) v.11 through v.21, as demonstrated by the zipplugin and zipplugin.v2 test cases. NOTE: this issue reportedly exists because of an incomplete fix for CVE-2008-2712. NOTE: this issue has the same root cause as CVE-2008-3074. NOTE: due to the complexity of the associated disclosures and the incomplete information related to them, there may be inaccuracies in this CVE description and in external mappings to this identifier.",
"id": "GHSA-wqmg-q854-x6x6",
"modified": "2022-05-01T23:56:22Z",
"published": "2022-05-01T23:56:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-3075"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=467432"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10246"
},
{
"type": "WEB",
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506919"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2009-03/msg00004.html"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=121494431426308\u0026w=2"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/34418"
},
{
"type": "WEB",
"url": "http://wiki.rpath.com/wiki/Advisories:rPSA-2008-0324"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2008:236"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/07/07/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/07/07/4"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/07/08/12"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/07/10/7"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/07/13/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/07/15/4"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/08/01/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/10/15/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2008/10/20/2"
},
{
"type": "WEB",
"url": "http://www.rdancer.org/vulnerablevim.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2008-0580.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32463"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WQPR-R259-5JCX
Vulnerability from github – Published: 2022-05-14 01:54 – Updated: 2022-05-14 01:54s-cms 3.0 allows remote attackers to execute arbitrary PHP code by placing this code in a crafted User-agent Disallow value in the robots.php txt parameter.
{
"affected": [],
"aliases": [
"CVE-2018-18426"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-10-17T04:29:00Z",
"severity": "HIGH"
},
"details": "s-cms 3.0 allows remote attackers to execute arbitrary PHP code by placing this code in a crafted User-agent Disallow value in the robots.php txt parameter.",
"id": "GHSA-wqpr-r259-5jcx",
"modified": "2022-05-14T01:54:10Z",
"published": "2022-05-14T01:54:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-18426"
},
{
"type": "WEB",
"url": "https://www.s-cms.cn/update.html"
},
{
"type": "WEB",
"url": "http://www.ttk7.cn/post-93.html"
}
],
"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-WQR2-8C98-RXV3
Vulnerability from github – Published: 2024-09-03 18:31 – Updated: 2024-09-03 21:31An issue in the js_localize.php function of LimeSurvey v6.6.2 and before allows attackers to execute arbitrary code via injecting a crafted payload into the lng parameter of the js_localize.php function
{
"affected": [],
"aliases": [
"CVE-2024-42902"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-03T18:15:08Z",
"severity": "HIGH"
},
"details": "An issue in the js_localize.php function of LimeSurvey v6.6.2 and before allows attackers to execute arbitrary code via injecting a crafted payload into the lng parameter of the js_localize.php function",
"id": "GHSA-wqr2-8c98-rxv3",
"modified": "2024-09-03T21:31:12Z",
"published": "2024-09-03T18:31:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-42902"
},
{
"type": "WEB",
"url": "https://bugs.limesurvey.org/view.php?id=19639"
},
{
"type": "WEB",
"url": "https://github.com/LimeSurvey/LimeSurvey/blob/6434b12ded1c4b6516200c453441d0896e11eee0/vendor/kcfinder/js_localize.php#L19"
},
{
"type": "WEB",
"url": "https://github.com/sysentr0py/CVEs/tree/main/CVE-2024-42902"
}
],
"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-WQRQ-32PW-4WJ8
Vulnerability from github – Published: 2022-05-24 16:55 – Updated: 2022-05-24 16:55An issue was discovered in LibreNMS through 1.47. Several of the scripts perform dynamic script inclusion via the include() function on user supplied input without sanitizing the values by calling basename() or a similar function. An attacker can leverage this to execute PHP code from the included file. Exploitation of these scripts is made difficult by additional text being appended (typically .inc.php), which means an attacker would need to be able to control both a filename and its content on the server. However, exploitation can be achieved as demonstrated by the csv.php?report=../ substring.
{
"affected": [],
"aliases": [
"CVE-2019-10666"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-09-09T13:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in LibreNMS through 1.47. Several of the scripts perform dynamic script inclusion via the include() function on user supplied input without sanitizing the values by calling basename() or a similar function. An attacker can leverage this to execute PHP code from the included file. Exploitation of these scripts is made difficult by additional text being appended (typically .inc.php), which means an attacker would need to be able to control both a filename and its content on the server. However, exploitation can be achieved as demonstrated by the csv.php?report=../ substring.",
"id": "GHSA-wqrq-32pw-4wj8",
"modified": "2022-05-24T16:55:40Z",
"published": "2022-05-24T16:55:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-10666"
},
{
"type": "WEB",
"url": "https://www.darkmatter.ae/xen1thlabs/librenms-limited-local-file-inclusion-via-directory-traversal-vulnerability-xl-19-020"
}
],
"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.