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-HMQC-M95C-6FJW

Vulnerability from github – Published: 2025-01-13 18:31 – Updated: 2025-01-13 21:30
VLAI
Details

MonicaHQ v4.1.2 was discovered to contain a Client-Side Injection vulnerability via the last_name parameter the General Information module.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-54999"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-01-13T17:15:17Z",
    "severity": "MODERATE"
  },
  "details": "MonicaHQ v4.1.2 was discovered to contain a Client-Side Injection vulnerability via the last_name parameter the General Information module.",
  "id": "GHSA-hmqc-m95c-6fjw",
  "modified": "2025-01-13T21:30:53Z",
  "published": "2025-01-13T18:31:55Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-54999"
    },
    {
      "type": "WEB",
      "url": "https://github.com/p314dO/CVEs/tree/main/CVE-2024-54999"
    },
    {
      "type": "WEB",
      "url": "http://monicahq.com"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-HMVJ-GC9Q-MG9P

Vulnerability from github – Published: 2022-05-04 00:29 – Updated: 2024-03-05 19:29
VLAI
Summary
Apache Struts's DebuggingInterceptor component allows remote code execution in developer mode
Details

The DebuggingInterceptor component in Apache Struts before 2.3.1.1, when developer mode is used, allows remote attackers to execute arbitrary commands via unspecified vectors. NOTE: the vendor characterizes this behavior as not "a security vulnerability itself."

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.apache.struts.xwork:xwork-core"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.3.18"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2012-0394"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-12-27T20:24:30Z",
    "nvd_published_at": "2012-01-08T15:55:00Z",
    "severity": "MODERATE"
  },
  "details": "The DebuggingInterceptor component in Apache Struts before 2.3.1.1, when developer mode is used, allows remote attackers to execute arbitrary commands via unspecified vectors.  NOTE: the vendor characterizes this behavior as not \"a security vulnerability itself.\"",
  "id": "GHSA-hmvj-gc9q-mg9p",
  "modified": "2024-03-05T19:29:51Z",
  "published": "2022-05-04T00:29:43Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2012-0394"
    },
    {
      "type": "WEB",
      "url": "https://github.com/apache/struts/commit/34c80dae734e70f13c0e46f9c83602fb71318e58"
    },
    {
      "type": "WEB",
      "url": "https://github.com/apache/struts/commit/9cad25f258bb2629d263f828574d2671366c238d"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/apache/struts"
    },
    {
      "type": "WEB",
      "url": "https://issues.apache.org/jira/browse/WW-3729"
    },
    {
      "type": "WEB",
      "url": "https://www.sec-consult.com/files/20120104-0_Apache_Struts2_Multiple_Critical_Vulnerabilities.txt"
    },
    {
      "type": "WEB",
      "url": "http://archives.neohapsis.com/archives/bugtraq/2012-01/0031.html"
    },
    {
      "type": "WEB",
      "url": "http://struts.apache.org/2.x/docs/s2-008.html"
    },
    {
      "type": "WEB",
      "url": "http://struts.apache.org/2.x/docs/version-notes-2311.html"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/18329"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/31434"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Apache Struts\u0027s DebuggingInterceptor component allows remote code execution in developer mode"
}

GHSA-HMW4-XHRQ-3643

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

