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-J2MC-G8CR-M8PQ
Vulnerability from github – Published: 2022-11-29 21:30 – Updated: 2026-04-08 21:31The Ultimate Member plugin for WordPress is vulnerable to Remote Code Execution in versions up to, and including, 2.5.0 via the get_option_value_from_callback function that accepts user supplied input and passes it through call_user_func(). This makes it possible for authenticated attackers, with administrative capabilities, to execute code on the server.
{
"affected": [],
"aliases": [
"CVE-2022-3383"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-11-29T21:15:00Z",
"severity": "HIGH"
},
"details": "The Ultimate Member plugin for WordPress is vulnerable to Remote Code Execution in versions up to, and including, 2.5.0 via the get_option_value_from_callback function that accepts user supplied input and passes it through call_user_func(). This makes it possible for authenticated attackers, with administrative capabilities, to execute code on the server.",
"id": "GHSA-j2mc-g8cr-m8pq",
"modified": "2026-04-08T21:31:45Z",
"published": "2022-11-29T21:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-3383"
},
{
"type": "WEB",
"url": "https://github.com/H4de5-7/vulnerabilities/blob/main/CVE-2022-3383%20%26%26%20CVE-2022-3384.md"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=\u0026sfph_mail=\u0026reponame=\u0026old=2805393%40ultimate-member\u0026new=2805393%40ultimate-member\u0026sfp_email=\u0026sfph_mail="
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/ed28fe16-0835-4e94-a30e-305e7ba03740?source=cve"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/vulnerability-advisories-continued/#CVE-2022-3383"
},
{
"type": "WEB",
"url": "https://www.yuque.com/docs/share/8796eef9-ac4c-4339-96b4-6c21313ecf3e"
}
],
"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-J2PQ-22JJ-4PM5
Vulnerability from github – Published: 2024-12-12 19:23 – Updated: 2024-12-12 19:23Impact
On instances where Extension Repository Application is installed, any user can execute any code requiring programming rights on the server.
In order to reproduce on an instance, as a normal user without script nor programming rights, go to your profile and add an object of type ExtensionCode.ExtensionClass. Set the description to {{async}}{{groovy}}println("Hello from Description"){{/groovy}}{{/async}} and press Save and View. If the description displays as Hello from Description without any error, then the instance is vulnerable.
Patches
This vulnerability has been fixed in XWiki 15.10.9 and 16.3.0.
Workarounds
Since Extension Repository Application is not mandatory, it can be safely disabled on instances that do not use it.
It is also possible to manually apply this patch to the page ExtensionCode.ExtensionSheet, as well as this patch to the page ExtensionCode.ExtensionAuthorsDisplayer.
References
- https://jira.xwiki.org/browse/XWIKI-21890
- https://github.com/xwiki/xwiki-platform/commit/8659f17d500522bf33595e402391592a35a162e8
For more information
If you have any questions or comments about this advisory: * Open an issue in Jira XWiki.org * Email us at Security Mailing List
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.xwiki.platform:xwiki-platform-repository-server-ui"
},
"ranges": [
{
"events": [
{
"introduced": "3.3-milestone-1"
},
{
"fixed": "15.10.9"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.xwiki.platform:xwiki-platform-repository-server-ui"
},
"ranges": [
{
"events": [
{
"introduced": "16.0.0-rc-1"
},
{
"fixed": "16.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-55662"
],
"database_specific": {
"cwe_ids": [
"CWE-863",
"CWE-94",
"CWE-96"
],
"github_reviewed": true,
"github_reviewed_at": "2024-12-12T19:23:04Z",
"nvd_published_at": "2024-12-12T18:15:27Z",
"severity": "CRITICAL"
},
"details": "### Impact\nOn instances where `Extension Repository Application` is installed, any user can execute any code requiring `programming` rights on the server.\nIn order to reproduce on an instance, as a normal user without `script` nor `programming` rights, go to your profile and add an object of type `ExtensionCode.ExtensionClass`. Set the description to `{{async}}{{groovy}}println(\"Hello from Description\"){{/groovy}}{{/async}}` and press `Save and View`. If the description displays as `Hello from Description` without any error, then the instance is vulnerable.\n\n### Patches\nThis vulnerability has been fixed in XWiki 15.10.9 and 16.3.0.\n\n### Workarounds\nSince `Extension Repository Application` is not mandatory, it can be safely disabled on instances that do not use it.\nIt is also possible to manually apply [this patch](https://github.com/xwiki/xwiki-platform/commit/8659f17d500522bf33595e402391592a35a162e8#diff-9b6f9e853f23d76611967737f8c4072ffceaba4c006ca5a5e65b66d988dc084a) to the page `ExtensionCode.ExtensionSheet`, as well as [this patch](https://github.com/xwiki/xwiki-platform/commit/8659f17d500522bf33595e402391592a35a162e8#diff-d571404d94fa27360cfee64f2a11d8c819b397529db275e005606b7356610f82) to the page `ExtensionCode.ExtensionAuthorsDisplayer`.\n\n### References\n* https://jira.xwiki.org/browse/XWIKI-21890\n* https://github.com/xwiki/xwiki-platform/commit/8659f17d500522bf33595e402391592a35a162e8\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n* Email us at [Security Mailing List](mailto:security@xwiki.org)",
"id": "GHSA-j2pq-22jj-4pm5",
"modified": "2024-12-12T19:23:04Z",
"published": "2024-12-12T19:23:04Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-j2pq-22jj-4pm5"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-55662"
},
{
"type": "WEB",
"url": "https://github.com/xwiki/xwiki-platform/commit/8659f17d500522bf33595e402391592a35a162e8"
},
{
"type": "PACKAGE",
"url": "https://github.com/xwiki/xwiki-platform"
},
{
"type": "WEB",
"url": "https://jira.xwiki.org/browse/XWIKI-21890"
}
],
"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",
"type": "CVSS_V3"
}
],
"summary": "XWiki allows remote code execution through the extension sheet"
}
GHSA-J2V2-3784-VR44
Vulnerability from github – Published: 2024-12-18 21:30 – Updated: 2025-01-23 23:32Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-xrh7-2gfq-4rcq. This link is maintained to preserve external references.
Original Description
OpenCart 4.0.2.3 is vulnerable to Server-Side Template Injection (SSTI) via the Theme Editor Function.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "opencart/opencart"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "4.0.2.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-12-18T22:02:19Z",
"nvd_published_at": "2024-12-18T20:15:22Z",
"severity": "HIGH"
},
"details": "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-xrh7-2gfq-4rcq. This link is maintained to preserve external references.\n\n## Original Description\nOpenCart 4.0.2.3 is vulnerable to Server-Side Template Injection (SSTI) via the Theme Editor Function.",
"id": "GHSA-j2v2-3784-vr44",
"modified": "2025-01-23T23:32:20Z",
"published": "2024-12-18T21:30:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-36694"
},
{
"type": "WEB",
"url": "https://github.com/opencart/opencart/issues/13863"
},
{
"type": "WEB",
"url": "https://github.com/A3h1nt/CVEs/blob/main/OpenCart/Readme.md"
},
{
"type": "WEB",
"url": "https://github.com/PawaritSanguanpang/CVEs/blob/main/OpenCart/CVE-2024-36694/README.md"
},
{
"type": "WEB",
"url": "https://github.com/opencart/opencart/releases/tag/4.0.2.3"
},
{
"type": "WEB",
"url": "https://medium.com/@pawarit.sanguanpang/opencart-v4-0-2-3-server-side-template-injection-0b173a3bdcf9"
}
],
"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"
}
],
"summary": "Duplicate Advisory: openCart Server-Side Template Injection (SSTI) vulnerability",
"withdrawn": "2024-12-18T22:02:19Z"
}
GHSA-J2W3-2QHR-G4F8
Vulnerability from github – Published: 2022-05-01 18:36 – Updated: 2022-05-01 18:36PHP remote file inclusion vulnerability in pub/pub08_comments.php in teatro 1.6 allows remote attackers to execute arbitrary PHP code via a URL in the basePath parameter.
{
"affected": [],
"aliases": [
"CVE-2007-5780"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-11-01T16:46:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in pub/pub08_comments.php in teatro 1.6 allows remote attackers to execute arbitrary PHP code via a URL in the basePath parameter.",
"id": "GHSA-j2w3-2qhr-g4f8",
"modified": "2022-05-01T18:36:38Z",
"published": "2022-05-01T18:36:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5780"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38118"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4582"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/482910/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/26231"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/3637"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-J32P-MG32-5MFH
Vulnerability from github – Published: 2023-10-30 06:30 – Updated: 2023-11-06 15:30Inkdrop prior to v5.6.0 allows a local attacker to conduct a code injection attack by having a legitimate user open a specially crafted markdown file.
{
"affected": [],
"aliases": [
"CVE-2023-44141"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-10-30T04:15:10Z",
"severity": "HIGH"
},
"details": "Inkdrop prior to v5.6.0 allows a local attacker to conduct a code injection attack by having a legitimate user open a specially crafted markdown file.",
"id": "GHSA-j32p-mg32-5mfh",
"modified": "2023-11-06T15:30:31Z",
"published": "2023-10-30T06:30:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-44141"
},
{
"type": "WEB",
"url": "https://forum.inkdrop.app/t/inkdrop-desktop-v5-6-0/4211"
},
{
"type": "WEB",
"url": "https://jvn.jp/en/jp/JVN48057522"
},
{
"type": "WEB",
"url": "https://www.inkdrop.app"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-J32X-J8PJ-PG2H
Vulnerability from github – Published: 2021-04-13 15:20 – Updated: 2021-03-22 22:36This affects all versions of package decal. The vulnerability is in the extend function.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "decal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "2.1.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-28450"
],
"database_specific": {
"cwe_ids": [
"CWE-1321",
"CWE-400",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2021-03-22T22:36:42Z",
"nvd_published_at": "2021-02-04T15:15:00Z",
"severity": "HIGH"
},
"details": "This affects all versions of package decal. The vulnerability is in the extend function.",
"id": "GHSA-j32x-j8pj-pg2h",
"modified": "2021-03-22T22:36:42Z",
"published": "2021-04-13T15:20:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-28450"
},
{
"type": "WEB",
"url": "https://github.com/gigafied/decal.js/blob/master/src/utils/extend.js#L23-L56"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-DECAL-1051028"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/package/decal"
}
],
"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:H",
"type": "CVSS_V3"
}
],
"summary": "Prototype Pollution in decal"
}
GHSA-J37H-PXR7-R959
Vulnerability from github – Published: 2022-05-24 17:10 – Updated: 2024-04-04 02:49SAP Business Objects Business Intelligence Platform (Crystal Reports), versions- 4.1, 4.2, allows an attacker with basic authorization to inject code that can be executed by the application and thus allowing the attacker to control the behaviour of the application, leading to Remote Code Execution. Although the mode of attack is only Local, multiple applications can be impacted as a result of the vulnerability.
{
"affected": [],
"aliases": [
"CVE-2020-6208"
],
"database_specific": {
"cwe_ids": [
"CWE-416",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-03-10T21:15:00Z",
"severity": "HIGH"
},
"details": "SAP Business Objects Business Intelligence Platform (Crystal Reports), versions- 4.1, 4.2, allows an attacker with basic authorization to inject code that can be executed by the application and thus allowing the attacker to control the behaviour of the application, leading to Remote Code Execution. Although the mode of attack is only Local, multiple applications can be impacted as a result of the vulnerability.",
"id": "GHSA-j37h-pxr7-r959",
"modified": "2024-04-04T02:49:07Z",
"published": "2022-05-24T17:10:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-6208"
},
{
"type": "WEB",
"url": "https://launchpad.support.sap.com/#/notes/2861301"
},
{
"type": "WEB",
"url": "https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=540935305"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-20-291"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-J3C9-H64H-GWP9
Vulnerability from github – Published: 2024-02-22 12:30 – Updated: 2025-05-06 18:30B&R Automation Studio Upgrade Service and B&R Technology Guarding use insufficient cryptography for communication to the upgrade and the licensing servers. A network-based attacker could exploit the vulnerability to execute arbitrary code on the products or sniff sensitive data.
Missing Encryption of Sensitive Data, Cleartext Transmission of Sensitive Information, Improper Control of Generation of Code ('Code Injection'), Inadequate Encryption Strength vulnerability in B&R Industrial Automation B&R Automation Studio (Upgrade Service modules), B&R Industrial Automation Technology Guarding.This issue affects B&R Automation Studio: <4.6; Technology Guarding: <1.4.0.
{
"affected": [],
"aliases": [
"CVE-2024-0220"
],
"database_specific": {
"cwe_ids": [
"CWE-1240",
"CWE-311",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-22T11:15:08Z",
"severity": "HIGH"
},
"details": "B\u0026R Automation Studio Upgrade Service and B\u0026R Technology Guarding use insufficient cryptography for communication to the upgrade and the licensing servers. A network-based attacker could exploit the vulnerability to execute arbitrary code on the products or sniff sensitive data.\n\n\n\nMissing Encryption of Sensitive Data, Cleartext Transmission of Sensitive Information, Improper Control of Generation of Code (\u0027Code Injection\u0027), Inadequate Encryption Strength vulnerability in B\u0026R Industrial Automation B\u0026R Automation Studio (Upgrade Service modules), B\u0026R Industrial Automation Technology Guarding.This issue affects B\u0026R Automation Studio: \u003c4.6; Technology Guarding: \u003c1.4.0.",
"id": "GHSA-j3c9-h64h-gwp9",
"modified": "2025-05-06T18:30:30Z",
"published": "2024-02-22T12:30:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-0220"
},
{
"type": "WEB",
"url": "https://www.br-automation.com/fileadmin/SA23P019_Automation_Studio_Upgrade_Service_uses_insufficient_encryption.pdf-1b3b181c.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-J3J9-PV34-WJ72
Vulnerability from github – Published: 2022-05-01 17:49 – Updated: 2022-05-01 17:49PHP remote file inclusion vulnerability in index.php in Jupiter CMS 1.1.5, when PHP 5.0.0 or later is used, allows remote attackers to execute arbitrary PHP code via an ftp URL in the n parameter.
{
"affected": [],
"aliases": [
"CVE-2007-0986"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-02-16T11:28:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in index.php in Jupiter CMS 1.1.5, when PHP 5.0.0 or later is used, allows remote attackers to execute arbitrary PHP code via an ftp URL in the n parameter.",
"id": "GHSA-j3j9-pv34-wj72",
"modified": "2022-05-01T17:49:12Z",
"published": "2022-05-01T17:49:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-0986"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/32519"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/3309"
},
{
"type": "WEB",
"url": "http://mgsdl.free.fr/advisories/12070214.txt"
},
{
"type": "WEB",
"url": "http://osvdb.org/33730"
},
{
"type": "WEB",
"url": "http://www.acid-root.new.fr/advisories/12070214.txt"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/460076/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/460100/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/22560"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-J3RG-72X7-GM5R
Vulnerability from github – Published: 2024-01-30 18:30 – Updated: 2025-05-29 15:31HCL BigFix ServiceNow is vulnerable to arbitrary code injection. A malicious authorized attacker could inject arbitrary code and execute within the context of the running user.
{
"affected": [],
"aliases": [
"CVE-2023-37518"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-01-30T16:15:46Z",
"severity": "MODERATE"
},
"details": "HCL BigFix ServiceNow is vulnerable to arbitrary code injection. A malicious authorized attacker could inject arbitrary code and execute within the context of the running user.",
"id": "GHSA-j3rg-72x7-gm5r",
"modified": "2025-05-29T15:31:04Z",
"published": "2024-01-30T18:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-37518"
},
{
"type": "WEB",
"url": "https://support.hcltechsw.com/csm?id=kb_article\u0026sysparm_article=KB0110202"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
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.