Common Weakness Enumeration

CWE-94

Allowed-with-Review

Improper 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.

8287 vulnerabilities reference this CWE, most recent first.

GHSA-CW5C-XM7F-WX63

Vulnerability from github – Published: 2024-05-31 12:30 – Updated: 2025-10-22 00:33
VLAI
Details

Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. This vulnerability allows a remote, unauthenticated attacker to execute arbitrary commands on the affected system by sending a specially crafted HTTP request. As of the CVE assignment date, Rejetto HFS 2.3m is no longer supported.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-23692"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1336",
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-05-31T10:15:09Z",
    "severity": "CRITICAL"
  },
  "details": "Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. This vulnerability allows a remote, unauthenticated attacker to execute arbitrary commands on the affected system by sending a specially crafted HTTP request. As of the CVE assignment date, Rejetto HFS 2.3m is no longer supported.",
  "id": "GHSA-cw5c-xm7f-wx63",
  "modified": "2025-10-22T00:33:03Z",
  "published": "2024-05-31T12:30:49Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-23692"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rapid7/metasploit-framework/pull/19240"
    },
    {
      "type": "WEB",
      "url": "https://mohemiv.com/all/rejetto-http-file-server-2-3m-unauthenticated-rce"
    },
    {
      "type": "WEB",
      "url": "https://vulncheck.com/advisories/rejetto-unauth-rce"
    },
    {
      "type": "WEB",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-23692"
    },
    {
      "type": "WEB",
      "url": "https://www.vicarius.io/vsociety/posts/cve-2024-23692-detect-rejetto-hfs-vulnerability"
    },
    {
      "type": "WEB",
      "url": "https://www.vicarius.io/vsociety/posts/cve-2024-23692-rejetto-hfs-mitigate-vulnerability"
    },
    {
      "type": "WEB",
      "url": "https://www.vicarius.io/vsociety/posts/unauthenticated-rce-flaw-in-rejetto-http-file-server-cve-2024-23692"
    }
  ],
  "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-CW7J-P4C6-68V7

Vulnerability from github – Published: 2022-05-02 03:53 – Updated: 2022-05-02 03:53
VLAI
Details

Unspecified vulnerability in the Indeo codec in Microsoft Windows 2000 SP4, XP SP2 and SP3, and Server 2003 SP2 allows remote attackers to execute arbitrary code via crafted media content, as reported to Microsoft by Paul Byrne of NGS Software. NOTE: this might overlap CVE-2008-3615.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2009-4311"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-12-13T01:30:00Z",
    "severity": "HIGH"
  },
  "details": "Unspecified vulnerability in the Indeo codec in Microsoft Windows 2000 SP4, XP SP2 and SP3, and Server 2003 SP2 allows remote attackers to execute arbitrary code via crafted media content, as reported to Microsoft by Paul Byrne of NGS Software.  NOTE: this might overlap CVE-2008-3615.",
  "id": "GHSA-cw7j-p4c6-68v7",
  "modified": "2022-05-02T03:53:35Z",
  "published": "2022-05-02T03:53:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-4311"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/54645"
    },
    {
      "type": "WEB",
      "url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11975"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/37592"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1023302"
    },
    {
      "type": "WEB",
      "url": "http://support.microsoft.com/kb/954157"
    },
    {
      "type": "WEB",
      "url": "http://support.microsoft.com/kb/955759"
    },
    {
      "type": "WEB",
      "url": "http://support.microsoft.com/kb/976138"
    },
    {
      "type": "WEB",
      "url": "http://www.microsoft.com/technet/security/advisory/954157.mspx"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/37251"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2009/3440"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CWCP-6C48-FM7M

Vulnerability from github – Published: 2020-09-01 16:39 – Updated: 2023-11-14 21:08
VLAI
Summary
Unsafe eval() in summit allows arbitrary code execution
Details

Affected versions of summit allow attackers to execute arbitrary commands via collection names when using the PouchDB driver.

Recommendation

No direct patch is available at this time.

Currently, the best option to mitigate the issue is to avoid using the PouchDB driver, as the package author has abandoned this feature entirely.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "summit"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.1.0"
            },
            {
              "last_affected": "0.1.22"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2017-16020"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-08-31T18:18:59Z",
    "nvd_published_at": "2018-06-04T19:29:01Z",
    "severity": "CRITICAL"
  },
  "details": "Affected versions of `summit` allow attackers to execute arbitrary commands via collection names when using the `PouchDB` driver.\n\n## Recommendation\n\nNo direct patch is available at this time.\n\nCurrently, the best option to mitigate the issue is to avoid using the `PouchDB` driver, as the package author has abandoned this feature entirely.",
  "id": "GHSA-cwcp-6c48-fm7m",
  "modified": "2023-11-14T21:08:18Z",
  "published": "2020-09-01T16:39:38Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16020"
    },
    {
      "type": "WEB",
      "url": "https://github.com/notduncansmith/summit/issues/23"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/fredhohman/summit"
    }
  ],
  "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": "Unsafe eval() in summit allows arbitrary code execution"
}

