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.

8467 vulnerabilities reference this CWE, most recent first.

GHSA-2XXG-J453-5C23

Vulnerability from github – Published: 2022-05-24 17:12 – Updated: 2022-09-28 00:00
VLAI
Details

A code injection in Nextcloud Desktop Client 2.6.2 for macOS allowed to load arbitrary code when starting the client with DYLD_INSERT_LIBRARIES set in the environment.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-8140"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2020-03-20T21:15:00Z",
    "severity": "MODERATE"
  },
  "details": "A code injection in Nextcloud Desktop Client 2.6.2 for macOS allowed to load arbitrary code when starting the client with DYLD_INSERT_LIBRARIES set in the environment.",
  "id": "GHSA-2xxg-j453-5c23",
  "modified": "2022-09-28T00:00:22Z",
  "published": "2022-05-24T17:12:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-8140"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/633266"
    },
    {
      "type": "WEB",
      "url": "https://nextcloud.com/security/advisory/?id=NC-SA-2020-016"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-2XXM-3J3X-786W

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

Argument injection vulnerability in Enomaly Elastic Computing Platform (ECP), formerly Enomalism, before 2.1.1 allows local users to send signals to arbitrary processes by populating the /tmp/enomalism2.pid file with command-line arguments for the kill program.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2009-0390"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-02-02T22:30:00Z",
    "severity": "HIGH"
  },
  "details": "Argument injection vulnerability in Enomaly Elastic Computing Platform (ECP), formerly Enomalism, before 2.1.1 allows local users to send signals to arbitrary processes by populating the /tmp/enomalism2.pid file with command-line arguments for the kill program.",
  "id": "GHSA-2xxm-3j3x-786w",
  "modified": "2022-05-02T03:15:05Z",
  "published": "2022-05-02T03:15:05Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0390"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/500573/100/0/threaded"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-322F-WQW7-87Q6

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

Multiple PHP remote file inclusion vulnerabilities in HIOX Browser Statistics (HBS) 2.0 allow remote attackers to execute arbitrary PHP code via a URL in the hm parameter to (1) hioxupdate.php and (2) hioxstats.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-3402"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2008-07-31T16:41:00Z",
    "severity": "HIGH"
  },
  "details": "Multiple PHP remote file inclusion vulnerabilities in HIOX Browser Statistics (HBS) 2.0 allow remote attackers to execute arbitrary PHP code via a URL in the hm parameter to (1) hioxupdate.php and (2) hioxstats.php.",
  "id": "GHSA-322f-wqw7-87q6",
  "modified": "2022-05-01T23:59:45Z",
  "published": "2022-05-01T23:59:45Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-3402"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/44064"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/6162"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/31299"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/4083"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/494930/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/30436"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-3233-8P6G-FXQ5

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

Foreman before 1.1 allows remote attackers to execute arbitrary code via a crafted YAML object to the (1) fact or (2) report import API.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2013-0171"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2014-05-08T14:29:00Z",
    "severity": "HIGH"
  },
  "details": "Foreman before 1.1 allows remote attackers to execute arbitrary code via a crafted YAML object to the (1) fact or (2) report import API.",
  "id": "GHSA-3233-8p6g-fxq5",
  "modified": "2022-05-05T02:48:31Z",
  "published": "2022-05-05T02:48:31Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2013-0171"
    },
    {
      "type": "WEB",
      "url": "http://projects.theforeman.org/issues/2069"
    },
    {
      "type": "WEB",
      "url": "http://theforeman.org/security.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-323W-6P85-26FR

Vulnerability from github – Published: 2025-03-12 18:32 – Updated: 2025-03-12 21:58
VLAI
Summary
Duplicate Advisory: Plenti - Code Injection - Denial of Services
Details

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-mj4v-hp69-27x5. This link is maintained to preserve external references.

Original Description

Plenti <= 0.7.16 is vulnerable to code execution. Users uploading '.svelte' files with the /postLocal endpoint can define the file name as javascript codes. The server executes the uploaded file name in host, and cause code execution.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c 0.7.17"
      },
      "package": {
        "ecosystem": "Go",
        "name": "github.com/plentico/plenti"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-03-12T21:58:24Z",
    "nvd_published_at": "2025-03-12T16:15:23Z",
    "severity": "MODERATE"
  },
  "details": "# Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-mj4v-hp69-27x5. This link is maintained to preserve external references.\n\n# Original Description\nPlenti \u003c= 0.7.16 is vulnerable to code execution. Users uploading \u0027.svelte\u0027 files with the /postLocal endpoint can define the file name as javascript codes. The server executes the uploaded file name in host, and cause code execution.",
  "id": "GHSA-323w-6p85-26fr",
  "modified": "2025-03-12T21:58:24Z",
  "published": "2025-03-12T18:32:53Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/plentico/plenti/security/advisories/GHSA-mj4v-hp69-27x5"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-26260"
    },
    {
      "type": "WEB",
      "url": "https://github.com/plentico/plenti/commit/c3e72a9ebbc2a03f4b0f3104becbfc25e390cb8e"
    },
    {
      "type": "WEB",
      "url": "https://ahmetakan.com/2025/02/14/cve-2025-26260"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ahmetak4n/vulnerability-playground/tree/main/vulnerability-research/CVE-2025-26260"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/plentico/plenti"
    },
    {
      "type": "WEB",
      "url": "https://github.com/plentico/plenti/releases/tag/v0.7.17"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Duplicate Advisory: Plenti  - Code Injection - Denial of Services",
  "withdrawn": "2025-03-12T21:58:24Z"
}