Eval injection vulnerability in the translation module (translator.php) in SiteBar 3.3.8 allows remote authenticated users to execute arbitrary PHP code via the edit parameter in an upd cmd action, a different vulnerability than CVE-2007-5492.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-5693"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-10-29T20:46:00Z",
    "severity": "MODERATE"
  },
  "details": "Eval injection vulnerability in the translation module (translator.php) in SiteBar 3.3.8 allows remote authenticated users to execute arbitrary PHP code via the edit parameter in an upd cmd action, a different vulnerability than CVE-2007-5492.",
  "id": "GHSA-hmw4-xhrq-3643",
  "modified": "2022-05-01T18:35:48Z",
  "published": "2022-05-01T18:35:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5693"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/43604"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/27503"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/28008"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/3318"
    },
    {
      "type": "WEB",
      "url": "http://teamforge.net/viewcvs/viewcvs.cgi/tags/release-3.3.9/doc/history.txt?view=markup"
    },
    {
      "type": "WEB",
      "url": "http://www.debian.org/security/2007/dsa-1423"
    },
    {
      "type": "WEB",
      "url": "http://www.gentoo.org/security/en/glsa/glsa-200711-05.xml"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/482499/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/26126"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2007/3768"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-HMWX-RCQ4-8MF2

Vulnerability from github – Published: 2024-10-31 21:31 – Updated: 2025-06-12 18:31
VLAI
Details

Qualitor v8.24 was discovered to contain a remote code execution (RCE) vulnerability via the gridValoresPopHidden parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-48359"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-10-31T20:15:05Z",
    "severity": "CRITICAL"
  },
  "details": "Qualitor v8.24 was discovered to contain a remote code execution (RCE) vulnerability via the gridValoresPopHidden parameter.",
  "id": "GHSA-hmwx-rcq4-8mf2",
  "modified": "2025-06-12T18:31:07Z",
  "published": "2024-10-31T21:31:45Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-48359"
    },
    {
      "type": "WEB",
      "url": "https://github.com/OpenXP-Research/CVE-2024-48359"
    },
    {
      "type": "WEB",
      "url": "https://www.qualitor.com.br/official-security-advisory-cve-2024-48359"
    }
  ],
  "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-HMXF-PQC3-JXH9

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

CMS Made Simple (CMSMS) through 2.2.7 contains an arbitrary code execution vulnerability in the admin dashboard because the implementation uses "eval('function testfunction'.rand()" and it is possible to bypass certain restrictions on these "testfunction" functions.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2018-10086"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2018-04-13T05:29:00Z",
    "severity": "HIGH"
  },
  "details": "CMS Made Simple (CMSMS) through 2.2.7 contains an arbitrary code execution vulnerability in the admin dashboard because the implementation uses \"eval(\u0027function testfunction\u0027.rand()\" and it is possible to bypass certain restrictions on these \"testfunction\" functions.",
  "id": "GHSA-hmxf-pqc3-jxh9",
  "modified": "2022-05-13T01:48:41Z",
  "published": "2022-05-13T01:48:41Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-10086"
    },
    {
      "type": "WEB",
      "url": "https://github.com/itodaro/cve/blob/master/README.md"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-HP23-354F-RH79

Vulnerability from github – Published: 2022-05-01 18:30 – Updated: 2024-03-21 03:32
VLAI
Details

** DISPUTED ** PHP remote file inclusion vulnerability in init.php in Jens Tkotz myIpacNG-stats (MINGS) 0.05 allows remote attackers to execute arbitrary PHP code via a URL in the MINGS_BASE parameter. NOTE: this issue is disputed by CVE because MINGS_BASE is defined before use.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2007-5165"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2007-10-01T05:17:00Z",
    "severity": "MODERATE"
  },
  "details": "** DISPUTED **  PHP remote file inclusion vulnerability in init.php in Jens Tkotz myIpacNG-stats (MINGS) 0.05 allows remote attackers to execute arbitrary PHP code via a URL in the MINGS_BASE parameter.  NOTE: this issue is disputed by CVE because MINGS_BASE is defined before use.",
  "id": "GHSA-hp23-354f-rh79",
  "modified": "2024-03-21T03:32:58Z",
  "published": "2022-05-01T18:30:41Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5165"
    },
    {
      "type": "WEB",
      "url": "http://arfis.wordpress.com/2007/09/14/rfi-02-myipacng-stats"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/41058"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-HP2R-HJVJ-MQ3F

Vulnerability from github – Published: 2024-08-08 00:31 – Updated: 2024-08-08 15:31
VLAI
Details

Attackers with a valid username and password can exploit a python code injection vulnerability during the natural login flow.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-6891"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-08-08T00:15:40Z",
    "severity": "HIGH"
  },
  "details": "Attackers with a valid username and password can exploit a python code injection vulnerability during the natural login flow.",
  "id": "GHSA-hp2r-hjvj-mq3f",
  "modified": "2024-08-08T15:31:30Z",
  "published": "2024-08-08T00:31:44Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-6891"
    },
    {
      "type": "WEB",
      "url": "https://korelogic.com/Resources/Advisories/KL-001-2024-008.txt"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-HP3P-7892-F222

Vulnerability from github – Published: 2024-06-24 00:34 – Updated: 2024-07-03 18:46
VLAI
Details

In Emacs before 29.4, org-link-expand-abbrev in lisp/ol.el expands a %(...) link abbrev even when it specifies an unsafe function, such as shell-command-to-string. This affects Org Mode before 9.7.5.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-39331"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-06-23T22:15:09Z",
    "severity": "CRITICAL"
  },
  "details": "In Emacs before 29.4, org-link-expand-abbrev in lisp/ol.el expands a %(...) link abbrev even when it specifies an unsafe function, such as shell-command-to-string. This affects Org Mode before 9.7.5.",
  "id": "GHSA-hp3p-7892-f222",
  "modified": "2024-07-03T18:46:22Z",
  "published": "2024-06-24T00:34:02Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-39331"
    },
    {
      "type": "WEB",
      "url": "https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29"
    },
    {
      "type": "WEB",
      "url": "https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f4cc61636947b5c2f0afc67174dd369fe3277aa8"
    },
    {
      "type": "WEB",
      "url": "https://list.orgmode.org/87sex5gdqc.fsf%40localhost"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00023.html"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00024.html"
    },
    {
      "type": "WEB",
      "url": "https://lists.gnu.org/archive/html/info-gnu-emacs/2024-06/msg00000.html"
    },
    {
      "type": "WEB",
      "url": "https://news.ycombinator.com/item?id=40768225"
    },
    {
      "type": "WEB",
      "url": "https://www.openwall.com/lists/oss-security/2024/06/23/1"
    },
    {
      "type": "WEB",
      "url": "https://www.openwall.com/lists/oss-security/2024/06/23/2"
    }
  ],
  "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-HP4V-X6CX-HQR2

