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.

8285 vulnerabilities reference this CWE, most recent first.

GHSA-F9VC-Q3HH-QHFV

Vulnerability from github – Published: 2020-08-31 22:56 – Updated: 2020-08-31 18:08
VLAI
Summary
Content Injection in remarkable
Details

Versions 1.4.0 and earlier of remarkable are affected by a cross-site scripting vulnerability. This occurs because vulnerable versions of remarkable did not properly whitelist link protocols, and consequently allowed javascript: to be used.

Proof of Concept

Markdown Source:

[link](<javascript:alert(1)>)

Rendered HTML:

<a href="javascript:alert(1)">link</a>

Recommendation

Update to version 1.4.1 or later

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "remarkable"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.4.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2014-10065"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-08-31T18:08:29Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "Versions 1.4.0 and earlier of `remarkable` are affected by a cross-site scripting vulnerability. This occurs because vulnerable versions of `remarkable` did not properly whitelist link protocols, and consequently allowed `javascript:` to be used. \n\n\n### Proof of Concept\n\nMarkdown Source:\n```\n[link](\u003cjavascript:alert(1)\u003e)\n```\n\nRendered HTML:\n```\n\u003ca href=\"javascript:alert(1)\"\u003elink\u003c/a\u003e\n```\n\n\n## Recommendation\n\nUpdate to version 1.4.1 or later",
  "id": "GHSA-f9vc-q3hh-qhfv",
  "modified": "2020-08-31T18:08:29Z",
  "published": "2020-08-31T22:56:00Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2014-10065"
    },
    {
      "type": "WEB",
      "url": "https://github.com/jonschlinkert/remarkable/issues/97"
    },
    {
      "type": "WEB",
      "url": "https://github.com/jonschlinkert/remarkable/commit/d54ed887f4997221cd7cb9790e953a83c504de36"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/30"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Content Injection in remarkable"
}

GHSA-F9VW-75CC-W892

Vulnerability from github – Published: 2022-05-02 06:20 – Updated: 2024-10-21 18:30
VLAI
Details

The IE8 Developer Toolbar in Microsoft Internet Explorer 8 SP1, SP2, and SP3 allows user-assisted remote attackers to execute arbitrary code by accessing an object that (1) was not properly initialized or (2) is deleted, leading to memory corruption, aka "HTML Element Memory Corruption Vulnerability."

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2010-1260"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2010-06-08T22:30:00Z",
    "severity": "HIGH"
  },
  "details": "The IE8 Developer Toolbar in Microsoft Internet Explorer 8 SP1, SP2, and SP3 allows user-assisted remote attackers to execute arbitrary code by accessing an object that (1) was not properly initialized or (2) is deleted, leading to memory corruption, aka \"HTML Element Memory Corruption Vulnerability.\"",
  "id": "GHSA-f9vw-75cc-w892",
  "modified": "2024-10-21T18:30:42Z",
  "published": "2022-05-02T06:20:45Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2010-1260"
    },
    {
      "type": "WEB",
      "url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2010/ms10-035"
    },
    {
      "type": "WEB",
      "url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6686"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/65213"
    },
    {
      "type": "WEB",
      "url": "http://support.avaya.com/css/P8/documents/100089747"
    },
    {
      "type": "WEB",
      "url": "http://www.us-cert.gov/cas/techalerts/TA10-159B.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-F9W5-9MGH-MXFM

Vulnerability from github – Published: 2026-06-16 12:32 – Updated: 2026-06-16 12:32
VLAI
Details

Improper Control of Generation of Code ('Code Injection') vulnerability in Filipe Nasc RD Station allows Remote Code Inclusion.

This issue affects RD Station: from n/a through 5.6.0.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-49774"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-06-16T10:16:27Z",
    "severity": "CRITICAL"
  },
  "details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in Filipe Nasc RD Station allows Remote Code Inclusion.\n\nThis issue affects RD Station: from n/a through 5.6.0.",
  "id": "GHSA-f9w5-9mgh-mxfm",
  "modified": "2026-06-16T12:32:01Z",
  "published": "2026-06-16T12:32:01Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-49774"
    },
    {
      "type": "WEB",
      "url": "https://patchstack.com/database/wordpress/plugin/integracao-rd-station/vulnerability/wordpress-rd-station-plugin-5-6-0-remote-code-execution-rce-vulnerability?_s_id=cve"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-F9X8-85W7-CHXV

Vulnerability from github – Published: 2024-02-13 03:30 – Updated: 2024-08-01 21:31
VLAI
Details

An issue in mystenlabs Sui Blockchain before v.1.6.3 allow a remote attacker to execute arbitrary code and cause a denial of service via a crafted compressed script to the Sui node component.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-42374"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-02-13T01:15:07Z",
    "severity": "CRITICAL"
  },
  "details": "An issue in mystenlabs Sui Blockchain before v.1.6.3 allow a remote attacker to execute arbitrary code and cause a denial of service via a crafted compressed script to the Sui node component.",
  "id": "GHSA-f9x8-85w7-chxv",
  "modified": "2024-08-01T21:31:39Z",
  "published": "2024-02-13T03:30:20Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-42374"
    },
    {
      "type": "WEB",
      "url": "https://github.com/MystenLabs/sui/commit/42d4ad103a21d23fecd7c0271453da41604e71e9"
    },
    {
      "type": "WEB",
      "url": "https://beosin.com/resources/\"memory-bomb\"-vulnerability-causes-sui-node-to-crash?lang=en-US"
    },
    {
      "type": "WEB",
      "url": "https://beosin.com/resources/%22memory-bomb%22-vulnerability-causes-sui-node-to-crash?lang=en-US"
    },
    {
      "type": "WEB",
      "url": "https://medium.com/%40Beosin_com/memory-bomb-vulnerability-causes-sui-node-to-crash-7e8e3ef5057c"
    },
    {
      "type": "WEB",
      "url": "https://medium.com/@Beosin_com/memory-bomb-vulnerability-causes-sui-node-to-crash-7e8e3ef5057c"
    }
  ],
  "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-FC3X-FWMH-VHJX

