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.
8376 vulnerabilities reference this CWE, most recent first.
GHSA-825H-XJ3W-32G6
Vulnerability from github – Published: 2022-05-17 04:59 – Updated: 2022-05-17 04:59tpp 1.3.1 allows remote attackers to execute arbitrary commands via a --exec command in a TPP template file.
{
"affected": [],
"aliases": [
"CVE-2013-2208"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-10-28T22:55:00Z",
"severity": "MODERATE"
},
"details": "tpp 1.3.1 allows remote attackers to execute arbitrary commands via a --exec command in a TPP template file.",
"id": "GHSA-825h-xj3w-32g6",
"modified": "2022-05-17T04:59:13Z",
"published": "2022-05-17T04:59:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-2208"
},
{
"type": "WEB",
"url": "https://github.com/akrennmair/tpp/pull/2"
},
{
"type": "WEB",
"url": "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706644"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-201309-19.xml"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2013/06/21/4"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-826W-4J66-RWMR
Vulnerability from github – Published: 2022-05-02 03:13 – Updated: 2022-05-02 03:13Microsoft Office PowerPoint 2000 SP3, 2002 SP3, and 2003 SP3 allows remote attackers to execute arbitrary code via crafted sound data in a file that uses a PowerPoint 4.0 native file format, leading to memory corruption, aka "Legacy File Format Vulnerability," a different vulnerability than CVE-2009-0222, CVE-2009-0226, CVE-2009-0227, and CVE-2009-1137.
{
"affected": [],
"aliases": [
"CVE-2009-0223"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-05-12T22:30:00Z",
"severity": "HIGH"
},
"details": "Microsoft Office PowerPoint 2000 SP3, 2002 SP3, and 2003 SP3 allows remote attackers to execute arbitrary code via crafted sound data in a file that uses a PowerPoint 4.0 native file format, leading to memory corruption, aka \"Legacy File Format Vulnerability,\" a different vulnerability than CVE-2009-0222, CVE-2009-0226, CVE-2009-0227, and CVE-2009-1137.",
"id": "GHSA-826w-4j66-rwmr",
"modified": "2022-05-02T03:13:41Z",
"published": "2022-05-02T03:13:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0223"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-017"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6269"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/32428"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/34834"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1022205"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA09-132A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1290"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-827F-M9XX-4CFW
Vulnerability from github – Published: 2022-05-24 17:34 – Updated: 2022-08-05 00:00Go before 1.14.12 and 1.15.x before 1.15.5 allows Argument Injection.
{
"affected": [],
"aliases": [
"CVE-2020-28367"
],
"database_specific": {
"cwe_ids": [
"CWE-88",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-11-18T17:15:00Z",
"severity": "CRITICAL"
},
"details": "Go before 1.14.12 and 1.15.x before 1.15.5 allows Argument Injection.",
"id": "GHSA-827f-m9xx-4cfw",
"modified": "2022-08-05T00:00:28Z",
"published": "2022-05-24T17:34:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-28367"
},
{
"type": "WEB",
"url": "https://github.com/golang/go/issues/42556"
},
{
"type": "WEB",
"url": "https://go.dev/cl/267277"
},
{
"type": "WEB",
"url": "https://go.dev/issue/42556"
},
{
"type": "WEB",
"url": "https://go.googlesource.com/go/+/da7aa86917811a571e6634b45a457f918b8e6561"
},
{
"type": "WEB",
"url": "https://groups.google.com/g/golang-announce/c/NpBGTTmKzpM"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread.html/rd02e75766cd333a0df417588460f5e4477060633000bfe94955851fd@%3Cissues.trafficcontrol.apache.org%3E"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2020/11/msg00038.html"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2023/04/msg00021.html"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2W4COUPL3YVTZ6RTEIT6LPBDJUFF3VSP"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F3ZSHGNTJWCWYAKY5OLZS2XQQYHSXSUO"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2022-0476"
},
{
"type": "WEB",
"url": "https://security.gentoo.org/glsa/202208-02"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20201202-0004"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-828P-92R7-XW6X
Vulnerability from github – Published: 2025-07-14 00:31 – Updated: 2025-11-03 21:34SugarCRM before 13.0.4 and 14.x before 14.0.1 allows SSRF in the API module because a limited type of code injection can occur.
{
"affected": [],
"aliases": [
"CVE-2024-58258"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-13T22:15:23Z",
"severity": "HIGH"
},
"details": "SugarCRM before 13.0.4 and 14.x before 14.0.1 allows SSRF in the API module because a limited type of code injection can occur.",
"id": "GHSA-828p-92r7-xw6x",
"modified": "2025-11-03T21:34:06Z",
"published": "2025-07-14T00:31:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-58258"
},
{
"type": "WEB",
"url": "https://support.sugarcrm.com/resources/security/sugarcrm-sa-2024-059"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2025/Jul/21"
}
],
"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:N",
"type": "CVSS_V3"
}
]
}
GHSA-8294-MRXJ-H85P
Vulnerability from github – Published: 2022-05-01 23:28 – Updated: 2022-05-01 23:28Unrestricted file upload vulnerability in ajaxfilemanager.php in the Wp-FileManager 1.2 plugin for WordPress allows remote attackers to upload and execute arbitrary PHP code via unspecified vectors.
{
"affected": [],
"aliases": [
"CVE-2008-0222"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-01-10T23:46:00Z",
"severity": "HIGH"
},
"details": "Unrestricted file upload vulnerability in ajaxfilemanager.php in the Wp-FileManager 1.2 plugin for WordPress allows remote attackers to upload and execute arbitrary PHP code via unspecified vectors.",
"id": "GHSA-8294-mrxj-h85p",
"modified": "2022-05-01T23:28:27Z",
"published": "2022-05-01T23:28:27Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-0222"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/39462"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4844"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/27151"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-829M-7F46-R3J5
Vulnerability from github – Published: 2022-05-17 00:33 – Updated: 2025-04-20 03:39An issue was discovered in the OpenWebif plugin through 1.2.4 for E2 open devices. The saveConfig function of "plugin/controllers/models/config.py" performs an eval() call on the contents of the "key" HTTP GET parameter. This allows an unauthenticated remote attacker to execute arbitrary Python code or OS commands via api/saveconfig.
{
"affected": [],
"aliases": [
"CVE-2017-9807"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-06-22T03:29:00Z",
"severity": "CRITICAL"
},
"details": "An issue was discovered in the OpenWebif plugin through 1.2.4 for E2 open devices. The saveConfig function of \"plugin/controllers/models/config.py\" performs an eval() call on the contents of the \"key\" HTTP GET parameter. This allows an unauthenticated remote attacker to execute arbitrary Python code or OS commands via api/saveconfig.",
"id": "GHSA-829m-7f46-r3j5",
"modified": "2025-04-20T03:39:25Z",
"published": "2022-05-17T00:33:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-9807"
},
{
"type": "WEB",
"url": "https://github.com/E2OpenPlugins/e2openplugin-OpenWebif/issues/620"
},
{
"type": "WEB",
"url": "https://census-labs.com/news/2017/10/02/e2openplugin-openwebif-saveconfig-remote-code-execution"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2017/10/02/4"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/99232"
}
],
"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"
}
]
}
GHSA-82G8-464F-2MV7
Vulnerability from github – Published: 2026-02-27 21:36 – Updated: 2026-03-12 17:30Summary
applySkillConfigEnvOverrides previously copied skills.entries.*.env values into the host process.env without applying the host env safety policy.
Impact
In affected versions, dangerous process-level variables such as NODE_OPTIONS could be injected when unset, which can influence runtime/child-process behavior.
Required attacker capability
An attacker must be able to modify OpenClaw local state/config (for example ~/.openclaw/openclaw.json) to set skills.entries.<skill>.env or related skill config values.
Remediation
Fixed in 2026.2.21 by sanitizing skill env overrides and blocking dangerous host env keys (including NODE_OPTIONS) before applying overrides, with regression tests covering blocked dangerous keys.
Fix Commit(s)
8c9f35cdb51692b650ddf05b259ccdd75cc9a83c
Found using MCPwner
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.2.21"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-4039"
],
"database_specific": {
"cwe_ids": [
"CWE-1341",
"CWE-15",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-27T21:36:17Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Summary\n`applySkillConfigEnvOverrides` previously copied `skills.entries.*.env` values into the host `process.env` without applying the host env safety policy.\n\n### Impact\nIn affected versions, dangerous process-level variables such as `NODE_OPTIONS` could be injected when unset, which can influence runtime/child-process behavior.\n\n### Required attacker capability\nAn attacker must be able to modify OpenClaw local state/config (for example `~/.openclaw/openclaw.json`) to set `skills.entries.\u003cskill\u003e.env` or related skill config values.\n\n### Remediation\nFixed in `2026.2.21` by sanitizing skill env overrides and blocking dangerous host env keys (including `NODE_OPTIONS`) before applying overrides, with regression tests covering blocked dangerous keys.\n\n## Fix Commit(s)\n- `8c9f35cdb51692b650ddf05b259ccdd75cc9a83c`\n\nFound using [MCPwner](https://github.com/Pigyon/MCPwner)",
"id": "GHSA-82g8-464f-2mv7",
"modified": "2026-03-12T17:30:21Z",
"published": "2026-02-27T21:36:17Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-82g8-464f-2mv7"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-4039"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/commit/8c9f35cdb51692b650ddf05b259ccdd75cc9a83c"
},
{
"type": "PACKAGE",
"url": "https://github.com/openclaw/openclaw"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/releases/tag/v2026.2.21"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "OpenClaw: Skill env override host env injection via applySkillConfigEnvOverrides (defense-in-depth)"
}
GHSA-82M2-W5Q8-XFH9
Vulnerability from github – Published: 2025-10-22 15:31 – Updated: 2026-04-23 18:31Improper Control of Generation of Code ('Code Injection') vulnerability in Cristián Lávaque s2Member s2member.This issue affects s2Member: from n/a through <= 250905.
{
"affected": [],
"aliases": [
"CVE-2025-62023"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-10-22T15:16:03Z",
"severity": "CRITICAL"
},
"details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in Cristi\u00e1n L\u00e1vaque s2Member s2member.This issue affects s2Member: from n/a through \u003c= 250905.",
"id": "GHSA-82m2-w5q8-xfh9",
"modified": "2026-04-23T18:31:26Z",
"published": "2025-10-22T15:31:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-62023"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/s2member/vulnerability/wordpress-s2member-plugin-250905-remote-code-execution-rce-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://vdp.patchstack.com/database/Wordpress/Plugin/s2member/vulnerability/wordpress-s2member-plugin-250905-remote-code-execution-rce-vulnerability"
},
{
"type": "WEB",
"url": "https://vdp.patchstack.com/database/Wordpress/Plugin/s2member/vulnerability/wordpress-s2member-plugin-250905-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:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-82P4-M5CC-J7C9
Vulnerability from github – Published: 2022-05-24 19:12 – Updated: 2022-05-24 19:12Affected versions of Atlassian Jira Service Management Server and Data Center allow remote attackers with "Jira Administrators" access to execute arbitrary Java code or run arbitrary system commands via a Server_Side Template Injection vulnerability in the Email Template feature. The affected versions are before version 4.13.9, and from version 4.14.0 before 4.18.0.
{
"affected": [],
"aliases": [
"CVE-2021-39115"
],
"database_specific": {
"cwe_ids": [
"CWE-94",
"CWE-96"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-09-01T23:15:00Z",
"severity": "HIGH"
},
"details": "Affected versions of Atlassian Jira Service Management Server and Data Center allow remote attackers with \"Jira Administrators\" access to execute arbitrary Java code or run arbitrary system commands via a Server_Side Template Injection vulnerability in the Email Template feature. The affected versions are before version 4.13.9, and from version 4.14.0 before 4.18.0.",
"id": "GHSA-82p4-m5cc-j7c9",
"modified": "2022-05-24T19:12:56Z",
"published": "2022-05-24T19:12:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39115"
},
{
"type": "WEB",
"url": "https://jira.atlassian.com/browse/JSDSERVER-8665"
}
],
"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"
}
]
}
GHSA-82V3-WFFX-3HQ8
Vulnerability from github – Published: 2023-06-23 21:30 – Updated: 2023-06-23 21:30Code Injection in GitHub repository fossbilling/fossbilling prior to 0.5.1.
{
"affected": [],
"aliases": [
"CVE-2023-3393"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-06-23T19:15:09Z",
"severity": "HIGH"
},
"details": " Code Injection in GitHub repository fossbilling/fossbilling prior to 0.5.1.",
"id": "GHSA-82v3-wffx-3hq8",
"modified": "2023-06-23T21:30:33Z",
"published": "2023-06-23T21:30:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-3393"
},
{
"type": "WEB",
"url": "https://github.com/fossbilling/fossbilling/commit/47343fb58db5c17c14bc6941dacbeb9c96957351"
},
{
"type": "WEB",
"url": "https://huntr.dev/bounties/e4df9280-900a-407a-a07e-e7fef3345914"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:C/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.