GHSA-3263-6J5Q-9QMJ

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

Adobe Reader and Acrobat 10.x before 10.1.13 and 11.x before 11.0.10 on Windows and OS X allow attackers to execute arbitrary code or cause a denial of service (memory corruption) via unspecified vectors, a different vulnerability than CVE-2014-8445, CVE-2014-8446, CVE-2014-8447, CVE-2014-8456, CVE-2014-8458, CVE-2014-8459, and CVE-2014-8461.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2014-9158"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2014-12-10T21:59:00Z",
    "severity": "HIGH"
  },
  "details": "Adobe Reader and Acrobat 10.x before 10.1.13 and 11.x before 11.0.10 on Windows and OS X allow attackers to execute arbitrary code or cause a denial of service (memory corruption) via unspecified vectors, a different vulnerability than CVE-2014-8445, CVE-2014-8446, CVE-2014-8447, CVE-2014-8456, CVE-2014-8458, CVE-2014-8459, and CVE-2014-8461.",
  "id": "GHSA-3263-6j5q-9qmj",
  "modified": "2022-05-17T04:20:14Z",
  "published": "2022-05-17T04:20:14Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2014-9158"
    },
    {
      "type": "WEB",
      "url": "http://helpx.adobe.com/security/products/reader/apsb14-28.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-328R-MQRG-8JF9

Vulnerability from github – Published: 2022-05-17 04:41 – Updated: 2025-04-12 12:34
VLAI
Details

The av-centerd SOAP service in AlienVault OSSIM before 4.8.0 allows remote attackers to execute arbitrary code via a crafted remote_task request, related to injecting an ssh public key.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2014-4152"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2014-06-18T19:55:00Z",
    "severity": "HIGH"
  },
  "details": "The av-centerd SOAP service in AlienVault OSSIM before 4.8.0 allows remote attackers to execute arbitrary code via a crafted remote_task request, related to injecting an ssh public key.",
  "id": "GHSA-328r-mqrg-8jf9",
  "modified": "2025-04-12T12:34:57Z",
  "published": "2022-05-17T04:41:49Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2014-4152"
    },
    {
      "type": "WEB",
      "url": "http://forums.alienvault.com/discussion/2806"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/59112"
    },
    {
      "type": "WEB",
      "url": "http://www.zerodayinitiative.com/advisories/ZDI-14-206"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-32CW-V82J-575W

Vulnerability from github – Published: 2022-06-16 00:00 – Updated: 2025-01-02 21:31
VLAI
Details

Windows Encrypting File System (EFS) Remote Code Execution Vulnerability.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-30145"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-06-15T22:15:00Z",
    "severity": "HIGH"
  },
  "details": "Windows Encrypting File System (EFS) Remote Code Execution Vulnerability.",
  "id": "GHSA-32cw-v82j-575w",
  "modified": "2025-01-02T21:31:37Z",
  "published": "2022-06-16T00:00:18Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-30145"
    },
    {
      "type": "WEB",
      "url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2022-30145"
    },
    {
      "type": "WEB",
      "url": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2022-30145"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-32FP-MQG5-24WV

Vulnerability from github – Published: 2022-02-17 00:00 – Updated: 2022-02-25 00:01
VLAI
Details

PHP Everywhere <= 2.0.3 included functionality that allowed execution of PHP Code Snippets via WordPress metaboxes, which could be used by any user able to edit posts.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-24664"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-02-16T17:15:00Z",
    "severity": "HIGH"
  },
  "details": "PHP Everywhere \u003c= 2.0.3 included functionality that allowed execution of PHP Code Snippets via WordPress metaboxes, which could be used by any user able to edit posts.",
  "id": "GHSA-32fp-mqg5-24wv",
  "modified": "2022-02-25T00:01:21Z",
  "published": "2022-02-17T00:00:28Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-24664"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/blog/2022/02/critical-vulnerabilities-in-php-everywhere-allow-remote-code-execution"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-32G8-V8QX-8C7W

Vulnerability from github – Published: 2026-08-04 21:30 – Updated: 2026-08-04 21:30
VLAI
Details

MaxSite CMS contains a remote code execution vulnerability that allows unauthenticated attackers to inject arbitrary PHP code into the application configuration file by submitting crafted POST requests to the install endpoint after installation is complete. Attackers can supply a malicious db_dbprefix value containing a single quote to break out of a PHP string literal in application/config/database.php, appending attacker-controlled PHP statements that are executed by the web server on every subsequent request, resulting in persistent unauthenticated remote code execution as the web-server process user.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-70553"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-08-04T20:16:56Z",
    "severity": "CRITICAL"
  },
  "details": "MaxSite CMS contains a remote code execution vulnerability that allows unauthenticated attackers to inject arbitrary PHP code into the application configuration file by submitting crafted POST requests to the install endpoint after installation is complete. Attackers can supply a malicious db_dbprefix value containing a single quote to break out of a PHP string literal in application/config/database.php, appending attacker-controlled PHP statements that are executed by the web server on every subsequent request, resulting in persistent unauthenticated remote code execution as the web-server process user.",
  "id": "GHSA-32g8-v8qx-8c7w",
  "modified": "2026-08-04T21:30:30Z",
  "published": "2026-08-04T21:30:30Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-70553"
    },
    {
      "type": "WEB",
      "url": "https://github.com/maxsite/cms"
    },
    {
      "type": "WEB",
      "url": "https://max-3000.com/page/maxsite-cms-109-6"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/maxsite-cms-unauthenticated-rce-via-install-endpoint"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

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.