Vulnerability from github – Published: 2022-05-13 01:10 – Updated: 2022-05-13 01:10
VLAI
Details

ownCloud Desktop before 2.2.3 allows local users to execute arbitrary code and possibly gain privileges via a Trojan library in a "special path" in the C: drive.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2016-7102"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2017-01-23T21:59:00Z",
    "severity": "HIGH"
  },
  "details": "ownCloud Desktop before 2.2.3 allows local users to execute arbitrary code and possibly gain privileges via a Trojan library in a \"special path\" in the C: drive.",
  "id": "GHSA-fc3x-fwmh-vhjx",
  "modified": "2022-05-13T01:10:57Z",
  "published": "2022-05-13T01:10:57Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2016-7102"
    },
    {
      "type": "WEB",
      "url": "https://owncloud.org/security/advisory/?id=oc-sa-2016-016"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/92627"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-FC47-2QQ8-V2V9

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

PHP remote file inclusion vulnerability lib/base.php in actSite 1.991 Beta allows remote attackers to execute arbitrary PHP code via a URL in the BaseCfg[BaseDir] parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-5175"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-10-03T14:17:00Z",
    "severity": "MODERATE"
  },
  "details": "PHP remote file inclusion vulnerability lib/base.php in actSite 1.991 Beta allows remote attackers to execute arbitrary PHP code via a URL in the BaseCfg[BaseDir] parameter.",
  "id": "GHSA-fc47-2qq8-v2v9",
  "modified": "2022-05-01T18:30:43Z",
  "published": "2022-05-01T18:30:43Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5175"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36868"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/4473"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/25868"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2007/3318"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-FC59-Q457-V9G7

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

Multiple PHP remote file inclusion vulnerabilities in PHP Project Management 0.8.10 and earlier allow remote attackers to execute arbitrary PHP code via a URL in the full_path parameter to (1) certinfo/index.php, (2) emails/index.php, (3) events/index.php, (4) fax/index.php, (5) files/index.php, (6) files/list.php, (7) groupadm/index.php, (8) history/index.php, (9) info/index.php, (10) log/index.php, (11) mail/index.php, (12) messages/index.php, (13) organizations/index.php, (14) phones/index.php, (15) presence/index.php, (16) projects/index.php, (17) projects/summary.inc.php, (18) projects/list.php, (19) reports/index.php, (20) search/index.php, (21) snf/index.php, (22) syslog/index.php, (23) tasks/searchsimilar.php, (24) tasks/index.php, (25) tasks/summary.inc.php, and (26) useradm/index.php in modules; (27) /ajax/loadsplash.php; (28) /blocks/birthday.php; (29) /blocks/events.php; and (30) /blocks/help.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-5641"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-10-23T21:47:00Z",
    "severity": "MODERATE"
  },
  "details": "Multiple PHP remote file inclusion vulnerabilities in PHP Project Management 0.8.10 and earlier allow remote attackers to execute arbitrary PHP code via a URL in the full_path parameter to (1) certinfo/index.php, (2) emails/index.php, (3) events/index.php, (4) fax/index.php, (5) files/index.php, (6) files/list.php, (7) groupadm/index.php, (8) history/index.php, (9) info/index.php, (10) log/index.php, (11) mail/index.php, (12) messages/index.php, (13) organizations/index.php, (14) phones/index.php, (15) presence/index.php, (16) projects/index.php, (17) projects/summary.inc.php, (18) projects/list.php, (19) reports/index.php, (20) search/index.php, (21) snf/index.php, (22) syslog/index.php, (23) tasks/searchsimilar.php, (24) tasks/index.php, (25) tasks/summary.inc.php, and (26) useradm/index.php in modules; (27) /ajax/loadsplash.php; (28) /blocks/birthday.php; (29) /blocks/events.php; and (30) /blocks/help.php.",
  "id": "GHSA-fc59-q457-v9g7",
  "modified": "2022-05-01T18:35:22Z",
  "published": "2022-05-01T18:35:22Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5641"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/37347"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/4549"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41905"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41906"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41907"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41908"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41909"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41910"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41912"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41913"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41914"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41917"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41918"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41920"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41925"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41927"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41928"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41931"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41934"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41957"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41975"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/27347"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/26150"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-FC6Q-RXQX-RPP6

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

