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.
8378 vulnerabilities reference this CWE, most recent first.
GHSA-73GX-X7R9-77X2
Vulnerability from github – Published: 2025-02-26 20:07 – Updated: 2025-10-16 20:41Summary
This advisory addresses two critical security vulnerabilities present in Mautic versions before 5.2.3. These vulnerabilities could be exploited by authenticated users.
-
Remote Code Execution (RCE) via Asset Upload: A Remote Code Execution vulnerability has been identified in the asset upload functionality. Insufficient enforcement of allowed file extensions allows an attacker to bypass restrictions and upload executable files, such as PHP scripts.
-
Path Traversal File Deletion: A Path Traversal vulnerability exists in the upload validation process. Due to improper handling of path components, an authenticated user can manipulate the file deletion process to delete arbitrary files on the host system.
Mitigation
Please update to 5.2.3 or later.
Workarounds
None
References
https://owasp.org/www-community/attacks/Code_Injection https://owasp.org/www-community/attacks/Path_Traversal
If you have any questions or comments about this advisory:
Email us at security@mautic.org
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "mautic/core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.2.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-47051"
],
"database_specific": {
"cwe_ids": [
"CWE-23",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-02-26T20:07:45Z",
"nvd_published_at": "2025-02-26T13:15:39Z",
"severity": "CRITICAL"
},
"details": "### Summary\nThis advisory addresses two critical security vulnerabilities present in Mautic versions before 5.2.3. These vulnerabilities could be exploited by authenticated users.\n\n* **Remote Code Execution (RCE) via Asset Upload:** A Remote Code Execution vulnerability has been identified in the asset upload functionality. Insufficient enforcement of allowed file extensions allows an attacker to bypass restrictions and upload executable files, such as PHP scripts.\n\n* **Path Traversal File Deletion:** A Path Traversal vulnerability exists in the upload validation process. Due to improper handling of path components, an authenticated user can manipulate the file deletion process to delete arbitrary files on the host system. \n \n### Mitigation\nPlease update to 5.2.3 or later.\n\n### Workarounds\nNone\n\n### References\nhttps://owasp.org/www-community/attacks/Code_Injection\nhttps://owasp.org/www-community/attacks/Path_Traversal\n\nIf you have any questions or comments about this advisory:\n\nEmail us at [security@mautic.org](mailto:security@mautic.org)",
"id": "GHSA-73gx-x7r9-77x2",
"modified": "2025-10-16T20:41:27Z",
"published": "2025-02-26T20:07:45Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mautic/mautic/security/advisories/GHSA-73gx-x7r9-77x2"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-47051"
},
{
"type": "WEB",
"url": "https://github.com/mautic/mautic/commit/75bc488ce98b9c8ec01114984049fc1c42c0cae5"
},
{
"type": "PACKAGE",
"url": "https://github.com/mautic/mautic"
},
{
"type": "WEB",
"url": "https://owasp.org/www-community/attacks/Code_Injection"
},
{
"type": "WEB",
"url": "https://owasp.org/www-community/attacks/Path_Traversal"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "Mautic allows Remote Code Execution and File Deletion in Asset Uploads"
}
GHSA-73HP-3M9V-H54H
Vulnerability from github – Published: 2025-04-24 03:31 – Updated: 2025-10-22 00:33Brocade Fabric OS versions starting with 9.1.0 have root access removed, however, a local user with admin privilege can potentially execute arbitrary code with full root privileges on Fabric OS versions 9.1.0 through 9.1.1d6.
{
"affected": [],
"aliases": [
"CVE-2025-1976"
],
"database_specific": {
"cwe_ids": [
"CWE-78",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-04-24T03:15:14Z",
"severity": "HIGH"
},
"details": "Brocade Fabric OS versions starting with 9.1.0 have root access removed, however, a local user with admin privilege can potentially execute arbitrary code with full root privileges on Fabric OS versions 9.1.0 through 9.1.1d6.",
"id": "GHSA-73hp-3m9v-h54h",
"modified": "2025-10-22T00:33:17Z",
"published": "2025-04-24T03:31:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-1976"
},
{
"type": "WEB",
"url": "https://support.broadcom.com/web/ecx/support-content-notification/-/external/content/SecurityAdvisories/0/25602"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-1976"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:A/AC:L/AT:N/PR:L/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-73M4-W6C9-GPQF
Vulnerability from github – Published: 2022-05-01 06:39 – Updated: 2022-05-01 06:39Unspecified vulnerability in Safari, LaunchServices, and/or CoreTypes in Apple Mac OS X 10.4 up to 10.4.5 allows attackers to trick a user into opening an application that appears to be a safe file type. NOTE: due to the lack of specific information in the vendor advisory, it is not clear how CVE-2006-0397, CVE-2006-0398, and CVE-2006-0399 are different.
{
"affected": [],
"aliases": [
"CVE-2006-0398"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-03-14T11:02:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in Safari, LaunchServices, and/or CoreTypes in Apple Mac OS X 10.4 up to 10.4.5 allows attackers to trick a user into opening an application that appears to be a safe file type. NOTE: due to the lack of specific information in the vendor advisory, it is not clear how CVE-2006-0397, CVE-2006-0398, and CVE-2006-0399 are different.",
"id": "GHSA-73m4-w6c9-gpqf",
"modified": "2022-05-01T06:39:32Z",
"published": "2022-05-01T06:39:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-0398"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/25269"
},
{
"type": "WEB",
"url": "http://docs.info.apple.com/article.html?artnum=303453"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2006/Mar/msg00001.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/19129"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1015760"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/23870"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/0949"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-73P2-RXRX-HCJH
Vulnerability from github – Published: 2022-05-17 05:46 – Updated: 2022-05-17 05:46CRLF injection vulnerability in TransWARE Active! mail 6 build 6.40.010047750 and earlier allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks via unspecified vectors.
{
"affected": [],
"aliases": [
"CVE-2010-3913"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-11-05T17:00:00Z",
"severity": "MODERATE"
},
"details": "CRLF injection vulnerability in TransWARE Active! mail 6 build 6.40.010047750 and earlier allows remote attackers to inject arbitrary HTTP headers and conduct HTTP response splitting attacks via unspecified vectors.",
"id": "GHSA-73p2-rxrx-hcjh",
"modified": "2022-05-17T05:46:52Z",
"published": "2022-05-17T05:46:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-3913"
},
{
"type": "WEB",
"url": "http://jvn.jp/en/jp/JVN72541530/index.html"
},
{
"type": "WEB",
"url": "http://jvndb.jvn.jp/en/contents/2010/JVNDB-2010-000050.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/42039"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/68943"
},
{
"type": "WEB",
"url": "http://www.transware.co.jp/security/am0610001.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-73QH-76HJ-PM8J
Vulnerability from github – Published: 2022-05-02 03:29 – Updated: 2022-05-02 03:29js/src/xpconnect/src/xpcwrappedjsclass.cpp in Mozilla Firefox before 3.0.11, Thunderbird before 2.0.0.22, and SeaMonkey before 1.1.17 allows remote attackers to execute arbitrary web script with the privileges of a chrome object, as demonstrated by the browser sidebar and the FeedWriter.
{
"affected": [],
"aliases": [
"CVE-2009-1841"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-06-12T21:30:00Z",
"severity": "HIGH"
},
"details": "js/src/xpconnect/src/xpcwrappedjsclass.cpp in Mozilla Firefox before 3.0.11, Thunderbird before 2.0.0.22, and SeaMonkey before 1.1.17 allows remote attackers to execute arbitrary web script with the privileges of a chrome object, as demonstrated by the browser sidebar and the FeedWriter.",
"id": "GHSA-73qh-76hj-pm8j",
"modified": "2022-05-02T03:29:07Z",
"published": "2022-05-02T03:29:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-1841"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=479560"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=503583"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A9815"
},
{
"type": "WEB",
"url": "https://rhn.redhat.com/errata/RHSA-2009-1095.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-July/msg00444.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-July/msg00504.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-June/msg00574.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-June/msg00657.html"
},
{
"type": "WEB",
"url": "http://osvdb.org/55159"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2009-1096.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35331"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35415"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35428"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35431"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35439"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35440"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35468"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35536"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35561"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35602"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35882"
},
{
"type": "WEB",
"url": "http://slackware.com/security/viewer.php?l=slackware-security\u0026y=2009\u0026m=slackware-security.372468"
},
{
"type": "WEB",
"url": "http://slackware.com/security/viewer.php?l=slackware-security\u0026y=2009\u0026m=slackware-security.425408"
},
{
"type": "WEB",
"url": "http://sunsolve.sun.com/search/document.do?assetkey=1-66-264308-1"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2009/dsa-1820"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2009/dsa-1830"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2009:141"
},
{
"type": "WEB",
"url": "http://www.mozilla.org/security/announce/2009/mfsa2009-32.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/35326"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/35373"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1022397"
},
{
"type": "WEB",
"url": "http://www.slackware.com/security/viewer.php?l=slackware-security\u0026y=2009\u0026m=slackware-security.454275"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/usn-782-1"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1572"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-7422-RHQ7-3WFJ
Vulnerability from github – Published: 2025-07-25 18:30 – Updated: 2026-02-25 18:31An issue in Gardyn 4 allows a remote attacker to obtain sensitive information and execute arbitrary code via the Gardyn Home component
{
"affected": [],
"aliases": [
"CVE-2025-29629"
],
"database_specific": {
"cwe_ids": [
"CWE-1392",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-25T17:15:31Z",
"severity": "HIGH"
},
"details": "An issue in Gardyn 4 allows a remote attacker to obtain sensitive information and execute arbitrary code via the Gardyn Home component",
"id": "GHSA-7422-rhq7-3wfj",
"modified": "2026-02-25T18:31:27Z",
"published": "2025-07-25T18:30:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-29629"
},
{
"type": "WEB",
"url": "https://github.com/mselbrede/gardyn/blob/main/CVE-2025-29629.md"
},
{
"type": "WEB",
"url": "https://mygardyn.com/blog/security-update"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/news-events/ics-advisories/icsa-26-055-03"
},
{
"type": "WEB",
"url": "http://gardyn.com"
}
],
"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-742C-CQ8P-VCG6
Vulnerability from github – Published: 2022-05-13 01:39 – Updated: 2025-04-11 03:55DBServer.exe in HP Data Protector Media Operations 6.11 and earlier allows remote attackers to execute arbitrary code via a crafted request containing a large value in a length field.
{
"affected": [],
"aliases": [
"CVE-2011-4791"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-02-03T04:05:00Z",
"severity": "HIGH"
},
"details": "DBServer.exe in HP Data Protector Media Operations 6.11 and earlier allows remote attackers to execute arbitrary code via a crafted request containing a large value in a length field.",
"id": "GHSA-742c-cq8p-vcg6",
"modified": "2025-04-11T03:55:10Z",
"published": "2022-05-13T01:39:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-4791"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/521472"
},
{
"type": "WEB",
"url": "http://zerodayinitiative.com/advisories/ZDI-11-112"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-744J-F9R9-W6H7
Vulnerability from github – Published: 2025-03-07 18:31 – Updated: 2025-03-07 18:31An improper neutralization of CRLF sequences ('CRLF Injection') vulnerability has been reported to affect several QNAP operating system versions. If exploited, the vulnerability could allow remote attackers who have gained administrator access to modify application data.
We have already fixed the vulnerability in the following versions: QTS 5.2.3.3006 build 20250108 and later QuTS hero h5.2.3.3006 build 20250108 and later
{
"affected": [],
"aliases": [
"CVE-2024-50405"
],
"database_specific": {
"cwe_ids": [
"CWE-93",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-07T17:15:19Z",
"severity": "MODERATE"
},
"details": "An improper neutralization of CRLF sequences (\u0027CRLF Injection\u0027) vulnerability has been reported to affect several QNAP operating system versions. If exploited, the vulnerability could allow remote attackers who have gained administrator access to modify application data.\n\nWe have already fixed the vulnerability in the following versions:\nQTS 5.2.3.3006 build 20250108 and later\nQuTS hero h5.2.3.3006 build 20250108 and later",
"id": "GHSA-744j-f9r9-w6h7",
"modified": "2025-03-07T18:31:06Z",
"published": "2025-03-07T18:31:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-50405"
},
{
"type": "WEB",
"url": "https://www.qnap.com/en/security-advisory/qsa-24-54"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:N/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-746C-3FPG-6M7J
Vulnerability from github – Published: 2024-03-21 03:36 – Updated: 2024-08-02 21:31An issue in zuoxingdong lagom v.0.1.2 allows a local attacker to execute arbitrary code via the pickle_load function of the serialize.py file.
{
"affected": [],
"aliases": [
"CVE-2024-25359"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-21T02:52:14Z",
"severity": "MODERATE"
},
"details": "An issue in zuoxingdong lagom v.0.1.2 allows a local attacker to execute arbitrary code via the pickle_load function of the serialize.py file.",
"id": "GHSA-746c-3fpg-6m7j",
"modified": "2024-08-02T21:31:33Z",
"published": "2024-03-21T03:36:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-25359"
},
{
"type": "WEB",
"url": "https://github.com/bayuncao/vul-cve-10"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-746C-93MF-PG8F
Vulnerability from github – Published: 2022-05-01 17:44 – Updated: 2022-05-01 17:44PHP remote file inclusion vulnerability in index.php in Mafia Scum Tools 2.0.0 in Matthew Wardrop Advanced Random Generators (adv-random-gen) allows remote attackers to execute arbitrary PHP code via a URL in the gen parameter.
{
"affected": [],
"aliases": [
"CVE-2007-0501"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-01-25T21:28:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in index.php in Mafia Scum Tools 2.0.0 in Matthew Wardrop Advanced Random Generators (adv-random-gen) allows remote attackers to execute arbitrary PHP code via a URL in the gen parameter.",
"id": "GHSA-746c-93mf-pg8f",
"modified": "2022-05-01T17:44:56Z",
"published": "2022-05-01T17:44:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-0501"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/31637"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/3171"
},
{
"type": "WEB",
"url": "http://osvdb.org/36810"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/22151"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/0271"
}
],
"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.