GHSA-CWH9-FC6C-2W9P

Vulnerability from github – Published: 2022-05-17 05:14 – Updated: 2025-04-11 04:07
VLAI
Details

Opera before 12.13 allows remote attackers to execute arbitrary code via crafted clipPaths in an SVG document.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2013-1638"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2013-02-08T11:58:00Z",
    "severity": "HIGH"
  },
  "details": "Opera before 12.13 allows remote attackers to execute arbitrary code via crafted clipPaths in an SVG document.",
  "id": "GHSA-cwh9-fc6c-2w9p",
  "modified": "2025-04-11T04:07:16Z",
  "published": "2022-05-17T05:14:01Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2013-1638"
    },
    {
      "type": "WEB",
      "url": "http://lists.opensuse.org/opensuse-updates/2013-02/msg00038.html"
    },
    {
      "type": "WEB",
      "url": "http://www.opera.com/docs/changelogs/unified/1213"
    },
    {
      "type": "WEB",
      "url": "http://www.opera.com/support/kb/view/1043"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CWHF-VQF3-Q732

Vulnerability from github – Published: 2022-05-14 01:36 – Updated: 2022-05-14 01:36
VLAI
Details

Empire CMS 7.5 allows remote attackers to execute arbitrary PHP code via the ftemp parameter in an enews=EditMemberForm action because this code is injected into a memberform.$fid.php file.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2018-20300"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2018-12-20T00:29:00Z",
    "severity": "CRITICAL"
  },
  "details": "Empire CMS 7.5 allows remote attackers to execute arbitrary PHP code via the ftemp parameter in an enews=EditMemberForm action because this code is injected into a memberform.$fid.php file.",
  "id": "GHSA-cwhf-vqf3-q732",
  "modified": "2022-05-14T01:36:38Z",
  "published": "2022-05-14T01:36:38Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-20300"
    },
    {
      "type": "WEB",
      "url": "http://p0desta.com/2018/12/19/empirecms%E6%9C%80%E6%96%B0%E7%89%88%E5%90%8E%E5%8F%B0%E5%A4%9A%E5%A4%84getshell"
    }
  ],
  "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"
    }
  ]
}

GHSA-CWQR-WX5W-X96J

Vulnerability from github – Published: 2022-05-17 02:07 – Updated: 2022-05-17 02:07
VLAI
Details

PHP remote file inclusion vulnerability in gallery.php in JV2 Folder Gallery 3.1 allows remote attackers to execute arbitrary PHP code via a URL in the lang_file parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2010-2127"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2010-06-01T21:30:00Z",
    "severity": "HIGH"
  },
  "details": "PHP remote file inclusion vulnerability in gallery.php in JV2 Folder Gallery 3.1 allows remote attackers to execute arbitrary PHP code via a URL in the lang_file parameter.",
  "id": "GHSA-cwqr-wx5w-x96j",
  "modified": "2022-05-17T02:07:35Z",
  "published": "2022-05-17T02:07:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2010-2127"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/58807"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.org/1005-exploits/jv2foldergallery-rfi.txt"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/12688"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/40339"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CWR3-6H95-R5RC

Vulnerability from github – Published: 2022-05-01 06:39 – Updated: 2022-05-01 06:39
VLAI
Details

Safari in Mac OS X 10.3 before 10.3.9 and 10.4 before 10.4.5 allows remote attackers to redirect users to local files and execute arbitrary JavaScript via unspecified vectors involving HTTP redirection to local resources.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2006-0388"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2006-03-03T22:02:00Z",
    "severity": "LOW"
  },
  "details": "Safari in Mac OS X 10.3 before 10.3.9 and 10.4 before 10.4.5 allows remote attackers to redirect users to local files and execute arbitrary JavaScript via unspecified vectors involving HTTP redirection to local resources.",
  "id": "GHSA-cwr3-6h95-r5rc",
  "modified": "2022-05-01T06:39:32Z",
  "published": "2022-05-01T06:39:32Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2006-0388"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/25038"
    },
    {
      "type": "WEB",
      "url": "http://docs.info.apple.com/article.html?artnum=303382"
    },
    {
      "type": "WEB",
      "url": "http://lists.apple.com/archives/security-announce/2006/Mar/msg00000.html"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/19064"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1015713"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/16907"
    },
    {
      "type": "WEB",
      "url": "http://www.us-cert.gov/cas/techalerts/TA06-062A.html"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2006/0791"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CWRJ-9F27-P9C8

Vulnerability from github – Published: 2022-05-02 03:13 – Updated: 2022-05-02 03:13
VLAI
Details

Static code injection vulnerability in admin.php in Ryneezy phoSheezy 0.2 allows remote authenticated administrators to inject arbitrary PHP code into config/footer via the footer parameter. NOTE: this can be exploited by unauthenticated attackers by leveraging CVE-2009-0250. NOTE: some of these details are obtained from third party information.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2009-0251"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-01-22T16:30:00Z",
    "severity": "MODERATE"
  },
  "details": "Static code injection vulnerability in admin.php in Ryneezy phoSheezy 0.2 allows remote authenticated administrators to inject arbitrary PHP code into config/footer via the footer parameter.  NOTE: this can be exploited by unauthenticated attackers by leveraging CVE-2009-0250. NOTE: some of these details are obtained from third party information.",
  "id": "GHSA-cwrj-9f27-p9c8",
  "modified": "2022-05-02T03:13:51Z",
  "published": "2022-05-02T03:13:51Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0251"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/7780"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/51412"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/33531"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/4935"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CX3M-VXG2-PC6J

