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.
9382 vulnerabilities reference this CWE, most recent first.
GHSA-WG2X-HHW5-Q4HX
Vulnerability from github – Published: 2022-05-17 01:32 – Updated: 2025-04-12 12:34Sharetronix 3.1.1.3, 3.1.1, and earlier allows remote attackers to execute arbitrary PHP code via the (1) activities_text parameter to services/activities/set or (2) comments_text parameter to services/comments/set, which is not properly handled when executing the preg_replace function with the e modifier.
{
"affected": [],
"aliases": [
"CVE-2013-5352"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2014-06-13T14:55:00Z",
"severity": "MODERATE"
},
"details": "Sharetronix 3.1.1.3, 3.1.1, and earlier allows remote attackers to execute arbitrary PHP code via the (1) activities_text parameter to services/activities/set or (2) comments_text parameter to services/comments/set, which is not properly handled when executing the preg_replace function with the e modifier.",
"id": "GHSA-wg2x-hhw5-q4hx",
"modified": "2025-04-12T12:34:51Z",
"published": "2022-05-17T01:32:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-5352"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/89503"
},
{
"type": "WEB",
"url": "http://osvdb.org/100605"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/53936"
},
{
"type": "WEB",
"url": "http://secunia.com/secunia_research/2013-8"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/100606"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/64102"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WG4C-WPQ8-9VJX
Vulnerability from github – Published: 2022-05-14 01:36 – Updated: 2022-05-14 01:36An issue was discovered in DedeCMS V5.7 SP2. uploads/include/dialog/select_images_post.php allows remote attackers to upload and execute arbitrary PHP code via a double extension and a modified ".php" substring, in conjunction with the image/jpeg content type, as demonstrated by the filename=1.jpg.p*hp value.
{
"affected": [],
"aliases": [
"CVE-2018-20129"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-12-13T08:29:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in DedeCMS V5.7 SP2. uploads/include/dialog/select_images_post.php allows remote attackers to upload and execute arbitrary PHP code via a double extension and a modified \".php\" substring, in conjunction with the image/jpeg content type, as demonstrated by the filename=1.jpg.p*hp value.",
"id": "GHSA-wg4c-wpq8-9vjx",
"modified": "2022-05-14T01:36:36Z",
"published": "2022-05-14T01:36:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-20129"
},
{
"type": "WEB",
"url": "http://www.iwantacve.cn/index.php/archives/88"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WG5R-WC3X-39VC
Vulnerability from github – Published: 2026-07-24 21:11 – Updated: 2026-08-03 20:44Summary
A pre-authentication remote code execution vulnerability affects OpenAM. The
remote authentication endpoint (/authservice, PLL) accepts an XML element
that names an arbitrary Java class, which the server then loads and
instantiates without validation. On a default configuration this is reachable
without authentication and allows an attacker to run code on the server.
Impact
Unauthenticated remote code execution / full server compromise on any OpenAM instance with default settings.
Affected
All releases up to and including 16.1.1 (the defect predates the Open Identity Platform fork).
Remediation
Upgrade to 16.1.2. The fix resolves the class named in a <CustomCallback>
element without running its static initialisers and rejects it unless it
implements DSAMECallbackInterface, and it constrains deserialisation of the
serialised Subject value to a class allowlist.
Interim mitigation
If you cannot upgrade immediately:
- Restrict or block external network access to
/authservice. This is the only reliable mitigation. - Optionally, block PLL requests carrying a
<CustomCallback className="...">element at the reverse proxy or WAF. That element is only produced for customDSAMECallbackInterfacecallbacks, so most deployments never send it — confirm against your own traffic before enforcing. - Enabling
sunRemoteAuthSecurityEnableddoes not mitigate this issue. The remote-auth security token is checked inAuthXMLHandler.processAuthXMLRequest, which runs only afterAuthXMLRequest.parseXMLhas already parsed the request and instantiated the class named in the<CustomCallback className="...">element. Do not rely on it as a substitute for upgrading or for network restriction.
Credit
Vulnerability discovered by Zhixi "Jace" Sun of ASM/VI at TikTok. Correction of the interim mitigation guidance contributed by @BarakSrour.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 16.1.1"
},
"package": {
"ecosystem": "Maven",
"name": "org.openidentityplatform.openam:openam-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "16.1.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-62379"
],
"database_specific": {
"cwe_ids": [
"CWE-470",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-24T21:11:09Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "## Summary\nA pre-authentication remote code execution vulnerability affects OpenAM. The\nremote authentication endpoint (`/authservice`, PLL) accepts an XML element\nthat names an arbitrary Java class, which the server then loads and\ninstantiates without validation. On a default configuration this is reachable\n**without authentication** and allows an attacker to run code on the server.\n\n## Impact\nUnauthenticated remote code execution / full server compromise on any OpenAM\ninstance with default settings.\n\n## Affected\nAll releases up to and including 16.1.1 (the defect predates the Open Identity\nPlatform fork).\n\n## Remediation\nUpgrade to `16.1.2`. The fix resolves the class named in a `\u003cCustomCallback\u003e`\nelement without running its static initialisers and rejects it unless it\nimplements `DSAMECallbackInterface`, and it constrains deserialisation of the\nserialised `Subject` value to a class allowlist.\n\n## Interim mitigation\nIf you cannot upgrade immediately:\n\n- **Restrict or block external network access to `/authservice`.** This is the\n only reliable mitigation.\n- Optionally, **block PLL requests carrying a `\u003cCustomCallback className=\"...\"\u003e`\n element** at the reverse proxy or WAF. That element is only produced for custom\n `DSAMECallbackInterface` callbacks, so most deployments never send it \u2014 confirm\n against your own traffic before enforcing.\n- **Enabling `sunRemoteAuthSecurityEnabled` does *not* mitigate this issue.** The\n remote-auth security token is checked in `AuthXMLHandler.processAuthXMLRequest`,\n which runs only after `AuthXMLRequest.parseXML` has already parsed the request\n and instantiated the class named in the `\u003cCustomCallback className=\"...\"\u003e`\n element. Do not rely on it as a substitute for upgrading or for network\n restriction.\n\n## Credit\nVulnerability discovered by Zhixi \"Jace\" Sun of ASM/VI at TikTok.\nCorrection of the interim mitigation guidance contributed by @BarakSrour.",
"id": "GHSA-wg5r-wc3x-39vc",
"modified": "2026-08-03T20:44:06Z",
"published": "2026-07-24T21:11:09Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/OpenIdentityPlatform/OpenAM/security/advisories/GHSA-wg5r-wc3x-39vc"
},
{
"type": "WEB",
"url": "https://github.com/OpenIdentityPlatform/OpenAM/commit/edcf968cad91a78b932dba4ad559ef94cbf35f5a"
},
{
"type": "PACKAGE",
"url": "https://github.com/OpenIdentityPlatform/OpenAM"
},
{
"type": "WEB",
"url": "https://github.com/OpenIdentityPlatform/OpenAM/releases/tag/16.1.2"
}
],
"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"
}
],
"summary": "OpenAM: Unauthenticated Remote Code Execution via Class.forName in AuthXMLUtils.createCustomCallback"
}
GHSA-WG6J-R28M-7293
Vulnerability from github – Published: 2019-07-31 04:21 – Updated: 2023-08-28 13:34The simple_captcha2 gem 0.2.3 for Ruby, as distributed on RubyGems.org, included a code-execution backdoor inserted by a third party.
{
"affected": [
{
"package": {
"ecosystem": "RubyGems",
"name": "simple_captcha2"
},
"versions": [
"0.2.3"
]
}
],
"aliases": [
"CVE-2019-14282"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2019-07-31T04:00:04Z",
"nvd_published_at": "2019-07-26T05:15:00Z",
"severity": "CRITICAL"
},
"details": "The simple_captcha2 gem 0.2.3 for Ruby, as distributed on RubyGems.org, included a code-execution backdoor inserted by a third party.",
"id": "GHSA-wg6j-r28m-7293",
"modified": "2023-08-28T13:34:04Z",
"published": "2019-07-31T04:21:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-14282"
},
{
"type": "WEB",
"url": "https://github.com/rubygems/rubygems.org/issues/2073"
},
{
"type": "PACKAGE",
"url": "https://github.com/pludoni/simple-captcha"
},
{
"type": "WEB",
"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/simple_captcha2/CVE-2019-14282.yml"
},
{
"type": "WEB",
"url": "https://rubygems.org/gems/simple_captcha2/versions"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/SNYK-RUBY-SIMPLECAPTCHA2-455501"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Code backdoor in simple_captcha2"
}
GHSA-WG6P-JMPC-XJMR
Vulnerability from github – Published: 2023-06-21 22:00 – Updated: 2023-06-21 22:00The Backstage scaffolder-backend plugin uses a templating library that requires a sandbox, as it by design allows for code injection. The library used for this sandbox so far has been vm2, but in light of several past vulnerabilities and existing vulnerabilities that may not have a fix, the plugin has switched to using a different sandbox library.
Impact
A malicious actor with write access to a registered scaffolder template could manipulate the template in a way that allows for remote code execution on the scaffolder-backend instance. This was only exploitable in the template YAML definition itself and not by user input data.
Patches
This is vulnerability is fixed in version 1.15.0 of @backstage/plugin-scaffolder-backend.
Workarounds
Note that the Backstage Threat Model states that scaffolder templates are considered to be a sensitive area that with the recommendation that you control access and perform manual reviews of changes to the scaffolder templates. The exploit is of a nature where it is easily discoverable in manual review.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@backstage/plugin-scaffolder-backend"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.15.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-35926"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-06-21T22:00:30Z",
"nvd_published_at": "2023-06-22T14:15:09Z",
"severity": "HIGH"
},
"details": "The Backstage scaffolder-backend plugin uses a templating library that requires a sandbox, as it by design allows for code injection. The library used for this sandbox so far has been `vm2`, but in light of several past vulnerabilities and existing vulnerabilities that may not have a fix, the plugin has switched to using a different sandbox library.\n\n### Impact\n\nA malicious actor with write access to a registered scaffolder template could manipulate the template in a way that allows for remote code execution on the scaffolder-backend instance. This was only exploitable in the template YAML definition itself and not by user input data.\n\n### Patches\n\nThis is vulnerability is fixed in version 1.15.0 of `@backstage/plugin-scaffolder-backend`.\n\n### Workarounds\n\nNote that the [Backstage Threat Model](https://backstage.io/docs/overview/threat-model) states that scaffolder templates are considered to be a sensitive area that with the recommendation that you control access and perform manual reviews of changes to the scaffolder templates. The exploit is of a nature where it is easily discoverable in manual review.",
"id": "GHSA-wg6p-jmpc-xjmr",
"modified": "2023-06-21T22:00:30Z",
"published": "2023-06-21T22:00:30Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/backstage/backstage/security/advisories/GHSA-wg6p-jmpc-xjmr"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-35926"
},
{
"type": "WEB",
"url": "https://github.com/backstage/backstage/commit/fb7375507d56faedcb7bb3665480070593c8949a"
},
{
"type": "PACKAGE",
"url": "https://github.com/backstage/backstage"
},
{
"type": "WEB",
"url": "https://github.com/backstage/backstage/releases/tag/v1.15.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Backstage Scaffolder plugin has insecure sandbox"
}
GHSA-WG8R-XCFC-F662
Vulnerability from github – Published: 2026-07-17 18:31 – Updated: 2026-07-17 18:31IBM Db2 11.5.0 through 11.5.9, and 12.1.0 through 12.1.4 is vulnerable to remote code execution when jdbc url is under user control.
{
"affected": [],
"aliases": [
"CVE-2026-9762"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-17T18:17:17Z",
"severity": "HIGH"
},
"details": "IBM Db2 11.5.0 through 11.5.9, and 12.1.0 through 12.1.4 is vulnerable to remote code execution when jdbc url is under user control.",
"id": "GHSA-wg8r-xcfc-f662",
"modified": "2026-07-17T18:31:27Z",
"published": "2026-07-17T18:31:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-9762"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7279479"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-WG9G-FPCG-QW8H
Vulnerability from github – Published: 2025-08-15 09:31 – Updated: 2025-08-15 09:31The Inpersttion For Theme plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1.0 via the theme_section_shortcode() function. This is due to the plugin not restricting what functions can be called. This makes it possible for authenticated attackers, with Contributor-level access and above, to execute code on the server which is limited to arbitrary functions without any user supplied parameters.
{
"affected": [],
"aliases": [
"CVE-2025-8905"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-15T09:15:31Z",
"severity": "MODERATE"
},
"details": "The Inpersttion For Theme plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1.0 via the theme_section_shortcode() function. This is due to the plugin not restricting what functions can be called. This makes it possible for authenticated attackers, with Contributor-level access and above, to execute code on the server which is limited to arbitrary functions without any user supplied parameters.",
"id": "GHSA-wg9g-fpcg-qw8h",
"modified": "2025-08-15T09:31:15Z",
"published": "2025-08-15T09:31:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-8905"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/err-our-team/trunk/inc/inpersttion-for-shortcode.php#L8"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/cd4dc8ab-792b-41ff-a7b9-77a11c02d91b?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-WGH8-4HMR-GPCM
Vulnerability from github – Published: 2025-01-07 06:32 – Updated: 2025-01-07 06:32The SEO LAT Auto Post plugin for WordPress is vulnerable to file overwrite due to a missing capability check on the remote_update AJAX action in all versions up to, and including, 2.2.1. This makes it possible for unauthenticated attackers to overwrite the seo-beginner-auto-post.php file which can be leveraged to achieve remote code execution.
{
"affected": [],
"aliases": [
"CVE-2024-12252"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-07T05:15:16Z",
"severity": "CRITICAL"
},
"details": "The SEO LAT Auto Post plugin for WordPress is vulnerable to file overwrite due to a missing capability check on the remote_update AJAX action in all versions up to, and including, 2.2.1. This makes it possible for unauthenticated attackers to overwrite the seo-beginner-auto-post.php file which can be leveraged to achieve remote code execution.",
"id": "GHSA-wgh8-4hmr-gpcm",
"modified": "2025-01-07T06:32:15Z",
"published": "2025-01-07T06:32:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12252"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/seo-beginner-auto-post"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/67df10cc-ce3c-4157-9860-7e367062f710?source=cve"
}
],
"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-WGRV-9PMX-9M2F
Vulnerability from github – Published: 2022-05-02 03:13 – Updated: 2022-05-02 03:13Unspecified vulnerability in HP Virtual Rooms Client before 7.0.1, when running on Windows, allows remote attackers to execute arbitrary code via unknown vectors.
{
"affected": [],
"aliases": [
"CVE-2009-0208"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-26T23:30:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in HP Virtual Rooms Client before 7.0.1, when running on Windows, allows remote attackers to execute arbitrary code via unknown vectors.",
"id": "GHSA-wgrv-9pmx-9m2f",
"modified": "2022-05-02T03:13:36Z",
"published": "2022-05-02T03:13:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0208"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=123567121722181\u0026w=2"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-WGXH-V2XQ-J8VR
Vulnerability from github – Published: 2023-07-06 18:30 – Updated: 2024-04-04 05:28An issue in Zimbra Collaboration ZCS v.8.8.15 and v.9.0 allows an attacker to execute arbitrary code via the sfdc_preauth.jsp component.
{
"affected": [],
"aliases": [
"CVE-2023-29382"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-07-06T16:15:09Z",
"severity": "CRITICAL"
},
"details": "An issue in Zimbra Collaboration ZCS v.8.8.15 and v.9.0 allows an attacker to execute arbitrary code via the sfdc_preauth.jsp component.",
"id": "GHSA-wgxh-v2xq-j8vr",
"modified": "2024-04-04T05:28:53Z",
"published": "2023-07-06T18:30:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29382"
},
{
"type": "WEB",
"url": "https://wiki.zimbra.com/wiki/Security_Center"
},
{
"type": "WEB",
"url": "https://wiki.zimbra.com/wiki/Zimbra_Responsible_Disclosure_Policy"
}
],
"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"
}
]
}
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.