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.
8357 vulnerabilities reference this CWE, most recent first.
GHSA-3W6J-5MC4-753Q
Vulnerability from github – Published: 2022-05-01 23:27 – Updated: 2022-05-01 23:27Unspecified vulnerability in Microsoft Internet Explorer 5.01, 6 SP1 and SP2, and 7 allows remote attackers to execute arbitrary code via crafted HTML layout combinations, aka "HTML Rendering Memory Corruption Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2008-0076"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-02-12T23:00:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in Microsoft Internet Explorer 5.01, 6 SP1 and SP2, and 7 allows remote attackers to execute arbitrary code via crafted HTML layout combinations, aka \"HTML Rendering Memory Corruption Vulnerability.\"",
"id": "GHSA-3w6j-5mc4-753q",
"modified": "2022-05-01T23:27:33Z",
"published": "2022-05-01T23:27:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-0076"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2008/ms08-010"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A5487"
},
{
"type": "WEB",
"url": "http://marc.info/?l=bugtraq\u0026m=120361015026386\u0026w=2"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/28903"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/27668"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1019379"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA08-043C.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/0512/references"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-3W6V-5J67-JJ7H
Vulnerability from github – Published: 2023-11-14 03:30 – Updated: 2023-11-17 18:30An issue in Yasukawa memberscard v.13.6.1 allows attackers to send crafted notifications via leakage of the channel access token.
{
"affected": [],
"aliases": [
"CVE-2023-45560"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-11-14T03:15:09Z",
"severity": "HIGH"
},
"details": "An issue in Yasukawa memberscard v.13.6.1 allows attackers to send crafted notifications via leakage of the channel access token.",
"id": "GHSA-3w6v-5j67-jj7h",
"modified": "2023-11-17T18:30:50Z",
"published": "2023-11-14T03:30:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-45560"
},
{
"type": "WEB",
"url": "https://github.com/syz913/CVE-reports/blob/main/CVE-2023-45560.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-3W7R-GHXM-95W6
Vulnerability from github – Published: 2022-05-02 06:11 – Updated: 2022-05-02 06:11Microsoft Office Visio 2002 SP2, 2003 SP3, and 2007 SP1 and SP2 does not properly calculate unspecified indexes associated with Visio files, which allows remote attackers to execute arbitrary code via a crafted file, aka "Visio Index Calculation Memory Corruption Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2010-0256"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-04-14T16:00:00Z",
"severity": "HIGH"
},
"details": "Microsoft Office Visio 2002 SP2, 2003 SP3, and 2007 SP1 and SP2 does not properly calculate unspecified indexes associated with Visio files, which allows remote attackers to execute arbitrary code via a crafted file, aka \"Visio Index Calculation Memory Corruption Vulnerability.\"",
"id": "GHSA-3w7r-ghxm-95w6",
"modified": "2022-05-02T06:11:15Z",
"published": "2022-05-02T06:11:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-0256"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2010/ms10-028"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6732"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA10-103A.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-3W86-J9MV-8FPR
Vulnerability from github – Published: 2022-05-02 03:17 – Updated: 2022-05-02 03:17images/captcha.php in Raven Web Services RavenNuke 2.30, when register_globals and display_errors are enabled, allows remote attackers to determine the existence of local files by sending requests with full pathnames in the aFonts array parameter, and then observing the error messages, which differ between existing and nonexistent pathnames.
{
"affected": [],
"aliases": [
"CVE-2009-0674"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-22T22:30:00Z",
"severity": "MODERATE"
},
"details": "images/captcha.php in Raven Web Services RavenNuke 2.30, when register_globals and display_errors are enabled, allows remote attackers to determine the existence of local files by sending requests with full pathnames in the aFonts array parameter, and then observing the error messages, which differ between existing and nonexistent pathnames.",
"id": "GHSA-3w86-j9mv-8fpr",
"modified": "2022-05-02T03:17:24Z",
"published": "2022-05-02T03:17:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0674"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/48792"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/48983"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/8068"
},
{
"type": "WEB",
"url": "http://ravenphpscripts.com/postt17156.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/500988/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/33787"
},
{
"type": "WEB",
"url": "http://www.waraxe.us/advisory-72.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-3W9C-VCRH-MVP2
Vulnerability from github – Published: 2022-05-01 07:12 – Updated: 2026-02-25 21:31Integer overflow in Microsoft Internet Explorer 6 on Windows XP SP2 allows remote attackers to cause a denial of service (crash) and execute arbitrary code via a 0x7fffffff argument to the setSlice method on a WebViewFolderIcon ActiveX object, which leads to an invalid memory copy.
{
"affected": [],
"aliases": [
"CVE-2006-3730"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-07-21T14:03:00Z",
"severity": "HIGH"
},
"details": "Integer overflow in Microsoft Internet Explorer 6 on Windows XP SP2 allows remote attackers to cause a denial of service (crash) and execute arbitrary code via a 0x7fffffff argument to the setSlice method on a WebViewFolderIcon ActiveX object, which leads to an invalid memory copy.",
"id": "GHSA-3w9c-vcrh-mvp2",
"modified": "2026-02-25T21:31:14Z",
"published": "2022-05-01T07:12:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-3730"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2006/ms06-057"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/27804"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A339"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2440"
},
{
"type": "WEB",
"url": "http://browserfun.blogspot.com/2006/07/mobb-18-webviewfoldericon-setslice.html"
},
{
"type": "WEB",
"url": "http://isc.sans.org/diary.php?storyid=1742"
},
{
"type": "WEB",
"url": "http://riosec.com/msie-setslice-vuln"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/22159"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1016941"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/753044"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/27110"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/447174/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/447383/100/100/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/447426/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/447490/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/449179/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/19030"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA06-270A.html"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA06-283A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/2882"
}
],
"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:H",
"type": "CVSS_V3"
}
]
}
GHSA-3WCF-84JQ-4RXX
Vulnerability from github – Published: 2024-02-29 18:30 – Updated: 2024-08-26 21:30An issue discovered in pdfmake 0.2.9 allows remote attackers to run arbitrary code via crafted POST request to the path '/pdf'.
{
"affected": [],
"aliases": [
"CVE-2024-25180"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-29T18:15:16Z",
"severity": "CRITICAL"
},
"details": "An issue discovered in pdfmake 0.2.9 allows remote attackers to run arbitrary code via crafted POST request to the path \u0027/pdf\u0027.",
"id": "GHSA-3wcf-84jq-4rxx",
"modified": "2024-08-26T21:30:32Z",
"published": "2024-02-29T18:30:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-25180"
},
{
"type": "WEB",
"url": "https://github.com/bpampuch/pdfmake/issues/2702"
},
{
"type": "WEB",
"url": "https://github.com/joaoviictorti/My-CVES/blob/main/CVE-2024-25180/README.md"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/SNYK-JS-PDFMAKE-6347243"
},
{
"type": "WEB",
"url": "https://www.youtube.com/watch?v=QcOlrWUGo6o"
}
],
"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-3WCH-5XM2-547F
Vulnerability from github – Published: 2024-08-12 15:30 – Updated: 2025-11-04 00:31An administrator with restricted permissions can exploit the script execution functionality within the Monitoring Hosts section. The lack of default escaping for script parameters enabled this user ability to execute arbitrary code via the Ping script, thereby compromising infrastructure.
{
"affected": [],
"aliases": [
"CVE-2024-22116"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-08-12T13:38:15Z",
"severity": "CRITICAL"
},
"details": "An administrator with restricted permissions can exploit the script execution functionality within the Monitoring Hosts section. The lack of default escaping for script parameters enabled this user ability to execute arbitrary code via the Ping script, thereby compromising infrastructure.",
"id": "GHSA-3wch-5xm2-547f",
"modified": "2025-11-04T00:31:11Z",
"published": "2024-08-12T15:30:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22116"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2024/10/msg00000.html"
},
{
"type": "WEB",
"url": "https://support.zabbix.com/browse/ZBX-25016"
}
],
"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-3WF7-83Q3-948C
Vulnerability from github – Published: 2025-02-13 00:33 – Updated: 2025-02-14 20:38Cross Site Scripting vulnerability in Alex Tselegidis EasyAppointments v.1.5.0 allows a remote attacker to execute arbitrary code via the legal_settings parameter.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "alextselegidis/easyappointments"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.5.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-57601"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-02-14T20:38:03Z",
"nvd_published_at": "2025-02-12T22:15:40Z",
"severity": "MODERATE"
},
"details": "Cross Site Scripting vulnerability in Alex Tselegidis EasyAppointments v.1.5.0 allows a remote attacker to execute arbitrary code via the legal_settings parameter.",
"id": "GHSA-3wf7-83q3-948c",
"modified": "2025-02-14T20:38:04Z",
"published": "2025-02-13T00:33:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-57601"
},
{
"type": "PACKAGE",
"url": "https://github.com/alextselegidis/easyappointments"
},
{
"type": "WEB",
"url": "https://hkohi.ca/vulnerability/13"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "Remote code execution in alextselegidis/easyappointments"
}
GHSA-3WHC-2JM3-W8GR
Vulnerability from github – Published: 2023-05-28 00:30 – Updated: 2023-05-28 00:30Code Injection in GitHub repository openemr/openemr prior to 7.0.1.
{
"affected": [],
"aliases": [
"CVE-2023-2943"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-05-27T22:15:10Z",
"severity": "MODERATE"
},
"details": "Code Injection in GitHub repository openemr/openemr prior to 7.0.1.",
"id": "GHSA-3whc-2jm3-w8gr",
"modified": "2023-05-28T00:30:25Z",
"published": "2023-05-28T00:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-2943"
},
{
"type": "WEB",
"url": "https://github.com/openemr/openemr/commit/c1c0805696ca68577c37bf30e29f90e5f3e0f1a9"
},
{
"type": "WEB",
"url": "https://huntr.dev/bounties/4190f944-dc2c-4624-9abf-31479456faa9"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-3WJ8-VP9H-RM6M
Vulnerability from github – Published: 2021-03-19 21:32 – Updated: 2023-09-13 20:23total.js is a framework for Node.js platfrom written in pure JavaScript similar to PHP's Laravel or Python's Django or ASP.NET MVC. It can be used as web, desktop, service or IoT application.
Affected versions of this package are vulnerable to Remote Code Execution (RCE) via set.
PoC
// To be run in a nodejs console:
require('total.js/utils').set({}, 'a;eval(`require("child_process")\\x2eexecSync("touch pwned")`);//')
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 3.4.7"
},
"package": {
"ecosystem": "npm",
"name": "total.js"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.4.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-23344"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2021-03-12T22:42:43Z",
"nvd_published_at": "2021-03-04T17:15:00Z",
"severity": "CRITICAL"
},
"details": "total.js is a framework for Node.js platfrom written in pure JavaScript similar to PHP\u0027s Laravel or Python\u0027s Django or ASP.NET MVC. It can be used as web, desktop, service or IoT application.\n\nAffected versions of this package are vulnerable to Remote Code Execution (RCE) via `set`.\n\n### PoC\n```js\n// To be run in a nodejs console: \nrequire(\u0027total.js/utils\u0027).set({}, \u0027a;eval(`require(\"child_process\")\\\\x2eexecSync(\"touch pwned\")`);//\u0027)\n```",
"id": "GHSA-3wj8-vp9h-rm6m",
"modified": "2023-09-13T20:23:10Z",
"published": "2021-03-19T21:32:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23344"
},
{
"type": "WEB",
"url": "https://github.com/totaljs/framework/commit/c812bbcab8981797d3a1b9993fc42dad3d246f04"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-TOTALJS-1077069"
}
],
"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": "total.js Remote Code Execution Vulnerability"
}
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.