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-6VRJ-8GXV-3R7W

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

Argument injection vulnerability in Request Tracker (RT) 3.8.x before 3.8.15 and 4.0.x before 4.0.8 allows remote attackers to create arbitrary files via unspecified vectors related to the GnuPG client.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2012-4884"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2012-11-11T13:00:00Z",
    "severity": "MODERATE"
  },
  "details": "Argument injection vulnerability in Request Tracker (RT) 3.8.x before 3.8.15 and 4.0.x before 4.0.8 allows remote attackers to create arbitrary files via unspecified vectors related to the GnuPG client.",
  "id": "GHSA-6vrj-8gxv-3r7w",
  "modified": "2022-05-17T05:18:46Z",
  "published": "2022-05-17T05:18:46Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2012-4884"
    },
    {
      "type": "WEB",
      "url": "http://lists.bestpractical.com/pipermail/rt-announce/2012-October/000212.html"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2012/dsa-2567"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6VRV-PVC8-F6CM

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

security/xamppsecurity.php in XAMPP 1.6.8 performs an extract operation on the SERVER superglobal array, which allows remote attackers to spoof critical variables, as demonstrated by setting the REMOTE_ADDR variable to 127.0.0.1.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-6499"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-03-20T00:30:00Z",
    "severity": "MODERATE"
  },
  "details": "security/xamppsecurity.php in XAMPP 1.6.8 performs an extract operation on the SERVER superglobal array, which allows remote attackers to spoof critical variables, as demonstrated by setting the REMOTE_ADDR variable to 127.0.0.1.",
  "id": "GHSA-6vrv-pvc8-f6cm",
  "modified": "2022-05-17T00:39:19Z",
  "published": "2022-05-17T00:39:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6499"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/47202"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/7384"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6VX9-M878-J4X6

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

JsLink in Webswing before 2.6.12 LTS, and 2.7.x and 20.x before 20.1, allows remote code execution.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-11103"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2020-12-30T21:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "JsLink in Webswing before 2.6.12 LTS, and 2.7.x and 20.x before 20.1, allows remote code execution.",
  "id": "GHSA-6vx9-m878-j4x6",
  "modified": "2022-05-24T17:37:36Z",
  "published": "2022-05-24T17:37:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-11103"
    },
    {
      "type": "WEB",
      "url": "https://bitbucket.org/meszarv/webswing/issues/375/webswing-jslink-mechanism-remote-code"
    },
    {
      "type": "WEB",
      "url": "https://www.webswing.org/docs/2.6/discover/release_notes.html#release-notes-2-6-12"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6W3P-6VXH-3M74

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

PHP remote file inclusion vulnerability in assets/snippets/reflect/snippet.reflect.php in MODx CMS 0.9.6.2 and earlier, when magic_quotes_gpc is disabled, allows remote attackers to execute arbitrary PHP code via a URL in the reflect_base parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-5938"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-01-22T11:30:00Z",
    "severity": "MODERATE"
  },
  "details": "PHP remote file inclusion vulnerability in assets/snippets/reflect/snippet.reflect.php in MODx CMS 0.9.6.2 and earlier, when magic_quotes_gpc is disabled, allows remote attackers to execute arbitrary PHP code via a URL in the reflect_base parameter.",
  "id": "GHSA-6w3p-6vxh-3m74",
  "modified": "2022-05-17T00:42:05Z",
  "published": "2022-05-17T00:42:05Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-5938"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/46797"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/7204"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/32824"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/4940"
    },
    {
      "type": "WEB",
      "url": "http://svn.modxcms.com/svn/tattoo/tattoo/releases/0.9.6.3/install/changelog.txt"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/32436"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2008/3236"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6W64-QV3W-W28W

Vulnerability from github – Published: 2022-05-01 23:53 – Updated: 2022-05-01 23:53
VLAI
Details

PHP remote file inclusion vulnerability in authentication/smf/smf.functions.php in Simple Machines phpRaider 1.0.6 and 1.0.7 allows remote attackers to execute arbitrary PHP code via a URL in the pConfig_auth[smf_path] parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-2769"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2008-06-18T22:41:00Z",
    "severity": "HIGH"
  },
  "details": "PHP remote file inclusion vulnerability in authentication/smf/smf.functions.php in Simple Machines phpRaider 1.0.6 and 1.0.7 allows remote attackers to execute arbitrary PHP code via a URL in the pConfig_auth[smf_path] parameter.",
  "id": "GHSA-6w64-qv3w-w28w",
  "modified": "2022-05-01T23:53:22Z",
  "published": "2022-05-01T23:53:22Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2769"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42996"
    },
    {
      "type": "WEB",
      "url": "http://forums.phpraider.com/showthread.php?t=1087#v1_0_7b_-_May_29__2008"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/3947"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/493275/100/0/threaded"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6W6G-QXCW-FFC5

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

The Microsoft Bing application before 4.2.1 for Android allows remote attackers to install arbitrary APK files via vectors involving a crafted DNS response.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2014-1670"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2014-01-25T16:55:00Z",
    "severity": "MODERATE"
  },
  "details": "The Microsoft Bing application before 4.2.1 for Android allows remote attackers to install arbitrary APK files via vectors involving a crafted DNS response.",
  "id": "GHSA-6w6g-qxcw-ffc5",
  "modified": "2025-04-11T04:18:31Z",
  "published": "2022-05-14T04:01:02Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2014-1670"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/90977"
    },
    {
      "type": "WEB",
      "url": "https://play.google.com/store/apps/details?id=com.microsoft.bing"
    },
    {
      "type": "WEB",
      "url": "http://blog.trustlook.com/2014/01/23/trustlook-reported-microsofts-first-ever-android-vulnerability"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/102575"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/65128"
    },
    {
      "type": "WEB",
      "url": "http://www.youtube.com/watch?v=_j1RKtTxZ3k"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6W7R-F23M-5RVH

Vulnerability from github – Published: 2024-11-04 18:31 – Updated: 2024-11-06 00:31
VLAI
Details

A Host header injection vulnerability in Agile-Board 1.0 allows attackers to obtain the password reset token via user interaction with a crafted password reset link.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-51329"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-11-04T18:15:05Z",
    "severity": "HIGH"
  },
  "details": "A Host header injection vulnerability in Agile-Board 1.0 allows attackers to obtain the password reset token via user interaction with a crafted password reset link.",
  "id": "GHSA-6w7r-f23m-5rvh",
  "modified": "2024-11-06T00:31:55Z",
  "published": "2024-11-04T18:31:24Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-51329"
    },
    {
      "type": "WEB",
      "url": "https://github.com/idrsdev/agile-board/tree/main"
    },
    {
      "type": "WEB",
      "url": "https://github.com/redtrib3/CVEs/tree/main/CVE-2024-51329%20-%20Host%20Header%20Injection"
    }
  ],
  "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:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-6WGJ-FXQF-WXJ2

