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.
8339 vulnerabilities reference this CWE, most recent first.
GHSA-2J3G-P2X2-C94Q
Vulnerability from github – Published: 2023-09-25 18:30 – Updated: 2024-04-04 07:50The Import XML and RSS Feeds WordPress plugin before 2.1.5 contains a web shell, allowing unauthenticated attackers to perform RCE. The plugin/vendor was not compromised and the files are the result of running a PoC for a previously reported issue (https://wpscan.com/vulnerability/d4220025-2272-4d5f-9703-4b2ac4a51c42) and not deleting the created files when releasing the new version.
{
"affected": [],
"aliases": [
"CVE-2023-4521"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-09-25T16:15:15Z",
"severity": "CRITICAL"
},
"details": "The Import XML and RSS Feeds WordPress plugin before 2.1.5 contains a web shell, allowing unauthenticated attackers to perform RCE. The plugin/vendor was not compromised and the files are the result of running a PoC for a previously reported issue (https://wpscan.com/vulnerability/d4220025-2272-4d5f-9703-4b2ac4a51c42) and not deleting the created files when releasing the new version.",
"id": "GHSA-2j3g-p2x2-c94q",
"modified": "2024-04-04T07:50:39Z",
"published": "2023-09-25T18:30:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-4521"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/de2cdb38-3a9f-448e-b564-a798d1e93481"
}
],
"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-2J3X-FVGP-V399
Vulnerability from github – Published: 2025-06-11 21:30 – Updated: 2025-06-11 21:30Remote code execution vulnerability in RSForm!pro component 3.0.0 - 3.3.14 for Joomla was discovered. The issue occurs within the submission export feature and requires administrative access to the export feature.
{
"affected": [],
"aliases": [
"CVE-2025-30085"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-06-11T20:15:22Z",
"severity": "CRITICAL"
},
"details": "Remote code execution vulnerability in RSForm!pro component 3.0.0 - 3.3.14 for Joomla was discovered. The issue occurs within the submission export feature and requires administrative access to the export feature.",
"id": "GHSA-2j3x-fvgp-v399",
"modified": "2025-06-11T21:30:40Z",
"published": "2025-06-11T21:30:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-30085"
},
{
"type": "WEB",
"url": "https://rsjoomla.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/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:N/AU:N/R:X/V:X/RE:L/U:Clear",
"type": "CVSS_V4"
}
]
}
GHSA-2JC3-9523-WWMJ
Vulnerability from github – Published: 2022-05-01 17:41 – Updated: 2022-05-01 17:41The Javascript SVG support in Opera before 9.10 does not properly validate object types in a createSVGTransformFromMatrix request, which allows remote attackers to execute arbitrary code via JavaScript code that uses an invalid object in this request that causes a controlled pointer to be referenced during the virtual function call.
{
"affected": [],
"aliases": [
"CVE-2007-0127"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-01-09T02:28:00Z",
"severity": "HIGH"
},
"details": "The Javascript SVG support in Opera before 9.10 does not properly validate object types in a createSVGTransformFromMatrix request, which allows remote attackers to execute arbitrary code via JavaScript code that uses an invalid object in this request that causes a controlled pointer to be referenced during the virtual function call.",
"id": "GHSA-2jc3-9523-wwmj",
"modified": "2022-05-01T17:41:50Z",
"published": "2022-05-01T17:41:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-0127"
},
{
"type": "WEB",
"url": "http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=458"
},
{
"type": "WEB",
"url": "http://lists.suse.com/archive/suse-security-announce/2007-Jan/0009.html"
},
{
"type": "WEB",
"url": "http://osvdb.org/31575"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/23613"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/23739"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/23771"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1017473"
},
{
"type": "WEB",
"url": "http://www.gentoo.org/security/en/glsa/glsa-200701-08.xml"
},
{
"type": "WEB",
"url": "http://www.opera.com/support/search/supsearch.dml?index=851"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/0060"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2JF4-28JV-3RG7
Vulnerability from github – Published: 2024-10-25 21:31 – Updated: 2024-10-29 21:30MangoOS before 5.2.0 was discovered to contain a Client-Side Template Injection (CSTI) vulnerability via the Platform Management Edit page.
{
"affected": [],
"aliases": [
"CVE-2024-37846"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-10-25T19:15:04Z",
"severity": "CRITICAL"
},
"details": "MangoOS before 5.2.0 was discovered to contain a Client-Side Template Injection (CSTI) vulnerability via the Platform Management Edit page.",
"id": "GHSA-2jf4-28jv-3rg7",
"modified": "2024-10-29T21:30:48Z",
"published": "2024-10-25T21:31:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-37846"
},
{
"type": "WEB",
"url": "https://github.com/herombey/Disclosures/blob/main/CVE-2024-37846-CSTI.pdf"
},
{
"type": "WEB",
"url": "https://github.com/herombey/Disclosures/tree/main"
}
],
"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-2JFW-8CWJ-3579
Vulnerability from github – Published: 2024-11-29 18:34 – Updated: 2024-12-03 18:31In RaspAP raspap-webgui 3.0.9 and earlier, a command injection vulnerability exists in the clearlog.php script. The vulnerability is due to improper sanitization of user input passed via the logfile parameter.
{
"affected": [],
"aliases": [
"CVE-2024-36622"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-29T18:15:08Z",
"severity": "CRITICAL"
},
"details": "In RaspAP raspap-webgui 3.0.9 and earlier, a command injection vulnerability exists in the clearlog.php script. The vulnerability is due to improper sanitization of user input passed via the logfile parameter.",
"id": "GHSA-2jfw-8cwj-3579",
"modified": "2024-12-03T18:31:03Z",
"published": "2024-11-29T18:34:03Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-36622"
},
{
"type": "WEB",
"url": "https://github.com/raspap/raspap-webgui/commit/c98d2b0c15942b4829d31dec615b9b40cc6faa14#diff-939ee414d82245c3b3dd7d36b57f10706e06e8f0871b24bdcf9de6e0d181c4c9"
},
{
"type": "WEB",
"url": "https://gist.github.com/1047524396/ab997b902ec892e592a0df93f38e6941"
},
{
"type": "WEB",
"url": "https://github.com/RaspAP/raspap-webgui/blob/3.0.9/ajax/logging/clearlog.php"
}
],
"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-2JHX-JVPP-RF85
Vulnerability from github – Published: 2022-05-01 18:36 – Updated: 2022-05-01 18:36Unrestricted file upload vulnerability in the profiles script in ProfileCMS 1.0 allows remote attackers to upload and execute arbitrary PHP code via unspecified vectors involving creation of a profile.
{
"affected": [],
"aliases": [
"CVE-2007-5720"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-10-30T21:46:00Z",
"severity": "MODERATE"
},
"details": "Unrestricted file upload vulnerability in the profiles script in ProfileCMS 1.0 allows remote attackers to upload and execute arbitrary PHP code via unspecified vectors involving creation of a profile.",
"id": "GHSA-2jhx-jvpp-rf85",
"modified": "2022-05-01T18:36:08Z",
"published": "2022-05-01T18:36:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5720"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/38185"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4586"
},
{
"type": "WEB",
"url": "http://osvdb.org/45297"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/26242"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2JQ2-VRJ7-9MWC
Vulnerability from github – Published: 2022-05-01 07:27 – Updated: 2022-05-01 07:27PHP remote file inclusion vulnerability in common/visiteurs/include/menus.inc.php in J-Pierre DEZELUS Les Visiteurs 2.0.1, as used in phpMyConferences (phpMyConference) 8.0.2 and possibly other products, allows remote attackers to execute arbitrary PHP code via a URL in the lvc_include_dir parameter.
{
"affected": [],
"aliases": [
"CVE-2006-5310"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-10-17T16:07:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in common/visiteurs/include/menus.inc.php in J-Pierre DEZELUS Les Visiteurs 2.0.1, as used in phpMyConferences (phpMyConference) 8.0.2 and possibly other products, allows remote attackers to execute arbitrary PHP code via a URL in the lvc_include_dir parameter.",
"id": "GHSA-2jq2-vrj7-9mwc",
"modified": "2022-05-01T07:27:08Z",
"published": "2022-05-01T07:27:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-5310"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/29514"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2535"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/22411"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/1733"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/448547/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20505"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/4045"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2JQF-JWG5-2MM3
Vulnerability from github – Published: 2022-05-14 02:34 – Updated: 2022-05-14 02:34Microsoft Word 2003 SP3 and Word Viewer allow remote attackers to execute arbitrary code via crafted shape data in a Word document, aka "Word Shape Corruption Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2013-1335"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-05-15T03:36:00Z",
"severity": "HIGH"
},
"details": "Microsoft Word 2003 SP3 and Word Viewer allow remote attackers to execute arbitrary code via crafted shape data in a Word document, aka \"Word Shape Corruption Vulnerability.\"",
"id": "GHSA-2jqf-jwg5-2mm3",
"modified": "2022-05-14T02:34:41Z",
"published": "2022-05-14T02:34:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-1335"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2013/ms13-043"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A16229"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/ncas/alerts/TA13-134A"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2JQP-F4GR-44FR
Vulnerability from github – Published: 2026-06-15 21:30 – Updated: 2026-06-19 20:48remotion-dev remotion v4.0.409 was discovered to contain a remote code execution (RCE) vulnerability.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "remotion"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.0.410"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-30120"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-19T20:48:03Z",
"nvd_published_at": "2026-06-15T20:16:25Z",
"severity": "CRITICAL"
},
"details": "remotion-dev remotion v4.0.409 was discovered to contain a remote code execution (RCE) vulnerability.",
"id": "GHSA-2jqp-f4gr-44fr",
"modified": "2026-06-19T20:48:03Z",
"published": "2026-06-15T21:30:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-30120"
},
{
"type": "WEB",
"url": "https://github.com/remotion-dev/remotion/pull/6378"
},
{
"type": "WEB",
"url": "https://github.com/EaEa0001/security-advisories/blob/main/CVE-2026-30120.md"
},
{
"type": "PACKAGE",
"url": "https://github.com/remotion-dev/remotion"
},
{
"type": "WEB",
"url": "https://github.com/remotion-dev/remotion/releases/tag/v4.0.410"
}
],
"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": "Remotion: remote code execution (RCE) vulnerability"
}
GHSA-2JRM-GWW7-WCH2
Vulnerability from github – Published: 2022-05-24 17:40 – Updated: 2024-04-23 23:37It was found in Moodle before version 3.10.1, 3.9.4, 3.8.7 and 3.5.16 that it was possible for site administrators to execute arbitrary PHP scripts via a PHP include used during Shibboleth authentication.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "moodle/moodle"
},
"ranges": [
{
"events": [
{
"introduced": "3.5"
},
{
"fixed": "3.5.16"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "moodle/moodle"
},
"ranges": [
{
"events": [
{
"introduced": "3.8"
},
{
"fixed": "3.8.7"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "moodle/moodle"
},
"ranges": [
{
"events": [
{
"introduced": "3.9"
},
{
"fixed": "3.9.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "moodle/moodle"
},
"ranges": [
{
"events": [
{
"introduced": "3.10"
},
{
"fixed": "3.10.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-20187"
],
"database_specific": {
"cwe_ids": [
"CWE-829",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-04-23T23:37:33Z",
"nvd_published_at": "2021-01-28T19:15:00Z",
"severity": "HIGH"
},
"details": "It was found in Moodle before version 3.10.1, 3.9.4, 3.8.7 and 3.5.16 that it was possible for site administrators to execute arbitrary PHP scripts via a PHP include used during Shibboleth authentication.",
"id": "GHSA-2jrm-gww7-wch2",
"modified": "2024-04-23T23:37:33Z",
"published": "2022-05-24T17:40:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-20187"
},
{
"type": "PACKAGE",
"url": "https://github.com/moodle/moodle"
},
{
"type": "WEB",
"url": "https://moodle.org/mod/forum/discuss.php?d=417171"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Moodle Arbitrary PHP code execution by site admins via Shibboleth configuration"
}
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.