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.
8641 vulnerabilities reference this CWE, most recent first.
GHSA-5PPW-V8M5-XWW6
Vulnerability from github – Published: 2022-05-01 07:30 – Updated: 2022-05-01 07:30Multiple PHP remote file inclusion vulnerabilities in phpProfiles 2.1 Beta allow remote attackers to execute arbitrary PHP code via a URL in the (1) reqpath parameter to (a) body.inc.php and (b) body_blog.inc.php in users/include/; or the (2) usrinc parameter in users/include/upload_ht.inc.php.
{
"affected": [],
"aliases": [
"CVE-2006-5634"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-11-01T00:07:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in phpProfiles 2.1 Beta allow remote attackers to execute arbitrary PHP code via a URL in the (1) reqpath parameter to (a) body.inc.php and (b) body_blog.inc.php in users/include/; or the (2) usrinc parameter in users/include/upload_ht.inc.php.",
"id": "GHSA-5ppw-v8m5-xww6",
"modified": "2022-05-01T07:30:29Z",
"published": "2022-05-01T07:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-5634"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/29900"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2688"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/22644"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/30137"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/30138"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/displayvuln.php?osvdb_id=30136"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20819"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/4274"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5PPX-563R-592F
Vulnerability from github – Published: 2022-05-02 03:17 – Updated: 2022-05-02 03:17Static code injection vulnerability in post.php in Simple PHP News 1.0 final allows remote attackers to inject arbitrary PHP code into news.txt via the post parameter, and then execute the code via a direct request to display.php. NOTE: some of these details are obtained from third party information.
{
"affected": [],
"aliases": [
"CVE-2009-0643"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-20T06:47:00Z",
"severity": "MODERATE"
},
"details": "Static code injection vulnerability in post.php in Simple PHP News 1.0 final allows remote attackers to inject arbitrary PHP code into news.txt via the post parameter, and then execute the code via a direct request to display.php. NOTE: some of these details are obtained from third party information.",
"id": "GHSA-5ppx-563r-592f",
"modified": "2022-05-02T03:17:07Z",
"published": "2022-05-02T03:17:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0643"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/48829"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/7999"
},
{
"type": "WEB",
"url": "http://osvdb.org/51816"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/33814"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/0357"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5PQP-VQFR-X6RF
Vulnerability from github – Published: 2022-05-02 06:11 – Updated: 2022-05-02 06:11The TCP/IP implementation in Microsoft Windows Vista Gold, SP1, and SP2 and Server 2008 Gold and SP2, when a custom network driver is used, does not properly handle local fragmentation of Encapsulating Security Payload (ESP) over UDP packets, which allows remote attackers to execute arbitrary code via crafted packets, aka "Header MDL Fragmentation Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2010-0240"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-02-10T18:30:00Z",
"severity": "HIGH"
},
"details": "The TCP/IP implementation in Microsoft Windows Vista Gold, SP1, and SP2 and Server 2008 Gold and SP2, when a custom network driver is used, does not properly handle local fragmentation of Encapsulating Security Payload (ESP) over UDP packets, which allows remote attackers to execute arbitrary code via crafted packets, aka \"Header MDL Fragmentation Vulnerability.\"",
"id": "GHSA-5pqp-vqfr-x6rf",
"modified": "2022-05-02T06:11:01Z",
"published": "2022-05-02T06:11:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-0240"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2010/ms10-009"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A8400"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA10-040A.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5PXQ-XQP4-7FXW
Vulnerability from github – Published: 2025-10-06 21:30 – Updated: 2026-01-23 21:30A vulnerability was detected in ILIAS up to 8.23/9.13/10.1. Affected by this vulnerability is an unknown functionality of the component Certificate Import Handler. The manipulation results in Remote Code Execution. The attack may be performed from remote. Upgrading to version 8.24, 9.14 and 10.2 addresses this issue. It is recommended to upgrade the affected component.
{
"affected": [],
"aliases": [
"CVE-2025-11344"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-10-06T19:15:34Z",
"severity": "MODERATE"
},
"details": "A vulnerability was detected in ILIAS up to 8.23/9.13/10.1. Affected by this vulnerability is an unknown functionality of the component Certificate Import Handler. The manipulation results in Remote Code Execution. The attack may be performed from remote. Upgrading to version 8.24, 9.14 and 10.2 addresses this issue. It is recommended to upgrade the affected component.",
"id": "GHSA-5pxq-xqp4-7fxw",
"modified": "2026-01-23T21:30:37Z",
"published": "2025-10-06T21:30:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-11344"
},
{
"type": "WEB",
"url": "https://docu.ilias.de/go/blog/15821/882"
},
{
"type": "WEB",
"url": "https://srlabs.de/blog/breaking-ilias-part-2-three-to-rce"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.327229"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.327229"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.664889"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/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-5PXX-XCWF-6J29
Vulnerability from github – Published: 2022-05-17 05:35 – Updated: 2022-05-17 05:35QuickTime in Apple Mac OS X before 10.7.2 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption and application crash) via a crafted movie file.
{
"affected": [],
"aliases": [
"CVE-2011-3228"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2011-10-14T10:55:00Z",
"severity": "MODERATE"
},
"details": "QuickTime in Apple Mac OS X before 10.7.2 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption and application crash) via a crafted movie file.",
"id": "GHSA-5pxx-xcwf-6j29",
"modified": "2022-05-17T05:35:29Z",
"published": "2022-05-17T05:35:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-3228"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/Security-announce/2011//Oct/msg00003.html"
},
{
"type": "WEB",
"url": "http://osvdb.org/76372"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT5002"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT5016"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/50085"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/50127"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5Q2V-RQ3Q-XC6M
Vulnerability from github – Published: 2022-05-01 18:31 – Updated: 2022-05-01 18:31PHP remote file inclusion vulnerability in index.php in Segue CMS 1.8.4 and earlier, when register_globals is disabled, allows remote attackers to execute arbitrary PHP code via a URL in the themesdir parameter, a different vector than CVE-2006-5497. NOTE: this issue was disputed, but the dispute was retracted after additional analysis.
{
"affected": [],
"aliases": [
"CVE-2007-5186"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-10-03T14:17:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in index.php in Segue CMS 1.8.4 and earlier, when register_globals is disabled, allows remote attackers to execute arbitrary PHP code via a URL in the themesdir parameter, a different vector than CVE-2006-5497. NOTE: this issue was disputed, but the dispute was retracted after additional analysis.",
"id": "GHSA-5q2v-rq3q-xc6m",
"modified": "2022-05-01T18:31:01Z",
"published": "2022-05-01T18:31:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5186"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36903"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4476"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/27025"
},
{
"type": "WEB",
"url": "http://sourceforge.net/project/shownotes.php?group_id=82171\u0026release_id=543854"
},
{
"type": "WEB",
"url": "http://www.attrition.org/pipermail/vim/2007-October/001811.html"
},
{
"type": "WEB",
"url": "http://www.attrition.org/pipermail/vim/2007-October/001816.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/25889"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/3342"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-5Q85-2XFH-7GPF
Vulnerability from github – Published: 2022-05-02 03:19 – Updated: 2026-05-27 18:31The Active Template Library (ATL) in Microsoft Visual Studio .NET 2003 SP1, Visual Studio 2005 SP1 and 2008 Gold, and Visual C++ 2005 SP1 and 2008 Gold and SP1; and Windows 2000 SP4, XP SP2 and SP3, Server 2003 SP2, Vista Gold, SP1, and SP2, and Server 2008 Gold and SP2; does not prevent VariantClear calls on an uninitialized VARIANT, which allows remote attackers to execute arbitrary code via a malformed stream to an ATL (1) component or (2) control, related to ATL headers and error handling, aka "ATL Uninitialized Object Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2009-0901"
],
"database_specific": {
"cwe_ids": [
"CWE-457",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-07-29T17:30:00Z",
"severity": "HIGH"
},
"details": "The Active Template Library (ATL) in Microsoft Visual Studio .NET 2003 SP1, Visual Studio 2005 SP1 and 2008 Gold, and Visual C++ 2005 SP1 and 2008 Gold and SP1; and Windows 2000 SP4, XP SP2 and SP3, Server 2003 SP2, Vista Gold, SP1, and SP2, and Server 2008 Gold and SP2; does not prevent VariantClear calls on an uninitialized VARIANT, which allows remote attackers to execute arbitrary code via a malformed stream to an ATL (1) component or (2) control, related to ATL headers and error handling, aka \"ATL Uninitialized Object Vulnerability.\"",
"id": "GHSA-5q85-2xfh-7gpf",
"modified": "2026-05-27T18:31:31Z",
"published": "2022-05-02T03:19:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0901"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-035"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-037"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-060"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6289"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6311"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6373"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A7581"
},
{
"type": "WEB",
"url": "http://blogs.technet.com/srd/archive/2009/08/11/ms09-037-why-we-are-using-cve-s-already-used-in-ms09-035.aspx"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=126592505426855\u0026w=2"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35967"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36187"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36374"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/36746"
},
{
"type": "WEB",
"url": "http://sunsolve.sun.com/search/document.do?assetkey=1-66-266108-1"
},
{
"type": "WEB",
"url": "http://www.adobe.com/support/security/advisories/apsa09-04.html"
},
{
"type": "WEB",
"url": "http://www.adobe.com/support/security/bulletins/apsb09-10.html"
},
{
"type": "WEB",
"url": "http://www.adobe.com/support/security/bulletins/apsb09-11.html"
},
{
"type": "WEB",
"url": "http://www.adobe.com/support/security/bulletins/apsb09-13.html"
},
{
"type": "WEB",
"url": "http://www.novell.com/support/viewContent.do?externalId=7004997\u0026sliceId=1"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/35832"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA09-195A.html"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA09-223A.html"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA09-286A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/2034"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/2232"
}
],
"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-5QFC-W62V-VW7J
Vulnerability from github – Published: 2023-09-25 18:30 – Updated: 2024-04-04 07:50The Import XML and RSS Feeds WordPress plugin before 2.1.4 does not filter file extensions for uploaded files, allowing an attacker to upload a malicious PHP file, leading to Remote Code Execution.
{
"affected": [],
"aliases": [
"CVE-2023-4300"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-09-25T16:15:15Z",
"severity": "HIGH"
},
"details": "The Import XML and RSS Feeds WordPress plugin before 2.1.4 does not filter file extensions for uploaded files, allowing an attacker to upload a malicious PHP file, leading to Remote Code Execution.",
"id": "GHSA-5qfc-w62v-vw7j",
"modified": "2024-04-04T07:50:36Z",
"published": "2023-09-25T18:30:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-4300"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/d4220025-2272-4d5f-9703-4b2ac4a51c42"
}
],
"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-5QFQ-F4MC-VP2X
Vulnerability from github – Published: 2024-11-16 06:30 – Updated: 2026-04-08 21:32The The Drop Shadow Boxes plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 1.7.14. This is due to the software allowing users to execute an action that does not properly validate a value before running do_shortcode. This makes it possible for authenticated attackers, with Subscriber-level access and above, to execute arbitrary shortcodes.
{
"affected": [],
"aliases": [
"CVE-2024-10262"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-16T04:15:04Z",
"severity": "MODERATE"
},
"details": "The The Drop Shadow Boxes plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 1.7.14. This is due to the software allowing users to execute an action that does not properly validate a value before running do_shortcode. This makes it possible for authenticated attackers, with Subscriber-level access and above, to execute arbitrary shortcodes.",
"id": "GHSA-5qfq-f4mc-vp2x",
"modified": "2026-04-08T21:32:56Z",
"published": "2024-11-16T06:30:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10262"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/drop-shadow-boxes/trunk/dropshadowboxes.php#L150"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3199280"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/drop-shadow-boxes/#developers"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/fa0a296a-a93f-4c0e-9911-b4f9bdd53fad?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-5QGC-C76M-GXVG
Vulnerability from github – Published: 2022-04-29 01:28 – Updated: 2025-04-03 03:57PHP remote file inclusion vulnerability in _functions.php in cpCommerce 0.5f allows remote attackers to execute arbitrary code via the prefix parameter.
{
"affected": [],
"aliases": [
"CVE-2003-1500"
],
"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 _functions.php in cpCommerce 0.5f allows remote attackers to execute arbitrary code via the prefix parameter.",
"id": "GHSA-5qgc-c76m-gxvg",
"modified": "2025-04-03T03:57:30Z",
"published": "2022-04-29T01:28:11Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2003-1500"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/13457"
},
{
"type": "WEB",
"url": "http://cpcommerce.org/forums/index.php?board=2%3Baction=display%3Bthreadid=864"
},
{
"type": "WEB",
"url": "http://cpcommerce.org/forums/index.php?board=2;action=display;threadid=864"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/3301"
},
{
"type": "WEB",
"url": "http://www.securiteam.com/unixfocus/6H00E2K8KG.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/341757"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/8851"
}
],
"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.