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.

8387 vulnerabilities reference this CWE, most recent first.

GHSA-6CG2-V7G4-7R8C

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

Microsoft Windows Media Player 7.1, 9, 10, and 11 allows remote attackers to execute arbitrary code via a skin file (WMZ or WMD) with crafted header information that causes a size mismatch between compressed and decompressed data and triggers a heap-based buffer overflow, aka "Windows Media Player Code Execution Vulnerability Parsing Skins."

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-3037"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-119",
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-08-14T21:17:00Z",
    "severity": "MODERATE"
  },
  "details": "Microsoft Windows Media Player 7.1, 9, 10, and 11 allows remote attackers to execute arbitrary code via a skin file (WMZ or WMD) with crafted header information that causes a size mismatch between compressed and decompressed data and triggers a heap-based buffer overflow, aka \"Windows Media Player Code Execution Vulnerability Parsing Skins.\"",
  "id": "GHSA-6cg2-v7g4-7r8c",
  "modified": "2022-05-01T18:09:48Z",
  "published": "2022-05-01T18:09:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-3037"
    },
    {
      "type": "WEB",
      "url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2007/ms07-047"
    },
    {
      "type": "WEB",
      "url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A2207"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/26433"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1018565"
    },
    {
      "type": "WEB",
      "url": "http://www.osvdb.org/36385"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/476533/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/25307"
    },
    {
      "type": "WEB",
      "url": "http://www.us-cert.gov/cas/techalerts/TA07-226A.html"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2007/2871"
    },
    {
      "type": "WEB",
      "url": "http://www.zerodayinitiative.com/advisories/ZDI-07-046.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6CMV-J38V-H7WC

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

Microsoft Internet Explorer 6 and 7 does not properly handle objects in memory that (1) were not properly initialized or (2) are deleted, which allows remote attackers to execute arbitrary code via vectors involving a call to the getElementsByTagName method for the STYLE tag name, selection of the single element in the returned list, and a change to the outerHTML property of this element, related to Cascading Style Sheets (CSS) and mshtml.dll, aka "HTML Object Memory Corruption Vulnerability." NOTE: some of these details are obtained from third party information. NOTE: this issue was originally assigned CVE-2009-4054, but Microsoft assigned a duplicate identifier of CVE-2009-3672. CVE consumers should use this identifier instead of CVE-2009-4054.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2009-3672"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-12-02T11:30:00Z",
    "severity": "HIGH"
  },
  "details": "Microsoft Internet Explorer 6 and 7 does not properly handle objects in memory that (1) were not properly initialized or (2) are deleted, which allows remote attackers to execute arbitrary code via vectors involving a call to the getElementsByTagName method for the STYLE tag name, selection of the single element in the returned list, and a change to the outerHTML property of this element, related to Cascading Style Sheets (CSS) and mshtml.dll, aka \"HTML Object Memory Corruption Vulnerability.\" NOTE: some of these details are obtained from third party information. NOTE: this issue was originally assigned CVE-2009-4054, but Microsoft assigned a duplicate identifier of CVE-2009-3672. CVE consumers should use this identifier instead of CVE-2009-4054.",
  "id": "GHSA-6cmv-j38v-h7wc",
  "modified": "2022-05-02T03:47:36Z",
  "published": "2022-05-02T03:47:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-3672"
    },
    {
      "type": "WEB",
      "url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-072"
    },
    {
      "type": "WEB",
      "url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6381"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/37448"
    },
    {
      "type": "WEB",
      "url": "http://www.kb.cert.org/vuls/id/515749"
    },
    {
      "type": "WEB",
      "url": "http://www.microsoft.com/technet/security/advisory/977981.mspx"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/507984/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/37085"
    },
    {
      "type": "WEB",
      "url": "http://www.securitytracker.com/id?1023293"
    },
    {
      "type": "WEB",
      "url": "http://www.symantec.com/connect/blogs/zero-day-internet-explorer-exploit-published"
    },
    {
      "type": "WEB",
      "url": "http://www.us-cert.gov/cas/techalerts/TA09-342A.html"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2009/3301"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6CPG-GQGQ-2RRR

Vulnerability from github – Published: 2023-03-31 03:30 – Updated: 2023-04-06 22:56
VLAI
Summary
phpMyFAQ Code Injection vulnerability
Details

Code Injection in GitHub repository thorsten/phpmyfaq prior to 3.1.12.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "thorsten/phpmyfaq"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.1.12"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-1761"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-03-31T22:42:07Z",
    "nvd_published_at": "2023-03-31T02:15:00Z",
    "severity": "MODERATE"
  },
  "details": "Code Injection in GitHub repository thorsten/phpmyfaq prior to 3.1.12.",
  "id": "GHSA-6cpg-gqgq-2rrr",
  "modified": "2023-04-06T22:56:10Z",
  "published": "2023-03-31T03:30:30Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-1761"
    },
    {
      "type": "WEB",
      "url": "https://github.com/thorsten/phpmyfaq/commit/128ef85f8e3ab7869d3107aa4d0b6867b53391d7"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/thorsten/phpmyfaq"
    },
    {
      "type": "WEB",
      "url": "https://huntr.dev/bounties/24c0a65f-0751-4ff8-af63-4b325ac8879f"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "phpMyFAQ Code Injection vulnerability"
}

