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.
8357 vulnerabilities reference this CWE, most recent first.
GHSA-R73G-HMMG-CJ3M
Vulnerability from github – Published: 2022-05-01 07:27 – Updated: 2022-05-01 07:27Multiple PHP remote file inclusion vulnerabilities in Redaction System 1.0000 allow remote attackers to execute arbitrary PHP code via a URL in the (1) lang_prefix parameter to (a) conn.php, (b) sesscheck.php, (c) wap/conn.php, or (d) wap/sesscheck.php, or the (2) lang parameter to (e) index.php.
{
"affected": [],
"aliases": [
"CVE-2006-5302"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-10-17T15:07:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Redaction System 1.0000 allow remote attackers to execute arbitrary PHP code via a URL in the (1) lang_prefix parameter to (a) conn.php, (b) sesscheck.php, (c) wap/conn.php, or (d) wap/sesscheck.php, or the (2) lang parameter to (e) index.php.",
"id": "GHSA-r73g-hmmg-cj3m",
"modified": "2022-05-01T07:27:03Z",
"published": "2022-05-01T07:27:03Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-5302"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/29504"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2534"
},
{
"type": "WEB",
"url": "http://redactionsystem.sourceforge.net/index.php?m=news\u0026id=2"
},
{
"type": "WEB",
"url": "http://redactionsystem.sourceforge.net/index.php?m=news\u0026id=5"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/22347"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/29700"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/29701"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/29702"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/29703"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/29704"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20499"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/4024"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-R743-PQ9R-5JGM
Vulnerability from github – Published: 2024-09-10 09:31 – Updated: 2024-09-10 09:31A low privileged remote attacker can perform configuration changes of the firewall services, including packet filter, packet forwarding, network access control or NAT through the FW_INCOMING.FROM_IP FW_INCOMING.IN_IP FW_OUTGOING.FROM_IP FW_OUTGOING.IN_IP FW_RULESETS.FROM_IP FW_RULESETS.IN_IP environment variable which can lead to a DoS.
{
"affected": [],
"aliases": [
"CVE-2024-43393"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-10T09:15:06Z",
"severity": "MODERATE"
},
"details": "A low privileged remote attacker can perform configuration changes of the firewall services, including packet filter, packet forwarding, network access control or NAT through the FW_INCOMING.FROM_IP FW_INCOMING.IN_IP FW_OUTGOING.FROM_IP FW_OUTGOING.IN_IP FW_RULESETS.FROM_IP FW_RULESETS.IN_IP environment variable which can lead to a DoS.",
"id": "GHSA-r743-pq9r-5jgm",
"modified": "2024-09-10T09:31:12Z",
"published": "2024-09-10T09:31:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-43393"
},
{
"type": "WEB",
"url": "https://cert.vde.com/en/advisories/VDE-2024-039"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-R75Q-38F6-X3Q4
Vulnerability from github – Published: 2025-04-17 18:31 – Updated: 2026-04-01 18:34Improper Control of Generation of Code ('Code Injection') vulnerability in Rameez Iqbal Real Estate Manager allows Code Injection. This issue affects Real Estate Manager: from n/a through 7.3.
{
"affected": [],
"aliases": [
"CVE-2025-32596"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-04-17T16:15:45Z",
"severity": "HIGH"
},
"details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in Rameez Iqbal Real Estate Manager allows Code Injection. This issue affects Real Estate Manager: from n/a through 7.3.",
"id": "GHSA-r75q-38f6-x3q4",
"modified": "2026-04-01T18:34:49Z",
"published": "2025-04-17T18:31:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-32596"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/plugin/real-estate-manager/vulnerability/wordpress-real-estate-manager-plugin-7-3-arbitrary-code-execution-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-R78H-R76M-GFM8
Vulnerability from github – Published: 2022-05-14 02:36 – Updated: 2022-05-14 02:36Heap-based buffer overflow in Microsoft Word 2002 SP3 allows remote attackers to execute arbitrary code via malformed records in a Word document, aka "Word Heap Overflow Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2010-3218"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-10-13T19:00:00Z",
"severity": "HIGH"
},
"details": "Heap-based buffer overflow in Microsoft Word 2002 SP3 allows remote attackers to execute arbitrary code via malformed records in a Word document, aka \"Word Heap Overflow Vulnerability.\"",
"id": "GHSA-r78h-r76m-gfm8",
"modified": "2022-05-14T02:36:26Z",
"published": "2022-05-14T02:36:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-3218"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2010/ms10-079"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A7010"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA10-285A.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-R7C9-C69M-RPH8
Vulnerability from github – Published: 2022-03-26 00:19 – Updated: 2025-10-22 17:32Util/PHP/eval-stdin.php in PHPUnit starting with 4.8.19 and before 4.8.28, as well as 5.x before 5.6.3, allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a <?php substring, as demonstrated by an attack on a site with an exposed /vendor folder, i.e., external access to the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "phpunit/phpunit"
},
"ranges": [
{
"events": [
{
"introduced": "4.8.19"
},
{
"fixed": "4.8.28"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "phpunit/phpunit"
},
"ranges": [
{
"events": [
{
"introduced": "5.0.10"
},
{
"fixed": "5.6.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-9841"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-03-26T00:19:30Z",
"nvd_published_at": "2017-06-27T17:29:00Z",
"severity": "CRITICAL"
},
"details": "Util/PHP/eval-stdin.php in PHPUnit starting with 4.8.19 and before 4.8.28, as well as 5.x before 5.6.3, allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a `\u003c?php ` substring, as demonstrated by an attack on a site with an exposed /vendor folder, i.e., external access to the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI.",
"id": "GHSA-r7c9-c69m-rph8",
"modified": "2025-10-22T17:32:06Z",
"published": "2022-03-26T00:19:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-9841"
},
{
"type": "WEB",
"url": "https://github.com/sebastianbergmann/phpunit/pull/1955"
},
{
"type": "WEB",
"url": "https://github.com/sebastianbergmann/phpunit/pull/1956"
},
{
"type": "WEB",
"url": "https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5"
},
{
"type": "WEB",
"url": "https://github.com/sebastianbergmann/phpunit/commit/3aaddb1c5bd9b9b8d070b4cf120e71c36fd08412"
},
{
"type": "WEB",
"url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2017-9841.yaml"
},
{
"type": "PACKAGE",
"url": "https://github.com/sebastianbergmann/phpunit"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/201711-15"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841"
},
{
"type": "WEB",
"url": "https://www.oracle.com/security-alerts/cpuoct2021.html"
},
{
"type": "WEB",
"url": "http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/101798"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1039812"
}
],
"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/E:H",
"type": "CVSS_V3"
}
],
"summary": "Code Injection in PHPUnit"
}
GHSA-R7CG-QFV5-PQ48
Vulnerability from github – Published: 2025-08-27 12:30 – Updated: 2025-08-27 12:30The "system" function receives untrusted input from the user. If the "EnableJSCaching" option is enabled, it is possible to execute arbitrary code provided as the "Module" parameter.
{
"affected": [],
"aliases": [
"CVE-2025-30055"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-27T11:15:36Z",
"severity": "CRITICAL"
},
"details": "The \"system\" function receives untrusted input from the user. If the \"EnableJSCaching\" option is enabled, it is possible to execute arbitrary code provided as the \"Module\" parameter.",
"id": "GHSA-r7cg-qfv5-pq48",
"modified": "2025-08-27T12:30:26Z",
"published": "2025-08-27T12:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-30055"
},
{
"type": "WEB",
"url": "https://cert.pl/en/posts/2025/08/CVE-2025-2313"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:A/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/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-R7CX-CQWC-HF28
Vulnerability from github – Published: 2022-05-14 02:50 – Updated: 2022-05-14 02:50lib/execute/execSetResults.php in TestLink before 1.9.13 allows remote attackers to conduct PHP object injection attacks and execute arbitrary PHP code via the filter_result_result parameter.
{
"affected": [],
"aliases": [
"CVE-2014-8081"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-10-31T14:55:00Z",
"severity": "HIGH"
},
"details": "lib/execute/execSetResults.php in TestLink before 1.9.13 allows remote attackers to conduct PHP object injection attacks and execute arbitrary PHP code via the filter_result_result parameter.",
"id": "GHSA-r7cx-cqwc-hf28",
"modified": "2022-05-14T02:50:58Z",
"published": "2022-05-14T02:50:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2014-8081"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/97727"
},
{
"type": "WEB",
"url": "https://gitorious.org/testlink-ga/testlink-code/commit/a519da3a45d80077e4eab957eb793b03652f57dc"
},
{
"type": "WEB",
"url": "http://karmainsecurity.com/KIS-2014-11"
},
{
"type": "WEB",
"url": "http://mantis.testlink.org/view.php?id=6651"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2014/Oct/105"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/533798/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/70711"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-R7J6-4934-573P
Vulnerability from github – Published: 2022-05-01 23:49 – Updated: 2025-04-09 03:54Unspecified vulnerability in the air_filemanager 0.6.0 and earlier extension for TYPO3 allows remote attackers to execute arbitrary PHP code via unspecified vectors related to "insufficient file filtering."
{
"affected": [],
"aliases": [
"CVE-2008-2345"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-05-19T13:20:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in the air_filemanager 0.6.0 and earlier extension for TYPO3 allows remote attackers to execute arbitrary PHP code via unspecified vectors related to \"insufficient file filtering.\"",
"id": "GHSA-r7j6-4934-573p",
"modified": "2025-04-09T03:54:43Z",
"published": "2022-05-01T23:49:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2345"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42449"
},
{
"type": "WEB",
"url": "http://typo3.org/teams/security/security-bulletins/typo3-20080515-2"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-R7P6-9FPM-WPW7
Vulnerability from github – Published: 2022-05-17 04:21 – Updated: 2022-05-17 04:21The Ubercart module 6.x-2.x before 6.x-2.8 for Drupal allows remote authenticated users with the "administer product classes" permission to execute arbitrary PHP code via unspecified vectors.
{
"affected": [],
"aliases": [
"CVE-2012-2301"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-11-16T02:59:00Z",
"severity": "MODERATE"
},
"details": "The Ubercart module 6.x-2.x before 6.x-2.8 for Drupal allows remote authenticated users with the \"administer product classes\" permission to execute arbitrary PHP code via unspecified vectors.",
"id": "GHSA-r7p6-9fpm-wpw7",
"modified": "2022-05-17T04:21:12Z",
"published": "2022-05-17T04:21:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-2301"
},
{
"type": "WEB",
"url": "http://drupal.org/node/1547506"
},
{
"type": "WEB",
"url": "http://drupal.org/node/1547508"
},
{
"type": "WEB",
"url": "http://drupal.org/node/1547674"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/48935"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2012/05/03/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2012/05/03/2"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/53251"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-R7Q2-QF8R-5H57
Vulnerability from github – Published: 2022-05-13 01:24 – Updated: 2025-04-11 03:36WebKit in Apple Safari before 5.0 on Mac OS X 10.5 through 10.6 and Windows, Apple Safari before 4.1 on Mac OS X 10.4, and Google Chrome before 5.0.375.70 does not properly handle a transformation of a text node that has the IBM1147 character set, which allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption and application crash) via a crafted HTML document containing a BR element, related to a "type checking issue."
{
"affected": [],
"aliases": [
"CVE-2010-1770"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-06-11T19:30:00Z",
"severity": "HIGH"
},
"details": "WebKit in Apple Safari before 5.0 on Mac OS X 10.5 through 10.6 and Windows, Apple Safari before 4.1 on Mac OS X 10.4, and Google Chrome before 5.0.375.70 does not properly handle a transformation of a text node that has the IBM1147 character set, which allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption and application crash) via a crafted HTML document containing a BR element, related to a \"type checking issue.\"",
"id": "GHSA-r7q2-qf8r-5h57",
"modified": "2025-04-11T03:36:04Z",
"published": "2022-05-13T01:24:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-1770"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A7099"
},
{
"type": "WEB",
"url": "http://code.google.com/p/chromium/issues/detail?id=43487"
},
{
"type": "WEB",
"url": "http://googlechromereleases.blogspot.com/2010/06/stable-channel-update.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2010//Jun/msg00002.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2010//Nov/msg00003.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2010//Sep/msg00002.html"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2010/Jun/msg00000.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2011-01/msg00006.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/40072"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/40105"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/40196"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/41856"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/42314"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/43068"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1024067"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT4196"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT4220"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT4334"
},
{
"type": "WEB",
"url": "http://support.apple.com/kb/HT4456"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2011:039"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/40620"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-1006-1"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/1373"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/1512"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/2722"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2011/0212"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2011/0552"
},
{
"type": "WEB",
"url": "http://zerodayinitiative.com/advisories/ZDI-10-093"
}
],
"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.