CWE-94
Allowed-with-ReviewImproper 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.
8322 vulnerabilities reference this CWE, most recent first.
GHSA-M3C8-789M-GJ36
Vulnerability from github – Published: 2025-09-26 03:31 – Updated: 2025-09-26 03:31A security flaw has been discovered in MuYuCMS up to 2.7. Affected by this issue is some unknown functionality of the file /admin.php of the component Template Management. The manipulation results in code injection. It is possible to launch the attack remotely.
{
"affected": [],
"aliases": [
"CVE-2025-10993"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-09-26T02:15:51Z",
"severity": "MODERATE"
},
"details": "A security flaw has been discovered in MuYuCMS up to 2.7. Affected by this issue is some unknown functionality of the file /admin.php of the component Template Management. The manipulation results in code injection. It is possible to launch the attack remotely.",
"id": "GHSA-m3c8-789m-gj36",
"modified": "2025-09-26T03:31:07Z",
"published": "2025-09-26T03:31:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-10993"
},
{
"type": "WEB",
"url": "https://gitee.com/MuYuCMS/MuYuCMS/issues/ICXVCE"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.325921"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.325921"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.654014"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:L/VA:L/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"
}
]
}
GHSA-M3CR-88V9-CHGP
Vulnerability from github – Published: 2022-05-17 05:11 – Updated: 2022-05-17 05:11The exec_command function in common/helpers.py in Gajim before 0.15 allows user-assisted remote attackers to execute arbitrary commands via shell metacharacters in an href attribute.
{
"affected": [],
"aliases": [
"CVE-2012-2085"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-08-28T17:55:00Z",
"severity": "MODERATE"
},
"details": "The exec_command function in common/helpers.py in Gajim before 0.15 allows user-assisted remote attackers to execute arbitrary commands via shell metacharacters in an href attribute.",
"id": "GHSA-m3cr-88v9-chgp",
"modified": "2022-05-17T05:11:24Z",
"published": "2022-05-17T05:11:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-2085"
},
{
"type": "WEB",
"url": "https://trac.gajim.org/changeset/bc296e96ac10"
},
{
"type": "WEB",
"url": "https://trac.gajim.org/ticket/7031"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/48708"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/48794"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-201208-04.xml"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2012/04/08/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2012/04/08/2"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/52943"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-M3PQ-M926-J2H4
Vulnerability from github – Published: 2022-05-24 19:19 – Updated: 2024-03-21 03:34An issue was discovered in the character definitions of the Unicode Specification through 14.0. The specification allows an adversary to produce source code identifiers such as function names using homoglyphs that render visually identical to a target identifier. Adversaries can leverage this to inject code via adversarial identifier definitions in upstream software dependencies invoked deceptively in downstream software.
{
"affected": [],
"aliases": [
"CVE-2021-42694"
],
"database_specific": {
"cwe_ids": [
"CWE-1007",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-11-01T04:15:00Z",
"severity": "CRITICAL"
},
"details": "An issue was discovered in the character definitions of the Unicode Specification through 14.0. The specification allows an adversary to produce source code identifiers such as function names using homoglyphs that render visually identical to a target identifier. Adversaries can leverage this to inject code via adversarial identifier definitions in upstream software dependencies invoked deceptively in downstream software.",
"id": "GHSA-m3pq-m926-j2h4",
"modified": "2024-03-21T03:34:08Z",
"published": "2022-05-24T19:19:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-42694"
},
{
"type": "WEB",
"url": "https://cwe.mitre.org/data/definitions/1007.html"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/202210-09"
},
{
"type": "WEB",
"url": "https://trojansource.codes"
},
{
"type": "WEB",
"url": "https://www.kb.cert.org/vuls/id/999008"
},
{
"type": "WEB",
"url": "https://www.scyon.nl/post/trojans-in-your-source-code"
},
{
"type": "WEB",
"url": "https://www.unicode.org/reports/tr36"
},
{
"type": "WEB",
"url": "https://www.unicode.org/reports/tr39"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2021/11/01/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2021/11/01/6"
},
{
"type": "WEB",
"url": "http://www.unicode.org/versions/Unicode14.0.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-M3PW-8R3J-W5GG
Vulnerability from github – Published: 2022-05-14 03:48 – Updated: 2022-05-14 03:48SAP NetWeaver, SAP BASIS from 7.00 to 7.02, from 7.10 to 7.11, 7.30, 7.31, 7.40, from 7.50 to 7.52, contains code that allows you to execute arbitrary program code of the user's choice. A malicious user can therefore control the behaviour of the system or can potentially escalate privileges by executing malicious code without legitimate credentials.
{
"affected": [],
"aliases": [
"CVE-2018-2363"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-01-09T15:29:00Z",
"severity": "HIGH"
},
"details": "SAP NetWeaver, SAP BASIS from 7.00 to 7.02, from 7.10 to 7.11, 7.30, 7.31, 7.40, from 7.50 to 7.52, contains code that allows you to execute arbitrary program code of the user\u0027s choice. A malicious user can therefore control the behaviour of the system or can potentially escalate privileges by executing malicious code without legitimate credentials.",
"id": "GHSA-m3pw-8r3j-w5gg",
"modified": "2022-05-14T03:48:14Z",
"published": "2022-05-14T03:48:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-2363"
},
{
"type": "WEB",
"url": "https://blogs.sap.com/2018/01/09/sap-security-patch-day-january-2018"
},
{
"type": "WEB",
"url": "https://launchpad.support.sap.com/#/notes/1906212"
},
{
"type": "WEB",
"url": "https://launchpad.support.sap.com/#/notes/2525392"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/102449"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-M3R3-R24F-8HJ4
Vulnerability from github – Published: 2024-10-28 12:30 – Updated: 2026-04-01 18:32Improper Control of Generation of Code ('Code Injection') vulnerability in Scott Paterson ScottCart allows Code Injection.This issue affects ScottCart: from n/a through 1.1.
{
"affected": [],
"aliases": [
"CVE-2024-50492"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-10-28T12:15:16Z",
"severity": "HIGH"
},
"details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in Scott Paterson ScottCart allows Code Injection.This issue affects ScottCart: from n/a through 1.1.",
"id": "GHSA-m3r3-r24f-8hj4",
"modified": "2026-04-01T18:32:10Z",
"published": "2024-10-28T12:30:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-50492"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/scottcart/vulnerability/wordpress-scottcart-plugin-1-1-remote-code-execution-rce-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/scottcart/wordpress-scottcart-plugin-1-1-remote-code-execution-rce-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-M3V4-V5GX-7WF5
Vulnerability from github – Published: 2026-06-02 18:31 – Updated: 2026-06-30 21:42OpenMed before 1.5.2 contains a remote code execution vulnerability in the PII privacy-filter model loading path. The privacy-filter dispatcher used broad substring matching on the user-supplied model_name parameter, allowing a value such as attacker/foo-privacy-filter-bar to route through a path that loads Hugging Face models with trust_remote_code=True. An unauthenticated attacker can supply a malicious model repository containing custom Transformers code via auto_map in config.json or tokenizer_config.json, which is imported and executed with the privileges of the OpenMed service process.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "openmed"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.5.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-47117"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-30T21:42:32Z",
"nvd_published_at": "2026-06-02T16:16:43Z",
"severity": "CRITICAL"
},
"details": "OpenMed before 1.5.2 contains a remote code execution vulnerability in the PII privacy-filter model loading path. The privacy-filter dispatcher used broad substring matching on the user-supplied `model_name` parameter, allowing a value such as `attacker/foo-privacy-filter-bar` to route through a path that loads Hugging Face models with `trust_remote_code=True`. An unauthenticated attacker can supply a malicious model repository containing custom Transformers code via auto_map in `config.json` or `tokenizer_config.json`, which is imported and executed with the privileges of the OpenMed service process.",
"id": "GHSA-m3v4-v5gx-7wf5",
"modified": "2026-06-30T21:42:32Z",
"published": "2026-06-02T18:31:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-47117"
},
{
"type": "WEB",
"url": "https://github.com/maziyarpanahi/openmed/pull/59"
},
{
"type": "WEB",
"url": "https://github.com/maziyarpanahi/openmed/commit/98724f65df98d7518b9006e6356740aa36c2f224"
},
{
"type": "WEB",
"url": "https://github.com/maziyarpanahi/openmed/releases/tag/v1.5.2"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/openmed-remote-code-execution-via-pii-model-loading"
},
{
"type": "PACKAGE",
"url": "github.com/maziyarpanahi/openmed"
}
],
"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",
"type": "CVSS_V4"
}
],
"summary": "OpenMed vulnerable to remote code injection through privacy-filter model loading path"
}
GHSA-M3XQ-C6MF-V376
Vulnerability from github – Published: 2022-05-24 17:00 – Updated: 2022-05-24 17:00An exploitable vulnerability exists in the safe browsing function of the CUJO Smart Firewall, version 7003. The flaw lies in the way the safe browsing function parses HTTP requests. The server hostname is extracted from captured HTTP/HTTPS requests and inserted as part of a Lua statement without prior sanitization, which results in arbitrary Lua script execution in the kernel. An attacker could send an HTTP request to exploit this vulnerability.
{
"affected": [],
"aliases": [
"CVE-2018-4031"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-10-31T21:15:00Z",
"severity": "CRITICAL"
},
"details": "An exploitable vulnerability exists in the safe browsing function of the CUJO Smart Firewall, version 7003. The flaw lies in the way the safe browsing function parses HTTP requests. The server hostname is extracted from captured HTTP/HTTPS requests and inserted as part of a Lua statement without prior sanitization, which results in arbitrary Lua script execution in the kernel. An attacker could send an HTTP request to exploit this vulnerability.",
"id": "GHSA-m3xq-c6mf-v376",
"modified": "2022-05-24T17:00:08Z",
"published": "2022-05-24T17:00:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-4031"
},
{
"type": "WEB",
"url": "https://talosintelligence.com/vulnerability_reports/TALOS-2018-0703"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-M3XR-5F4W-PX4W
Vulnerability from github – Published: 2022-05-24 19:18 – Updated: 2023-07-10 21:30The affected controllers do not properly sanitize the input containing code syntax. As a result, an attacker could craft code to alter the intended controller flow of the software.
{
"affected": [],
"aliases": [
"CVE-2021-38450"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-10-27T01:15:00Z",
"severity": "HIGH"
},
"details": "The affected controllers do not properly sanitize the input containing code syntax. As a result, an attacker could craft code to alter the intended controller flow of the software.",
"id": "GHSA-m3xr-5f4w-px4w",
"modified": "2023-07-10T21:30:54Z",
"published": "2022-05-24T19:18:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-38450"
},
{
"type": "WEB",
"url": "https://us-cert.cisa.gov/ics/advisories/icsa-21-266-02"
}
],
"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-M3XV-X3PH-MQ22
Vulnerability from github – Published: 2022-03-12 00:00 – Updated: 2022-03-24 13:44A Server-side Template Injection (SSTI) vulnerability exists in Nystudio107 Seomatic prior to 3.4.12 in src/helpers/UrlHelper.php via the host header.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "nystudio107/craft-seomatic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.4.12"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-44618"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-03-14T23:21:34Z",
"nvd_published_at": "2022-03-11T16:15:00Z",
"severity": "HIGH"
},
"details": "A Server-side Template Injection (SSTI) vulnerability exists in Nystudio107 Seomatic prior to 3.4.12 in src/helpers/UrlHelper.php via the host header.",
"id": "GHSA-m3xv-x3ph-mq22",
"modified": "2022-03-24T13:44:50Z",
"published": "2022-03-12T00:00:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-44618"
},
{
"type": "WEB",
"url": "https://github.com/nystudio107/craft-seomatic/commit/0c5c0c0e0cb61000d12ec55ebf174745a5bf6469"
},
{
"type": "PACKAGE",
"url": "https://github.com/nystudio107/craft-seomatic"
},
{
"type": "WEB",
"url": "https://github.com/nystudio107/craft-seomatic/releases/tag/3.4.12"
}
],
"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"
}
],
"summary": "Server-side Template Injection in nystudio107/craft-seomatic"
}
GHSA-M43C-33MW-5X3W
Vulnerability from github – Published: 2022-05-02 03:56 – Updated: 2022-05-02 03:56Static code injection vulnerability in the administrative web interface in Accellion Secure File Transfer Appliance allows remote authenticated administrators to inject arbitrary shell commands by appending them to a request to update the SNMP public community string.
{
"affected": [],
"aliases": [
"CVE-2009-4646"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-02-19T17:30:00Z",
"severity": "HIGH"
},
"details": "Static code injection vulnerability in the administrative web interface in Accellion Secure File Transfer Appliance allows remote authenticated administrators to inject arbitrary shell commands by appending them to a request to update the SNMP public community string.",
"id": "GHSA-m43c-33mw-5x3w",
"modified": "2022-05-02T03:56:39Z",
"published": "2022-05-02T03:56:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-4646"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/38538"
},
{
"type": "WEB",
"url": "http://www.portcullis-security.com/339.php"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation
Strategy: Refactoring
Refactor your program so that you do not have to dynamically generate code.
Mitigation
- 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
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
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
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
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
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.