GHSA-6CVM-432M-8W2X

Vulnerability from github – Published: 2022-08-10 00:00 – Updated: 2022-08-10 00:00
VLAI
Details

Visual Studio Remote Code Execution Vulnerability. This CVE ID is unique from CVE-2022-35825, CVE-2022-35826, CVE-2022-35827.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-35777"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-08-09T20:15:00Z",
    "severity": "HIGH"
  },
  "details": "Visual Studio Remote Code Execution Vulnerability. This CVE ID is unique from CVE-2022-35825, CVE-2022-35826, CVE-2022-35827.",
  "id": "GHSA-6cvm-432m-8w2x",
  "modified": "2022-08-10T00:00:17Z",
  "published": "2022-08-10T00:00:17Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-35777"
    },
    {
      "type": "WEB",
      "url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-35777"
    },
    {
      "type": "WEB",
      "url": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2022-35777"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-6CXR-F6HX-5J7X

Vulnerability from github – Published: 2022-05-01 17:55 – Updated: 2022-05-01 17:55
VLAI
Details

The resource system in PHP 5.0.0 through 5.2.1 allows context-dependent attackers to execute arbitrary code by interrupting the hash_update_file function via a userspace (1) error or (2) stream handler, which can then be used to destroy and modify internal resources. NOTE: it was later reported that PHP 5.2 through 5.2.13 and 5.3 through 5.3.2 are also affected.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-1581"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-03-21T23:19:00Z",
    "severity": "HIGH"
  },
  "details": "The resource system in PHP 5.0.0 through 5.2.1 allows context-dependent attackers to execute arbitrary code by interrupting the hash_update_file function via a userspace (1) error or (2) stream handler, which can then be used to destroy and modify internal resources.  NOTE: it was later reported that PHP 5.2 through 5.2.13 and 5.3 through 5.3.2 are also affected.",
  "id": "GHSA-6cxr-f6hx-5j7x",
  "modified": "2022-05-01T17:55:05Z",
  "published": "2022-05-01T17:55:05Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-1581"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/33248"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/3529"
    },
    {
      "type": "WEB",
      "url": "http://php-security.org/2010/05/01/mops-2010-001-php-hash_update_file-already-freed-resource-access-vulnerability/index.html"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/24542"
    },
    {
      "type": "WEB",
      "url": "http://www.php-security.org/MOPB/MOPB-28-2007.html"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/23062"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6F39-VHV8-5HCW

Vulnerability from github – Published: 2022-05-17 01:17 – Updated: 2025-04-20 03:32
VLAI
Details

Eval injection vulnerability in php-gettext 1.0.12 and earlier allows remote attackers to execute arbitrary PHP code via a crafted plural forms header.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2016-6175"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2017-02-07T15:59:00Z",
    "severity": "CRITICAL"
  },
  "details": "Eval injection vulnerability in php-gettext 1.0.12 and earlier allows remote attackers to execute arbitrary PHP code via a crafted plural forms header.",
  "id": "GHSA-6f39-vhv8-5hcw",
  "modified": "2025-04-20T03:32:27Z",
  "published": "2022-05-17T01:17:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2016-6175"
    },
    {
      "type": "WEB",
      "url": "https://github.com/NagVis/nagvis/commit/4fe8672a5aec3467da72b5852ca6d283c15adb53"
    },
    {
      "type": "WEB",
      "url": "https://bugs.launchpad.net/php-gettext/+bug/1606184"
    },
    {
      "type": "WEB",
      "url": "https://kmkz-web-blog.blogspot.cz/2016/07/advisory-cve-2016-6175.html"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/40154"
    }
  ],
  "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-6F7W-7XMX-MX54

Vulnerability from github – Published: 2026-03-19 18:31 – Updated: 2026-03-24 03:31
VLAI
Details

An issue in DedeCMS v.5.7.118 and before allows a remote attacker to execute arbitrary code via the array_filter component

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-30694"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-03-19T18:16:22Z",
    "severity": "CRITICAL"
  },
  "details": "An issue in DedeCMS v.5.7.118 and before allows a remote attacker to execute arbitrary code via the array_filter component",
  "id": "GHSA-6f7w-7xmx-mx54",
  "modified": "2026-03-24T03:31:19Z",
  "published": "2026-03-19T18:31:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-30694"
    },
    {
      "type": "WEB",
      "url": "https://jacobjacobjacob.gitbook.io/cve-2026-30694"
    },
    {
      "type": "WEB",
      "url": "https://leixyous-personal-organization.gitbook.io/dedecms-file-manage-getshell-via-bypass-blacklist"
    }
  ],
  "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-6F8F-G5CP-WXFW

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

