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.
8272 vulnerabilities reference this CWE, most recent first.
GHSA-H3PX-QC6M-9CW5
Vulnerability from github – Published: 2025-07-07 03:30 – Updated: 2025-07-07 03:30A vulnerability was found in BoyunCMS up to 1.4.20. It has been classified as critical. This affects an unknown part of the file /install/install_ok.php of the component Configuration File Handler. The manipulation of the argument db_pass leads to code injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used.
{
"affected": [],
"aliases": [
"CVE-2025-7101"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-07T01:15:23Z",
"severity": "MODERATE"
},
"details": "A vulnerability was found in BoyunCMS up to 1.4.20. It has been classified as critical. This affects an unknown part of the file /install/install_ok.php of the component Configuration File Handler. The manipulation of the argument db_pass leads to code injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used.",
"id": "GHSA-h3px-qc6m-9cw5",
"modified": "2025-07-07T03:30:22Z",
"published": "2025-07-07T03:30:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-7101"
},
{
"type": "WEB",
"url": "https://note-hxlab.wetolink.com/share/6wemW8CnOMbu"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.315015"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.315015"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.604323"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/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-H3Q4-W5V4-67HW
Vulnerability from github – Published: 2026-07-13 12:35 – Updated: 2026-07-13 15:31Versions of Mura CMS prior to 10.0.712 contain a critical remote code execution (RCE) vulnerability. The flaw is located in the endpoint “/index.cfm/_api/json/v1/default”, where the “method” parameter in POST requests is not properly validated or sanitised before being processed by the ColdFusion engine. As a result, a remote attacker could exploit this vulnerability to inject and execute arbitrary CFML (ColdFusion Markup Language) expressions and instantiate malicious Java objects, thereby compromising the system’s security.
{
"affected": [],
"aliases": [
"CVE-2026-12257"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-13T12:16:29Z",
"severity": "MODERATE"
},
"details": "Versions of Mura CMS prior to 10.0.712 contain a critical remote code execution (RCE) vulnerability. The flaw is located in the endpoint \u201c/index.cfm/_api/json/v1/default\u201d, where the \u201cmethod\u201d parameter in POST requests is not properly validated or sanitised before being processed by the ColdFusion engine. As a result, a remote attacker could exploit this vulnerability to inject and execute arbitrary CFML (ColdFusion Markup Language) expressions and instantiate malicious Java objects, thereby compromising the system\u2019s security.",
"id": "GHSA-h3q4-w5v4-67hw",
"modified": "2026-07-13T15:31:48Z",
"published": "2026-07-13T12:35:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-12257"
},
{
"type": "WEB",
"url": "https://www.incibe.es/en/incibe-cert/notices/aviso/remote-code-execution-mura-softwares-cms"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/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-H3VW-J3R5-FJQQ
Vulnerability from github – Published: 2022-05-05 00:29 – Updated: 2024-04-03 23:58A Code Execution Vulnerability exists in OpenX Ad Server 2.8.10 due to a backdoor in flowplayer-3.1.1.min.js library, which could let a remote malicious user execute arbitrary PHP code
{
"affected": [],
"aliases": [
"CVE-2013-4211"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-02-14T20:15:00Z",
"severity": "CRITICAL"
},
"details": "A Code Execution Vulnerability exists in OpenX Ad Server 2.8.10 due to a backdoor in flowplayer-3.1.1.min.js library, which could let a remote malicious user execute arbitrary PHP code",
"id": "GHSA-h3vw-j3r5-fjqq",
"modified": "2024-04-03T23:58:10Z",
"published": "2022-05-05T00:29:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-4211"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/86259"
},
{
"type": "WEB",
"url": "https://packetstormsecurity.com/files/cve/CVE-2013-4211"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/27529"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2013/08/07/2"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/61650"
}
],
"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-H3XG-2P49-9CFP
Vulnerability from github – Published: 2022-05-17 01:40 – Updated: 2025-04-11 04:03The proc_deutf function in includes/functions_vbseocp_abstract.php in vBSEO 3.5.0, 3.5.1, 3.5.2, 3.6.0, and earlier allows remote attackers to insert and execute arbitrary PHP code via "complex curly syntax" in the char_repl parameter, which is inserted into a regular expression that is processed by the preg_replace function with the eval switch.
{
"affected": [],
"aliases": [
"CVE-2012-5223"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-10-01T20:55:00Z",
"severity": "HIGH"
},
"details": "The proc_deutf function in includes/functions_vbseocp_abstract.php in vBSEO 3.5.0, 3.5.1, 3.5.2, 3.6.0, and earlier allows remote attackers to insert and execute arbitrary PHP code via \"complex curly syntax\" in the char_repl parameter, which is inserted into a regular expression that is processed by the preg_replace function with the eval switch.",
"id": "GHSA-h3xg-2p49-9cfp",
"modified": "2025-04-11T04:03:16Z",
"published": "2022-05-17T01:40:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-5223"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/72689"
},
{
"type": "WEB",
"url": "http://osvdb.org/78508"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/47699"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/18424"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/51647"
},
{
"type": "WEB",
"url": "http://www.vbseo.com/f5/vbseo-security-bulletin-all-supported-versions-patch-release-52783"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H43Q-JW66-5CFX
Vulnerability from github – Published: 2022-05-17 00:37 – Updated: 2022-05-17 00:37wap/index.php in Crossday Discuz! Board 6.x and 7.x allows remote authenticated users to execute arbitrary PHP code via the creditsformula parameter.
{
"affected": [],
"aliases": [
"CVE-2008-6958"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-08-12T10:30:00Z",
"severity": "MODERATE"
},
"details": "wap/index.php in Crossday Discuz! Board 6.x and 7.x allows remote authenticated users to execute arbitrary PHP code via the creditsformula parameter.",
"id": "GHSA-h43q-jw66-5cfx",
"modified": "2022-05-17T00:37:14Z",
"published": "2022-05-17T00:37:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6958"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/46644"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/7119"
},
{
"type": "WEB",
"url": "http://osvdb.org/50202"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/32731"
},
{
"type": "WEB",
"url": "http://www.80vul.com/dzvul/sodb/13/dz-exp-sodb-2008-13_php.htm"
},
{
"type": "WEB",
"url": "http://www.discuz.net/archiver/?tid-1112426.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32303"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H457-7GVF-JX74
Vulnerability from github – Published: 2022-04-29 01:28 – Updated: 2022-04-29 01:28Epic Games Unreal Engine 226f through 436 allows remote attackers to cause a denial of service (CPU consumption or crash) and possibly execute arbitrary code via (1) a packet with a negative size value, which is treated as a large positive number during memory allocation, or (2) a negative size value in a package file.
{
"affected": [],
"aliases": [
"CVE-2003-1432"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2003-12-31T05:00:00Z",
"severity": "HIGH"
},
"details": "Epic Games Unreal Engine 226f through 436 allows remote attackers to cause a denial of service (CPU consumption or crash) and possibly execute arbitrary code via (1) a packet with a negative size value, which is treated as a large positive number during memory allocation, or (2) a negative size value in a package file.",
"id": "GHSA-h457-7gvf-jx74",
"modified": "2022-04-29T01:28:04Z",
"published": "2022-04-29T01:28:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2003-1432"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/11302"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/11305"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/12012"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/bugtraq/2003-02/0063.html"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/bugtraq/2003-02/0142.html"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/bugtraq/2003-05/0142.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/6770"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/6772"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H475-82MV-H7Q7
Vulnerability from github – Published: 2022-05-01 23:54 – Updated: 2022-05-01 23:54PHP remote file inclusion vulnerability in admin/include/lib.module.php in cmsWorks 2.2 RC4, when register_globals is enabled, allows remote attackers to execute arbitrary PHP code via a URL in the mod_root parameter.
{
"affected": [],
"aliases": [
"CVE-2008-2877"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-06-26T17:41:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in admin/include/lib.module.php in cmsWorks 2.2 RC4, when register_globals is enabled, allows remote attackers to execute arbitrary PHP code via a URL in the mod_root parameter.",
"id": "GHSA-h475-82mv-h7q7",
"modified": "2022-05-01T23:54:21Z",
"published": "2022-05-01T23:54:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2877"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43310"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5921"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/29911"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-H478-HRVJ-HRJQ
Vulnerability from github – Published: 2024-09-16 14:37 – Updated: 2024-09-16 14:37A vulnerability classified as critical has been found in playSMS 1.4.4/1.4.5/1.4.6/1.4.7. Affected is an unknown function of the file /playsms/index.php?app=main&inc=core_auth&route=forgot&op=forgot of the component Template Handler. The manipulation of the argument username/email/captcha leads to code injection. It is possible to launch the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult. The exploit has been disclosed to the public and may be used. It is recommended to upgrade the affected component. The project maintainer was informed early about the issue. Investigation shows that playSMS up to 1.4.3 contained a fix but later versions re-introduced the flaw. As long as the latest version of the playsms/tpl package is used, the software is not affected. Version >=1.4.4 shall fix this issue for sure.
{
"affected": [],
"aliases": [
"CVE-2024-8880"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-16T01:15:10Z",
"severity": "MODERATE"
},
"details": "A vulnerability classified as critical has been found in playSMS 1.4.4/1.4.5/1.4.6/1.4.7. Affected is an unknown function of the file /playsms/index.php?app=main\u0026inc=core_auth\u0026route=forgot\u0026op=forgot of the component Template Handler. The manipulation of the argument username/email/captcha leads to code injection. It is possible to launch the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult. The exploit has been disclosed to the public and may be used. It is recommended to upgrade the affected component. The project maintainer was informed early about the issue. Investigation shows that playSMS up to 1.4.3 contained a fix but later versions re-introduced the flaw. As long as the latest version of the playsms/tpl package is used, the software is not affected. Version \u003e=1.4.4 shall fix this issue for sure.",
"id": "GHSA-h478-hrvj-hrjq",
"modified": "2024-09-16T14:37:28Z",
"published": "2024-09-16T14:37:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-8880"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.277524"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.277524"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.406095"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/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-H47H-5HQH-63XW
Vulnerability from github – Published: 2024-04-26 06:30 – Updated: 2024-08-08 18:31Setor Informatica Sistema Inteligente para Laboratorios (S.I.L.) 388 was discovered to contain a remote code execution (RCE) vulnerability via the hprinter parameter. This vulnerability is triggered via a crafted POST request.
{
"affected": [],
"aliases": [
"CVE-2024-22633"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-26T04:15:08Z",
"severity": "CRITICAL"
},
"details": "Setor Informatica Sistema Inteligente para Laboratorios (S.I.L.) 388 was discovered to contain a remote code execution (RCE) vulnerability via the hprinter parameter. This vulnerability is triggered via a crafted POST request.",
"id": "GHSA-h47h-5hqh-63xw",
"modified": "2024-08-08T18:31:19Z",
"published": "2024-04-26T06:30:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22633"
},
{
"type": "WEB",
"url": "https://tomiodarim.io/posts/cve-2024-22632-3"
}
],
"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-H47J-HC6X-H3QQ
Vulnerability from github – Published: 2019-12-30 19:30 – Updated: 2025-10-22 17:44Impact
Remote code execution on the host machine by any authenticated user.
Proof Of Concept
Launching mongo-express on a Mac, pasting the following into the "create index" field will pop open the Mac calculator:
this.constructor.constructor("return process")().mainModule.require('child_process').execSync('/Applications/Calculator.app/Contents/MacOS/Calculator')
Patches
Users should upgrade to version 0.54.0
Workarounds
Is there a way for users to fix or remediate the vulnerability without upgrading?
For more information
If you have any questions or comments about this advisory: * Open an issue in example link to repo * Email us at example email address
Thanks
@JLLeitschuh for finding and reporting this vulnerability
This vulnerability has been exploited in the wild.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "mongo-express"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.54.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2019-10758"
],
"database_specific": {
"cwe_ids": [
"CWE-78",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2019-12-30T19:29:02Z",
"nvd_published_at": "2019-12-24T22:15:11Z",
"severity": "CRITICAL"
},
"details": "### Impact\n\nRemote code execution on the host machine by any authenticated user.\n\n### Proof Of Concept\n\nLaunching mongo-express on a Mac, pasting the following into the \"create index\" field will pop open the Mac calculator:\n\n```javascript\nthis.constructor.constructor(\"return process\")().mainModule.require(\u0027child_process\u0027).execSync(\u0027/Applications/Calculator.app/Contents/MacOS/Calculator\u0027)\n```\n\n### Patches\nUsers should upgrade to version `0.54.0`\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)\n\n#### Thanks\n\n@JLLeitschuh for finding and reporting this vulnerability\n\nThis vulnerability has been [exploited](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758) in the wild.",
"id": "GHSA-h47j-hc6x-h3qq",
"modified": "2025-10-22T17:44:59Z",
"published": "2019-12-30T19:30:31Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mongo-express/mongo-express/security/advisories/GHSA-h47j-hc6x-h3qq"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-10758"
},
{
"type": "WEB",
"url": "https://github.com/mongo-express/mongo-express/pull/522"
},
{
"type": "WEB",
"url": "https://github.com/mongo-express/mongo-express/commit/7d365141deadbd38fa961cd835ce68eab5731494"
},
{
"type": "WEB",
"url": "https://github.com/mongo-express/mongo-express/commit/d8c9bda46a204ecba1d35558452685cd0674e6f2"
},
{
"type": "PACKAGE",
"url": "https://github.com/mongo-express/mongo-express"
},
{
"type": "WEB",
"url": "https://github.com/mongo-express/mongo-express/blob/ea02b364d43f179f191fc91fb9962efdb0843a8d/lib/bson.js#L60"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-MONGOEXPRESS-473215"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2019-10758"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H/E:H",
"type": "CVSS_V3"
}
],
"summary": "Remote Code Execution Vulnerability in NPM mongo-express"
}
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.