Vulnerability from github – Published: 2022-05-01 18:36 – Updated: 2022-05-01 18:36
VLAI
Details

PHP remote file inclusion vulnerability in _theme/breadcrumb.php in MySpacePros MySpace Resource Script (MSRS) 1.21 allows remote attackers to execute arbitrary PHP code via a URL in the rootBase parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-5721"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-10-30T21:46:00Z",
    "severity": "MODERATE"
  },
  "details": "PHP remote file inclusion vulnerability in _theme/breadcrumb.php in MySpacePros MySpace Resource Script (MSRS) 1.21 allows remote attackers to execute arbitrary PHP code via a URL in the rootBase parameter.",
  "id": "GHSA-cx3m-vxg2-pc6j",
  "modified": "2022-05-01T18:36:09Z",
  "published": "2022-05-01T18:36:09Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5721"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38167"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/4585"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/38838"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/26240"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CX3W-XQMC-84G5

Vulnerability from github – Published: 2022-02-15 00:30 – Updated: 2022-04-20 16:24
VLAI
Summary
Git LFS can execute a Git binary from the current directory on Windows
Details

Impact

On Windows, if Git LFS operates on a malicious repository with a git.bat or git.exe file in the current directory, that program would be executed, permitting the attacker to execute arbitrary code. This does not affect Unix systems.

This is the result of an incomplete fix for CVE-2020-27955.

This issue occurs because on Windows, Go includes (and prefers) the current directory when the name of a command run does not contain a directory separator.

Patches

This version should be patched in v2.13.2, which will be released in coordination with this security advisory.

Workarounds

Other than avoiding untrusted repositories or using a different operating system, there is no workaround.

References

Are there any links users can visit to find out more?

For more information

If you have any questions or comments about this advisory:

  • Start a discussion in the Git LFS discussion page.
  • If you cannot open a discussion, please email the core team using their usernames at github.com.
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/git-lfs/git-lfs"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.13.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-21237"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-426",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-05-21T17:37:52Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Impact\nOn Windows, if Git LFS operates on a malicious repository with a git.bat or git.exe file in the current directory, that program would be executed, permitting the attacker to execute arbitrary code. This does not affect Unix systems.\n\nThis is the result of an incomplete fix for CVE-2020-27955.\n\nThis issue occurs because on Windows, [Go includes (and prefers) the current directory when the name of a command run does not contain a directory separator](https://github.com/golang/go/issues/38736).\n\n### Patches\nThis version should be patched in v2.13.2, which will be released in coordination with this security advisory.\n\n### Workarounds\nOther than avoiding untrusted repositories or using a different operating system, there is no workaround.\n\n### References\n_Are there any links users can visit to find out more?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- Start a discussion in [the Git LFS discussion page](https://github.com/git-lfs/git-lfs/discussions).\n- If you cannot open a discussion, please email the core team using their usernames at `github.com`.",
  "id": "GHSA-cx3w-xqmc-84g5",
  "modified": "2022-04-20T16:24:41Z",
  "published": "2022-02-15T00:30:37Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/git-lfs/git-lfs/security/advisories/GHSA-cx3w-xqmc-84g5"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-21237"
    },
    {
      "type": "WEB",
      "url": "https://github.com/git-lfs/git-lfs/commit/fc664697ed2c2081ee9633010de0a7f9debea72a"
    },
    {
      "type": "WEB",
      "url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-27955"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/git-lfs/git-lfs"
    },
    {
      "type": "WEB",
      "url": "https://github.com/git-lfs/git-lfs/releases/tag/v2.13.2"
    },
    {
      "type": "WEB",
      "url": "https://pkg.go.dev/vuln/GO-2021-0098"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Git LFS can execute a Git binary from the current directory on Windows"
}

Mitigation
Architecture and Design

Strategy: Refactoring

Refactor your program so that you do not have to dynamically generate code.

Mitigation
Architecture and Design
  • 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
Implementation

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
Testing

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
Operation

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
Operation

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
Implementation

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.