The Sleipnir Mobile application 2.2.0 and earlier and Sleipnir Mobile Black Edition application 2.2.0 and earlier for Android allow remote attackers to execute arbitrary Java methods, and obtain sensitive information or execute arbitrary commands, via a crafted web site.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2012-2649"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2012-08-08T18:55:00Z",
    "severity": "MODERATE"
  },
  "details": "The Sleipnir Mobile application 2.2.0 and earlier and Sleipnir Mobile Black Edition application 2.2.0 and earlier for Android allow remote attackers to execute arbitrary Java methods, and obtain sensitive information or execute arbitrary commands, via a crafted web site.",
  "id": "GHSA-6f8f-g5cp-wxfw",
  "modified": "2022-05-17T05:26:21Z",
  "published": "2022-05-17T05:26:21Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2012-2649"
    },
    {
      "type": "WEB",
      "url": "https://play.google.com/store/apps/details?id=jp.co.fenrir.android.sleipnir"
    },
    {
      "type": "WEB",
      "url": "https://play.google.com/store/apps/details?id=jp.co.fenrir.android.sleipnir_black"
    },
    {
      "type": "WEB",
      "url": "http://jvn.jp/en/jp/JVN99730704/index.html"
    },
    {
      "type": "WEB",
      "url": "http://jvndb.jvn.jp/jvndb/JVNDB-2012-000075"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6FCG-QJ92-43FF

Vulnerability from github – Published: 2022-05-01 06:38 – Updated: 2025-04-03 04:25
VLAI
Details

Multiple HTTP response splitting vulnerabilities in PHP 5.1.1 allow remote attackers to inject arbitrary HTTP headers via a crafted Set-Cookie header, related to the (1) session extension (aka ext/session) and the (2) header function.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2006-0207"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2006-01-13T23:03:00Z",
    "severity": "MODERATE"
  },
  "details": "Multiple HTTP response splitting vulnerabilities in PHP 5.1.1 allow remote attackers to inject arbitrary HTTP headers via a crafted Set-Cookie header, related to the (1) session extension (aka ext/session) and the (2) header function.",
  "id": "GHSA-6fcg-qj92-43ff",
  "modified": "2025-04-03T04:25:03Z",
  "published": "2022-05-01T06:38:13Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2006-0207"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/24094"
    },
    {
      "type": "WEB",
      "url": "https://usn.ubuntu.com/261-1"
    },
    {
      "type": "WEB",
      "url": "http://lists.suse.de/archive/suse-security-announce/2006-Feb/0008.html"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/18431"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/18697"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/19012"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/19179"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/19355"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/25945"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1015484"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2007/dsa-1331"
    },
    {
      "type": "WEB",
      "url": "http://www.gentoo.org/security/en/glsa/glsa-200603-22.xml"
    },
    {
      "type": "WEB",
      "url": "http://www.hardened-php.net/advisory_012006.112.html"
    },
    {
      "type": "WEB",
      "url": "http://www.mandriva.com/security/advisories?name=MDKSA-2006:028"
    },
    {
      "type": "WEB",
      "url": "http://www.php.net/release_5_1_2.php"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/16220"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2006/0177"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2006/0369"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6FF5-XPPW-FX3M

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

The MASetupCaller ActiveX control before 1.4.2012.508 in MASetupCaller.dll in MarkAny ContentSAFER, as distributed in Samsung KIES before 2.3.2.12074_13_13, does not properly implement unspecified methods, which allows remote attackers to download an arbitrary program onto a client machine, and execute this program, via a crafted HTML document.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2012-2990"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2012-08-24T20:55:00Z",
    "severity": "HIGH"
  },
  "details": "The MASetupCaller ActiveX control before 1.4.2012.508 in MASetupCaller.dll in MarkAny ContentSAFER, as distributed in Samsung KIES before 2.3.2.12074_13_13, does not properly implement unspecified methods, which allows remote attackers to download an arbitrary program onto a client machine, and execute this program, via a crafted HTML document.",
  "id": "GHSA-6ff5-xppw-fx3m",
  "modified": "2022-05-17T05:24:16Z",
  "published": "2022-05-17T05:24:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2012-2990"
    },
    {
      "type": "WEB",
      "url": "http://www.kb.cert.org/vuls/id/663809"
    },
    {
      "type": "WEB",
      "url": "http://www.krcert.or.kr/kor/data/secNoticeView.jsp?p_bulletin_writing_sequence=931"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

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.