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.
8428 vulnerabilities reference this CWE, most recent first.
GHSA-4H55-J4R4-687W
Vulnerability from github – Published: 2022-05-13 01:07 – Updated: 2022-05-13 01:07Microsoft Internet Explorer 8 and 9 does not properly handle objects in memory, which allows user-assisted remote attackers to execute arbitrary code by accessing a deleted object, aka "Developer Toolbar Remote Code Execution Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2012-1874"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-06-12T22:55:00Z",
"severity": "HIGH"
},
"details": "Microsoft Internet Explorer 8 and 9 does not properly handle objects in memory, which allows user-assisted remote attackers to execute arbitrary code by accessing a deleted object, aka \"Developer Toolbar Remote Code Execution Vulnerability.\"",
"id": "GHSA-4h55-j4r4-687w",
"modified": "2022-05-13T01:07:43Z",
"published": "2022-05-13T01:07:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-1874"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2012/ms12-037"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A15425"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA12-164A.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-4H9J-F98M-P4HG
Vulnerability from github – Published: 2022-05-02 06:19 – Updated: 2025-04-11 19:59PHP remote file inclusion vulnerability in the autoloader in TYPO3 4.3.x before 4.3.3 allows remote attackers to execute arbitrary PHP code via a URL in an input field associated with the className variable.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "typo3/cms"
},
"ranges": [
{
"events": [
{
"introduced": "4.3.0"
},
{
"fixed": "4.3.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2010-1153"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-04-11T19:59:37Z",
"nvd_published_at": "2010-04-20T19:30:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in the autoloader in TYPO3 4.3.x before 4.3.3 allows remote attackers to execute arbitrary PHP code via a URL in an input field associated with the className variable.",
"id": "GHSA-4h9j-f98m-p4hg",
"modified": "2025-04-11T19:59:37Z",
"published": "2022-05-02T06:19:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-1153"
},
{
"type": "PACKAGE",
"url": "https://github.com/TYPO3/typo3"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20100813082506/http://typo3.org/teams/security/security-bulletins/typo3-sa-2010-008"
},
{
"type": "WEB",
"url": "http://marc.info/?l=oss-security\u0026m=127092306209177\u0026w=2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2010/04/12/1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"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:P",
"type": "CVSS_V4"
}
],
"summary": "TYPO3 PHP remote file inclusion vulnerability"
}
GHSA-4HMR-HM34-JJ9G
Vulnerability from github – Published: 2024-08-16 18:30 – Updated: 2024-08-16 21:32A Command Injection vulnerability exists in formWriteFacMac of the httpd binary in Tenda AC9 v15.03.06.42. As a result, attacker can execute OS commands with root privileges.
{
"affected": [],
"aliases": [
"CVE-2024-42634"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-08-16T16:15:06Z",
"severity": "CRITICAL"
},
"details": "A Command Injection vulnerability exists in formWriteFacMac of the httpd binary in Tenda AC9 v15.03.06.42. As a result, attacker can execute OS commands with root privileges.",
"id": "GHSA-4hmr-hm34-jj9g",
"modified": "2024-08-16T21:32:36Z",
"published": "2024-08-16T18:30:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-42634"
},
{
"type": "WEB",
"url": "https://github.com/goldds96/Report/blob/main/Tenda/AC9/CI.md"
}
],
"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-4HPM-V49G-RQ7Q
Vulnerability from github – Published: 2026-04-30 15:30 – Updated: 2026-06-30 03:36Insufficient validation of node IDs in Qt SVG module allows arbitrary QML/JavaScript code injection when loading malicious SVG files through the VectorImage component in Qt Quick. While QML execution is typically more restricted than native code execution, this could still lead to denial of service, information disclosure, or other impacts depending on the application's privilege level and data access.
{
"affected": [],
"aliases": [
"CVE-2025-14576"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-04-30T13:16:02Z",
"severity": "HIGH"
},
"details": "Insufficient validation of node IDs in Qt SVG module allows arbitrary QML/JavaScript code injection when loading malicious SVG files through the VectorImage component in Qt Quick. While QML execution is typically more restricted than native code execution, this could still lead to denial of service, information disclosure, or other impacts depending on the application\u0027s privilege level and data access.",
"id": "GHSA-4hpm-v49g-rq7q",
"modified": "2026-06-30T03:36:28Z",
"published": "2026-04-30T15:30:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-14576"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:20567"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:24987"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:7620"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:7846"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2025-14576"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2464114"
},
{
"type": "WEB",
"url": "https://codereview.qt-project.org/c/qt/qtdeclarative/+/697273"
},
{
"type": "WEB",
"url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-14576.json"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:U/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-4HRX-7C6V-V9V5
Vulnerability from github – Published: 2025-05-09 18:30 – Updated: 2025-05-10 03:30An issue in Victure RX1800 EN_V1.0.0_r12_110933 allows physically proximate attackers to execute arbitrary code or gain root access.
{
"affected": [],
"aliases": [
"CVE-2025-28201"
],
"database_specific": {
"cwe_ids": [
"CWE-284",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-05-09T16:15:24Z",
"severity": "MODERATE"
},
"details": "An issue in Victure RX1800 EN_V1.0.0_r12_110933 allows physically proximate attackers to execute arbitrary code or gain root access.",
"id": "GHSA-4hrx-7c6v-v9v5",
"modified": "2025-05-10T03:30:22Z",
"published": "2025-05-09T18:30:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-28201"
},
{
"type": "WEB",
"url": "https://pwnit.io/2025/02/13/finding-vulnerabilities-in-wi-fi-router"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4HV7-3Q38-97M8
Vulnerability from github – Published: 2021-04-13 15:24 – Updated: 2021-04-06 23:35This affects the package djv before 2.1.4. By controlling the schema file, an attacker can run arbitrary JavaScript code on the victim machine.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "djv"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.1.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-28464"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2021-04-06T23:35:22Z",
"nvd_published_at": "2021-01-04T12:15:00Z",
"severity": "CRITICAL"
},
"details": "This affects the package djv before 2.1.4. By controlling the schema file, an attacker can run arbitrary JavaScript code on the victim machine.",
"id": "GHSA-4hv7-3q38-97m8",
"modified": "2021-04-06T23:35:22Z",
"published": "2021-04-13T15:24:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-28464"
},
{
"type": "WEB",
"url": "https://github.com/korzio/djv/pull/98/files"
},
{
"type": "WEB",
"url": "https://github.com/korzio/djv/blob/master/lib/utils/properties.js%23L55"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-DJV-1014545"
}
],
"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": "Arbitrary code execution in djv"
}
GHSA-4HVF-VMQM-X8P3
Vulnerability from github – Published: 2022-05-13 01:05 – Updated: 2022-05-13 01:05An issue was discovered in Snap Creek Duplicator before 1.2.42. By accessing leftover installer files (installer.php and installer-backup.php), an attacker can inject PHP code into wp-config.php during the database setup step, achieving arbitrary code execution.
{
"affected": [],
"aliases": [
"CVE-2018-17207"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-09-19T16:29:00Z",
"severity": "CRITICAL"
},
"details": "An issue was discovered in Snap Creek Duplicator before 1.2.42. By accessing leftover installer files (installer.php and installer-backup.php), an attacker can inject PHP code into wp-config.php during the database setup step, achieving arbitrary code execution.",
"id": "GHSA-4hvf-vmqm-x8p3",
"modified": "2022-05-13T01:05:38Z",
"published": "2022-05-13T01:05:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-17207"
},
{
"type": "WEB",
"url": "https://snapcreek.com/duplicator/docs/changelog/?lite"
},
{
"type": "WEB",
"url": "https://www.synacktiv.com/ressources/advisories/WordPress_Duplicator-1.2.40-RCE.pdf"
}
],
"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-4HWC-M82X-XF7X
Vulnerability from github – Published: 2022-05-02 03:46 – Updated: 2022-05-02 03:46Autodesk Maya 8.0, 8.5, 2008, 2009, and 2010 and Alias Wavefront Maya 6.5 and 7.0 allow remote attackers to execute arbitrary code via a (1) .ma or (2) .mb file that uses the Maya Embedded Language (MEL) python command or unspecified other MEL commands, related to "Script Nodes."
{
"affected": [],
"aliases": [
"CVE-2009-3578"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-11-24T17:30:00Z",
"severity": "HIGH"
},
"details": "Autodesk Maya 8.0, 8.5, 2008, 2009, and 2010 and Alias Wavefront Maya 6.5 and 7.0 allow remote attackers to execute arbitrary code via a (1) .ma or (2) .mb file that uses the Maya Embedded Language (MEL) python command or unspecified other MEL commands, related to \"Script Nodes.\"",
"id": "GHSA-4hwc-m82x-xf7x",
"modified": "2022-05-02T03:46:25Z",
"published": "2022-05-02T03:46:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-3578"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1023228"
},
{
"type": "WEB",
"url": "http://www.coresecurity.com/content/maya-arbitrary-command-execution"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/508013/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/36636"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-4HX3-M8W5-G5QH
Vulnerability from github – Published: 2022-05-14 03:31 – Updated: 2024-04-24 18:32Potential remote code execution in LUA context of the redis server via methods yii\redis\ActiveRecord::findOne() and yii\redis\ActiveRecord::findAll() in yiisoft/yii2-redis. Attackers could probably manipulate data on the redis server.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "yiisoft/yii2-redis"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2018-8073"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-04-24T18:32:01Z",
"nvd_published_at": "2018-03-21T18:29:00Z",
"severity": "CRITICAL"
},
"details": "Potential remote code execution in LUA context of the redis server via methods `yii\\redis\\ActiveRecord::findOne()` and `yii\\redis\\ActiveRecord::findAll()` in yiisoft/yii2-redis. Attackers could probably manipulate data on the redis server.\n",
"id": "GHSA-4hx3-m8w5-g5qh",
"modified": "2024-04-24T18:32:01Z",
"published": "2022-05-14T03:31:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-8073"
},
{
"type": "WEB",
"url": "https://github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2-redis/CVE-2018-8073.yaml"
},
{
"type": "PACKAGE",
"url": "https://github.com/yiisoft/yii2-redis"
},
{
"type": "WEB",
"url": "https://www.yiiframework.com/news/168/releasing-yii-2-0-15-and-database-extensions-with-security-fixes"
},
{
"type": "WEB",
"url": "http://www.yiiframework.com/news/168/releasing-yii-2-0-15-and-database-extensions-with-security-fixes"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "yii2-redis Potential Remote code execution"
}
GHSA-4J25-MWCH-395M
Vulnerability from github – Published: 2022-05-13 01:28 – Updated: 2022-05-13 01:28setup/controllers/welcome.php in MODX Revolution 2.5.4-pl and earlier allows remote attackers to execute arbitrary PHP code via the config_key parameter to the setup/index.php?action=welcome URI.
{
"affected": [],
"aliases": [
"CVE-2017-7321"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-03-30T07:59:00Z",
"severity": "CRITICAL"
},
"details": "setup/controllers/welcome.php in MODX Revolution 2.5.4-pl and earlier allows remote attackers to execute arbitrary PHP code via the config_key parameter to the setup/index.php?action=welcome URI.",
"id": "GHSA-4j25-mwch-395m",
"modified": "2022-05-13T01:28:57Z",
"published": "2022-05-13T01:28:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-7321"
},
{
"type": "WEB",
"url": "https://mazinahmed.net/services/public-reports/ModX%20-%20Responsible%20Disclosure%20-%20January%202017.pdf"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/97228"
}
],
"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"
}
]
}
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.