WinZip before 11.0 does not properly verify the authenticity of updates, which allows man-in-the-middle attackers to execute arbitrary code via a Trojan horse update, as demonstrated by evilgrade and DNS cache poisoning.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-3442"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2008-08-01T14:41:00Z",
    "severity": "HIGH"
  },
  "details": "WinZip before 11.0 does not properly verify the authenticity of updates, which allows man-in-the-middle attackers to execute arbitrary code via a Trojan horse update, as demonstrated by evilgrade and DNS cache poisoning.",
  "id": "GHSA-fc6q-rxqx-rpp6",
  "modified": "2022-05-02T00:00:11Z",
  "published": "2022-05-02T00:00:11Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-3442"
    },
    {
      "type": "WEB",
      "url": "http://archives.neohapsis.com/archives/bugtraq/2008-07/0250.html"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1020581"
    },
    {
      "type": "WEB",
      "url": "http://www.infobyte.com.ar/down/Francisco%20Amato%20-%20evilgrade%20-%20ENG.pdf"
    },
    {
      "type": "WEB",
      "url": "http://www.infobyte.com.ar/down/isr-evilgrade-1.0.0.tar.gz"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-FC6Q-XMRF-7JX4

Vulnerability from github – Published: 2024-05-15 18:30 – Updated: 2025-01-16 18:30
VLAI
Details

In Progress® Telerik® Reporting versions prior to 2024 Q2 (18.1.24.514), a code execution attack is possible through an insecure instantiation vulnerability.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-4202"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-05-15T17:15:15Z",
    "severity": "HIGH"
  },
  "details": "In Progress\u00ae Telerik\u00ae Reporting versions prior to 2024 Q2 (18.1.24.514), a code execution attack is possible through an insecure instantiation vulnerability.",
  "id": "GHSA-fc6q-xmrf-7jx4",
  "modified": "2025-01-16T18:30:58Z",
  "published": "2024-05-15T18:30:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-4202"
    },
    {
      "type": "WEB",
      "url": "https://docs.telerik.com/reporting/knowledge-base/instantiation-vulnerability-cve-2024-4202"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-FC7R-G457-HVGM

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

The form API in Drupal 6.x before 6.29 and 7.x before 7.24, when used with unspecified third-party modules, performs form validation even when CSRF validation has failed, which might allow remote attackers to trigger application-specific impacts such as arbitrary code execution via application-specific vectors.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2013-6385"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2013-12-07T21:55:00Z",
    "severity": "MODERATE"
  },
  "details": "The form API in Drupal 6.x before 6.29 and 7.x before 7.24, when used with unspecified third-party modules, performs form validation even when CSRF validation has failed, which might allow remote attackers to trigger application-specific impacts such as arbitrary code execution via application-specific vectors.",
  "id": "GHSA-fc7r-g457-hvgm",
  "modified": "2022-05-17T04:54:42Z",
  "published": "2022-05-17T04:54:42Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2013-6385"
    },
    {
      "type": "WEB",
      "url": "https://drupal.org/SA-CORE-2013-003"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/56148"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2013/dsa-2804"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2013/dsa-2828"
    },
    {
      "type": "WEB",
      "url": "http://www.openwall.com/lists/oss-security/2013/11/22/4"
    }
  ],
  "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.