Vulnerability from github – Published: 2022-05-17 01:18 – Updated: 2025-04-12 12:45
VLAI
Details

radexecd.exe in Persistent Systems Radia Client Automation (RCA) 7.9, 8.1, 9.0, and 9.1 allows remote attackers to execute arbitrary commands via a crafted request to TCP port 3465.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2015-1497"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2015-02-16T15:59:00Z",
    "severity": "HIGH"
  },
  "details": "radexecd.exe in Persistent Systems Radia Client Automation (RCA) 7.9, 8.1, 9.0, and 9.1 allows remote attackers to execute arbitrary commands via a crafted request to TCP port 3465.",
  "id": "GHSA-hp4v-x6cx-hqr2",
  "modified": "2025-04-12T12:45:24Z",
  "published": "2022-05-17T01:18:30Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2015-1497"
    },
    {
      "type": "WEB",
      "url": "https://support.accelerite.com/hc/en-us/articles/203659814-Accelerite-releases-solutions-and-best-practices-to-enhance-the-security-for-RBAC-and-Remote-Notify-features"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/40491"
    },
    {
      "type": "WEB",
      "url": "http://osvdb.org/show/osvdb/118382"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/130459/HP-Client-Automation-Command-Injection.html"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/36169"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/36206"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/72612"
    },
    {
      "type": "WEB",
      "url": "http://www.zerodayinitiative.com/advisories/ZDI-15-038"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-HP64-58G8-MPVW

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

The RSS Reader component in Cybozu Garoon 3.x through 3.7.5 and 4.x through 4.0.3 allows remote authenticated users to execute arbitrary PHP code via unspecified vectors, aka CyVDB-866.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2015-5647"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-94"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2015-10-12T10:59:00Z",
    "severity": "HIGH"
  },
  "details": "The RSS Reader component in Cybozu Garoon 3.x through 3.7.5 and 4.x through 4.0.3 allows remote authenticated users to execute arbitrary PHP code via unspecified vectors, aka CyVDB-866.",
  "id": "GHSA-hp64-58g8-mpvw",
  "modified": "2022-05-17T04:04:46Z",
  "published": "2022-05-17T04:04:46Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2015-5647"
    },
    {
      "type": "WEB",
      "url": "https://support.cybozu.com/ja-jp/article/8810"
    },
    {
      "type": "WEB",
      "url": "http://jvn.jp/en/jp/JVN21025396/374951/index.html"
    },
    {
      "type": "WEB",
      "url": "http://jvn.jp/en/jp/JVN21025396/index.html"
    },
    {
      "type": "WEB",
      "url": "http://jvndb.jvn.jp/jvndb/JVNDB-2015-000151"
    }
  ],
  "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.