Vulnerability from github – Published: 2023-12-01 09:30 – Updated: 2023-12-01 09:30
VLAI
Details

An issue has been discovered in GitLab affecting all versions before 16.4.3, all versions starting from 16.5 before 16.5.3, all versions starting from 16.6 before 16.6.1. Under certain circumstances, a malicious actor bypass prohibited branch checks using a specially crafted branch name to manipulate repository content in the UI.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-5226"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-12-01T07:15:12Z",
    "severity": "MODERATE"
  },
  "details": "An issue has been discovered in GitLab affecting all versions before 16.4.3, all versions starting from 16.5 before 16.5.3, all versions starting from 16.6 before 16.6.1. Under certain circumstances, a malicious actor bypass prohibited branch checks using a specially crafted branch name to manipulate repository content in the UI.",
  "id": "GHSA-6wgj-fxqf-wxj2",
  "modified": "2023-12-01T09:30:44Z",
  "published": "2023-12-01T09:30:44Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-5226"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/2173053"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.com/gitlab-org/gitlab/-/issues/426400"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-6WGV-WJFV-42F8

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

Microsoft Office Outlook 2002 SP3, 2003 SP3, and 2007 SP1 and SP2 does not properly verify e-mail attachments with a PR_ATTACH_METHOD property value of ATTACH_BY_REFERENCE, which allows user-assisted remote attackers to execute arbitrary code via a crafted message, aka "Microsoft Outlook SMB Attachment Vulnerability."

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2010-0266"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2010-07-15T12:57:00Z",
    "severity": "HIGH"
  },
  "details": "Microsoft Office Outlook 2002 SP3, 2003 SP3, and 2007 SP1 and SP2 does not properly verify e-mail attachments with a PR_ATTACH_METHOD property value of ATTACH_BY_REFERENCE, which allows user-assisted remote attackers to execute arbitrary code via a crafted message, aka \"Microsoft Outlook SMB Attachment Vulnerability.\"",
  "id": "GHSA-6wgv-wjfv-42f8",
  "modified": "2022-05-02T06:11:16Z",
  "published": "2022-05-02T06:11:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2010-0266"
    },
    {
      "type": "WEB",
      "url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2010/ms10-045"
    },
    {
      "type": "WEB",
      "url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11623"
    },
    {
      "type": "WEB",
      "url": "http://www.us-cert.gov/cas/techalerts/TA10-194A.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-6WHG-VMMP-79GX

Vulnerability from github – Published: 2022-05-17 00:12 – Updated: 2025-04-11 03:56
VLAI
Details

Xunlei Thunder before 7.2.6 allows remote attackers to execute arbitrary code via a crafted file, related to a "DLL injection vulnerability."

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2012-2224"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2012-04-11T10:39:00Z",
    "severity": "HIGH"
  },
  "details": "Xunlei Thunder before 7.2.6 allows remote attackers to execute arbitrary code via a crafted file, related to a \"DLL injection vulnerability.\"",
  "id": "GHSA-6whg-vmmp-79gx",
  "modified": "2025-04-11T03:56:49Z",
  "published": "2022-05-17T00:12:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2012-2224"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/74811"
    },
    {
      "type": "WEB",
      "url": "http://blog.vulnhunt.com/index.php/2012/03/06/cal-2012-0006xunlei-dll-injection-vulnerability"
    },
    {
      "type": "WEB",
      "url": "http://safe.xunlei.com/announce/xl20120306.html"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/53191"
    }
  ],
  "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.