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.
9394 vulnerabilities reference this CWE, most recent first.
GHSA-JHM7-38XJ-PVM8
Vulnerability from github – Published: 2022-05-17 05:45 – Updated: 2023-02-07 18:24template_api.py in Cobbler before 2.0.7, as used in Red Hat Network Satellite Server and other products, does not disable the ability of the Cheetah template engine to execute Python statements contained in templates, which allows remote authenticated administrators to execute arbitrary code via a crafted kickstart template file, a different vulnerability than CVE-2008-6954.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "cobbler"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2010-2235"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-02-07T18:24:03Z",
"nvd_published_at": "2010-12-09T20:00:00Z",
"severity": "HIGH"
},
"details": "template_api.py in Cobbler before 2.0.7, as used in Red Hat Network Satellite Server and other products, does not disable the ability of the Cheetah template engine to execute Python statements contained in templates, which allows remote authenticated administrators to execute arbitrary code via a crafted kickstart template file, a different vulnerability than CVE-2008-6954.",
"id": "GHSA-jhm7-38xj-pvm8",
"modified": "2023-02-07T18:24:03Z",
"published": "2022-05-17T05:45:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-2235"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2010:0775"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2010-2235"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=607662"
},
{
"type": "PACKAGE",
"url": "https://github.com/cobbler/cobbler"
},
{
"type": "WEB",
"url": "https://people.fedoraproject.org/~shenson/cobbler/cobbler-2.0.8.tar.gz"
},
{
"type": "WEB",
"url": "https://www.redhat.com/support/errata/RHSA-2010-0775.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Cobbler is vulnerable to code injection "
}
GHSA-JHR6-GM9C-RQJV
Vulnerability from github – Published: 2026-07-31 21:31 – Updated: 2026-09-30 23:24sentence-transformers contains a security control bypass vulnerability that allows attackers to achieve arbitrary code execution by exploiting a logic flaw in the import_module_class helper within sentence_transformers/util/misc.py, where the guard condition includes an 'or os.path.exists(model_name_or_path)' clause that satisfies the trust gate whenever the supplied path exists on the local filesystem, regardless of the trust_remote_code=False argument. Attackers who can control or influence the contents of a model directory on disk can place malicious Python files such as modeling_*.py referenced via modules.json, causing the code to execute at import time when an application loads the model with SentenceTransformer(path, trust_remote_code=False), bypassing the documented security contract and achieving code execution within the loading process.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "sentence-transformers"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.6.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-68770"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-30T23:24:22Z",
"nvd_published_at": "2026-07-31T21:17:32Z",
"severity": "CRITICAL"
},
"details": "sentence-transformers contains a security control bypass vulnerability that allows attackers to achieve arbitrary code execution by exploiting a logic flaw in the import_module_class helper within sentence_transformers/util/misc.py, where the guard condition includes an \u0027or os.path.exists(model_name_or_path)\u0027 clause that satisfies the trust gate whenever the supplied path exists on the local filesystem, regardless of the trust_remote_code=False argument. Attackers who can control or influence the contents of a model directory on disk can place malicious Python files such as modeling_*.py referenced via modules.json, causing the code to execute at import time when an application loads the model with SentenceTransformer(path, trust_remote_code=False), bypassing the documented security contract and achieving code execution within the loading process.",
"id": "GHSA-jhr6-gm9c-rqjv",
"modified": "2026-09-30T23:24:23Z",
"published": "2026-07-31T21:31:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-68770"
},
{
"type": "WEB",
"url": "https://github.com/huggingface/sentence-transformers/issues/3801"
},
{
"type": "WEB",
"url": "https://github.com/huggingface/sentence-transformers/pull/3807"
},
{
"type": "WEB",
"url": "https://github.com/huggingface/sentence-transformers/pull/3935"
},
{
"type": "WEB",
"url": "https://github.com/huggingface/sentence-transformers/commit/626eb602b088878a8173bcab69225f68411b99e1"
},
{
"type": "WEB",
"url": "https://github.com/huggingface/sentence-transformers/commit/ae1acc3fb2aa2004577b297eb4a915ce7a03316a"
},
{
"type": "PACKAGE",
"url": "https://github.com/huggingface/sentence-transformers"
},
{
"type": "WEB",
"url": "https://github.com/huggingface/sentence-transformers/releases/tag/v5.6.0"
},
{
"type": "WEB",
"url": "https://github.com/huggingface/sentence-transformers/releases/tag/v6.0.0"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/sentence-transformers-arbitrary-code-execution-on-local-model-load-despite-trust-remote-code-false"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "sentence-transformers local model loading bypasses trust_remote_code and executes custom Python"
}
GHSA-JHRQ-83MG-J8C8
Vulnerability from github – Published: 2022-05-13 01:07 – Updated: 2024-10-17 21:31Microsoft Internet Explorer 6 through 9 does not properly handle objects in memory, which allows remote attackers to execute arbitrary code by attempting to access an undefined memory location, aka "insertAdjacentText Remote Code Execution Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2012-1879"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-06-12T22:55:00Z",
"severity": "HIGH"
},
"details": "Microsoft Internet Explorer 6 through 9 does not properly handle objects in memory, which allows remote attackers to execute arbitrary code by attempting to access an undefined memory location, aka \"insertAdjacentText Remote Code Execution Vulnerability.\"",
"id": "GHSA-jhrq-83mg-j8c8",
"modified": "2024-10-17T21:31:28Z",
"published": "2022-05-13T01:07:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-1879"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2012/ms12-037"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A15588"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA12-164A.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-JHV9-PF4Q-QVW6
Vulnerability from github – Published: 2022-05-17 05:05 – Updated: 2022-05-17 05:05The Red Hat CloudForms Management Engine 5.1 allow remote administrators to execute arbitrary Ruby code via unspecified vectors.
{
"affected": [],
"aliases": [
"CVE-2013-4172"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-08-23T16:55:00Z",
"severity": "HIGH"
},
"details": "The Red Hat CloudForms Management Engine 5.1 allow remote administrators to execute arbitrary Ruby code via unspecified vectors.",
"id": "GHSA-jhv9-pf4q-qvw6",
"modified": "2022-05-17T05:05:43Z",
"published": "2022-05-17T05:05:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-4172"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHEA-2013:1487"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2013:1157"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2013-4172"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=988644"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2013-1157.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-JHVH-MJFG-5M99
Vulnerability from github – Published: 2022-05-24 16:52 – Updated: 2024-02-12 11:30A remote code execution vulnerability exists in Magento 2.1 prior to 2.1.18, Magento 2.2 prior to 2.2.9, Magento 2.3 prior to 2.3.2. An authenticated user with admin privileges to email templates can execute arbitrary code by previewing a malicious template.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"ranges": [
{
"events": [
{
"introduced": "2.1.0"
},
{
"fixed": "2.1.18"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"ranges": [
{
"events": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.9"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "magento/community-edition"
},
"ranges": [
{
"events": [
{
"introduced": "2.3.0"
},
{
"fixed": "2.3.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2019-7903"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-07-17T20:25:00Z",
"nvd_published_at": "2019-08-02T22:15:00Z",
"severity": "HIGH"
},
"details": "A remote code execution vulnerability exists in Magento 2.1 prior to 2.1.18, Magento 2.2 prior to 2.2.9, Magento 2.3 prior to 2.3.2. An authenticated user with admin privileges to email templates can execute arbitrary code by previewing a malicious template.",
"id": "GHSA-jhvh-mjfg-5m99",
"modified": "2024-02-12T11:30:43Z",
"published": "2022-05-24T16:52:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-7903"
},
{
"type": "WEB",
"url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/magento/product-community-edition/CVE-2019-7903.yaml"
},
{
"type": "PACKAGE",
"url": "https://github.com/magento/magento2"
},
{
"type": "WEB",
"url": "https://magento.com/security/patches/magento-2.3.2-2.2.9-and-2.1.18-security-update-13"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20211206084839/https://magento.com/security/patches/magento-2.3.2-2.2.9-and-2.1.18-security-update-13"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Magento 2 Community Edition RCE Vulnerability"
}
GHSA-JHWV-H83W-79M9
Vulnerability from github – Published: 2023-04-10 15:30 – Updated: 2023-04-14 06:30The JetEngine WordPress plugin before 3.1.3.1 includes uploaded files without adequately ensuring that they are not executable, leading to a remote code execution vulnerability.
{
"affected": [],
"aliases": [
"CVE-2023-1406"
],
"database_specific": {
"cwe_ids": [
"CWE-434",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-04-10T14:15:00Z",
"severity": "HIGH"
},
"details": "The JetEngine WordPress plugin before 3.1.3.1 includes uploaded files without adequately ensuring that they are not executable, leading to a remote code execution vulnerability.",
"id": "GHSA-jhwv-h83w-79m9",
"modified": "2023-04-14T06:30:16Z",
"published": "2023-04-10T15:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-1406"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/2a81b6b1-2339-4889-9c28-1af133df8b65"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-JJ42-9W8M-9979
Vulnerability from github – Published: 2024-10-18 00:31 – Updated: 2024-10-21 00:30MariaDB v10.5 was discovered to contain a remote code execution (RCE) vulnerability.
{
"affected": [],
"aliases": [
"CVE-2023-26785"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-10-17T22:15:02Z",
"severity": "CRITICAL"
},
"details": "MariaDB v10.5 was discovered to contain a remote code execution (RCE) vulnerability.",
"id": "GHSA-jj42-9w8m-9979",
"modified": "2024-10-21T00:30:54Z",
"published": "2024-10-18T00:31:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-26785"
},
{
"type": "WEB",
"url": "https://github.com/Ant1sec-ops/CVE-2023-26785"
},
{
"type": "WEB",
"url": "https://seclists.org/fulldisclosure/2012/Dec/39"
}
],
"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-JJ5C-PRR4-V82G
Vulnerability from github – Published: 2026-08-24 06:30 – Updated: 2026-08-24 06:30The Velociraptor verify() VQL function allows a user to verify an artifact for syntatic and other issues. Due to an implementation fault in this VQL function, the global artifact repository is used which allows callers to overwrite existing artifacts without the required permissions. The attacker need only have the NOTEBOOK_EDIT permission (e.g. an analyst role) to be able to call this function.
{
"affected": [],
"aliases": [
"CVE-2026-19200"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-24T04:16:46Z",
"severity": "HIGH"
},
"details": "The Velociraptor verify() VQL function allows a user to verify an artifact for syntatic and other issues. Due to an implementation fault in this VQL function, the global artifact repository is used which allows callers to overwrite existing artifacts without the required permissions.\u00a0 The attacker need only have the NOTEBOOK_EDIT permission (e.g. an analyst role) to be able to call this function.",
"id": "GHSA-jj5c-prr4-v82g",
"modified": "2026-08-24T06:30:28Z",
"published": "2026-08-24T06:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-19200"
},
{
"type": "WEB",
"url": "https://github.com/Velocidex/velociraptor/pull/4962"
},
{
"type": "WEB",
"url": "http://docs.velociraptor.app/announcements/advisories/cve-2026-19200"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-JJ74-HC2Q-XRVM
Vulnerability from github – Published: 2026-10-07 20:26 – Updated: 2026-10-07 20:26Impact
A vulnerability in how Ghost loads theme translation files allowed an authenticated Administrator to execute arbitrary code on the server via a crafted theme.
Vulnerable versions
This vulnerability is present in Ghost from v6.10.3 up to v6.64.0.
Patches
v6.64.0 contains a fix for this issue.
How to update
For self-hosters using Docker, find Docker's official Ghost image here. Updating a Docker-based Ghost instance is documented here.
If your Ghost is a Ghost-CLI install see our documentation on updating it to the latest version here.
References
Ghost thanks Miguel Segovia Gil of KPMG, Alemmi, and Tomer-PL for disclosing this vulnerability responsibly.
For more information
If you have any questions or comments about this advisory, email us at security@ghost.org.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "ghost"
},
"ranges": [
{
"events": [
{
"introduced": "6.10.3"
},
{
"fixed": "6.64.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-105677"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-829",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-07T20:26:08Z",
"nvd_published_at": "2026-10-05T20:17:14Z",
"severity": "HIGH"
},
"details": "### Impact\n\nA vulnerability in how Ghost loads theme translation files allowed an authenticated Administrator to execute arbitrary code on the server via a crafted theme.\n\n### Vulnerable versions\n\nThis vulnerability is present in Ghost from v6.10.3 up to v6.64.0.\n\n### Patches\n\nv6.64.0 contains a fix for this issue.\n\n### How to update\n\nFor self-hosters using Docker, find [Docker\u0027s official Ghost image here](https://hub.docker.com/_/ghost). Updating a Docker-based Ghost instance [is documented here](https://docs.ghost.org/install/docker#updating-ghost).\n\nIf your Ghost is a Ghost-CLI install see our documentation on [updating it to the latest version here](https://docs.ghost.org/update).\n\n### References\n\nGhost thanks [Miguel Segovia Gil](https://github.com/msegoviag) of KPMG, [Alemmi](https://github.com/Alemmi), and [Tomer-PL](https://github.com/Tomer-PL) for disclosing this vulnerability responsibly.\n\n### For more information\n\nIf you have any questions or comments about this advisory, email us at [security@ghost.org](mailto:security@ghost.org).",
"id": "GHSA-jj74-hc2q-xrvm",
"modified": "2026-10-07T20:26:09Z",
"published": "2026-10-07T20:26:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/TryGhost/Ghost/security/advisories/GHSA-jj74-hc2q-xrvm"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-105677"
},
{
"type": "WEB",
"url": "https://github.com/TryGhost/Ghost/issues/30635"
},
{
"type": "WEB",
"url": "https://github.com/TryGhost/Ghost/commit/d2f498694be549074dd5817fd0e8a1371b65df02"
},
{
"type": "PACKAGE",
"url": "https://github.com/TryGhost/Ghost"
},
{
"type": "WEB",
"url": "https://github.com/TryGhost/Ghost/releases/tag/v6.64.0"
}
],
"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": "Ghost: Remote Code Execution via Theme Translation Files"
}
GHSA-JJ7X-VC24-MQ4R
Vulnerability from github – Published: 2022-05-24 17:43 – Updated: 2022-05-24 17:43Nagios XI below 5.7 is affected by code injection in the /nagiosxi/admin/graphtemplates.php component. To exploit this vulnerability, someone must have an admin user account in Nagios XI's web system.
{
"affected": [],
"aliases": [
"CVE-2021-3273"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-02-25T14:15:00Z",
"severity": "HIGH"
},
"details": "Nagios XI below 5.7 is affected by code injection in the /nagiosxi/admin/graphtemplates.php component. To exploit this vulnerability, someone must have an admin user account in Nagios XI\u0027s web system.",
"id": "GHSA-jj7x-vc24-mq4r",
"modified": "2022-05-24T17:43:04Z",
"published": "2022-05-24T17:43:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3273"
},
{
"type": "WEB",
"url": "https://gist.github.com/leommxj/93edce6f8572cefe79a3d7da4389374e"
},
{
"type": "WEB",
"url": "https://www.nagios.com/downloads/nagios-xi/change-log"
}
],
"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.