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.
8381 vulnerabilities reference this CWE, most recent first.
GHSA-6MVJ-2569-3MCM
Vulnerability from github – Published: 2024-08-05 21:18 – Updated: 2024-08-05 21:18Editor.js is a block-style editor with clean JSON output. Versions prior to 2.26.0 are vulnerable to Code Injection via pasted input. The processHTML method passes pasted input into wrapper’s innerHTML. This issue is patched in version 2.26.0.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@editorjs/editorjs"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.26.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-23474"
],
"database_specific": {
"cwe_ids": [
"CWE-79",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-08-05T21:18:57Z",
"nvd_published_at": "2022-12-15T19:15:00Z",
"severity": "MODERATE"
},
"details": "Editor.js is a block-style editor with clean JSON output. Versions prior to 2.26.0 are vulnerable to Code Injection via pasted input. The processHTML method passes pasted input into wrapper\u2019s innerHTML. This issue is patched in version 2.26.0.",
"id": "GHSA-6mvj-2569-3mcm",
"modified": "2024-08-05T21:18:57Z",
"published": "2024-08-05T21:18:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23474"
},
{
"type": "WEB",
"url": "https://github.com/codex-team/editor.js/pull/2100"
},
{
"type": "WEB",
"url": "https://github.com/codex-team/editor.js/commit/f659015be6de8e6f0c322c5ff4d1a4532d2f29a2"
},
{
"type": "PACKAGE",
"url": "https://github.com/codex-team/editor.js"
},
{
"type": "WEB",
"url": "https://securitylab.github.com/advisories"
},
{
"type": "ADVISORY",
"url": "https://securitylab.github.com/advisories/GHSL-2022-028_codex-team_editor_js"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Editor.js vulnerable to Code Injection"
}
GHSA-6MW4-4WCP-XQG4
Vulnerability from github – Published: 2026-03-13 21:31 – Updated: 2026-03-13 21:31Improper Control of Generation of Code ('Code Injection') vulnerability in ILLID Advanced Woo Labels advanced-woo-labels allows Remote Code Inclusion.This issue affects Advanced Woo Labels: from n/a through <= 2.36.
{
"affected": [],
"aliases": [
"CVE-2026-32414"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-13T19:54:58Z",
"severity": "HIGH"
},
"details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in ILLID Advanced Woo Labels advanced-woo-labels allows Remote Code Inclusion.This issue affects Advanced Woo Labels: from n/a through \u003c= 2.36.",
"id": "GHSA-6mw4-4wcp-xqg4",
"modified": "2026-03-13T21:31:49Z",
"published": "2026-03-13T21:31:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32414"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/advanced-woo-labels/vulnerability/wordpress-advanced-woo-labels-plugin-2-36-remote-code-execution-rce-vulnerability?_s_id=cve"
}
],
"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-6P38-WPXV-RJ6F
Vulnerability from github – Published: 2022-05-17 05:52 – Updated: 2022-05-17 05:52Eval injection vulnerability in TWiki before 4.2.4 allows remote attackers to execute arbitrary Perl code via the %SEARCH{}% variable.
{
"affected": [],
"aliases": [
"CVE-2008-5305"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-12-10T00:30:00Z",
"severity": "HIGH"
},
"details": "Eval injection vulnerability in TWiki before 4.2.4 allows remote attackers to execute arbitrary Perl code via the %SEARCH{}% variable.",
"id": "GHSA-6p38-wpxv-rj6f",
"modified": "2022-05-17T05:52:51Z",
"published": "2022-05-17T05:52:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-5305"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/33040"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1021352"
},
{
"type": "WEB",
"url": "http://twiki.org/cgi-bin/view/Codev/SecurityAlert-CVE-2008-5305"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/32668"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/3381"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P4P-P9HH-3HQ7
Vulnerability from github – Published: 2023-04-11 06:30 – Updated: 2025-10-22 00:32Novi Survey before 8.9.43676 allows remote attackers to execute arbitrary code on the server in the context of the service account. This does not provide access to stored survey or response data.
{
"affected": [],
"aliases": [
"CVE-2023-29492"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-04-11T05:15:00Z",
"severity": "CRITICAL"
},
"details": "Novi Survey before 8.9.43676 allows remote attackers to execute arbitrary code on the server in the context of the service account. This does not provide access to stored survey or response data.",
"id": "GHSA-6p4p-p9hh-3hq7",
"modified": "2025-10-22T00:32:43Z",
"published": "2023-04-11T06:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-29492"
},
{
"type": "WEB",
"url": "https://novisurvey.net/blog/novi-survey-security-advisory-apr-2023.aspx"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2023-29492"
}
],
"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-6P55-QR3J-MPGQ
Vulnerability from github – Published: 2024-11-05 00:31 – Updated: 2024-11-07 17:10In agentscope <=v0.0.4, the file agentscope\web\workstation\workflow_utils.py has the function is_callable_expression. Within this function, the line result = eval(s) poses a security risk as it can directly execute user-provided commands.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "agentscope"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-48050"
],
"database_specific": {
"cwe_ids": [
"CWE-94",
"CWE-95"
],
"github_reviewed": true,
"github_reviewed_at": "2024-11-05T16:10:09Z",
"nvd_published_at": "2024-11-04T23:15:04Z",
"severity": "HIGH"
},
"details": "In agentscope \u003c=v0.0.4, the file `agentscope\\web\\workstation\\workflow_utils.py` has the function `is_callable_expression`. Within this function, the line `result = eval(s)` poses a security risk as it can directly execute user-provided commands.",
"id": "GHSA-6p55-qr3j-mpgq",
"modified": "2024-11-07T17:10:05Z",
"published": "2024-11-05T00:31:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-48050"
},
{
"type": "WEB",
"url": "https://gist.github.com/AfterSnows/0ad9d233a9d2a5b7e6e5273e2e23508d"
},
{
"type": "PACKAGE",
"url": "https://github.com/modelscope/agentscope"
},
{
"type": "WEB",
"url": "https://github.com/modelscope/agentscope/blob/main/src/agentscope/web/workstation/workflow_utils.py#L11"
},
{
"type": "WEB",
"url": "https://rumbling-slice-eb0.notion.site/Unauthenticated-Remote-Code-Execution-via-The-use-of-eval-in-is_callable_expression-and-sanitize_nod-cd4ea6c576da4e0b965ef596855c298d"
}
],
"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/E:P",
"type": "CVSS_V4"
}
],
"summary": "AgentScope uses `eval`"
}
GHSA-6P56-5GJV-4CXG
Vulnerability from github – Published: 2022-05-17 04:57 – Updated: 2022-05-17 04:57SAP Sybase Adaptive Server Enterprise (ASE) 15.0.3 before 15.0.3 ESD#4.3, 15.5 before 15.5 ESD#5.3, and 15.7 before 15.7 SP50 or 15.7 SP100 allows remote authenticated users to execute arbitrary code via unspecified vectors, aka CR732989.
{
"affected": [],
"aliases": [
"CVE-2013-6865"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-11-23T18:55:00Z",
"severity": "HIGH"
},
"details": "SAP Sybase Adaptive Server Enterprise (ASE) 15.0.3 before 15.0.3 ESD#4.3, 15.5 before 15.5 ESD#5.3, and 15.7 before 15.7 SP50 or 15.7 SP100 allows remote authenticated users to execute arbitrary code via unspecified vectors, aka CR732989.",
"id": "GHSA-6p56-5gjv-4cxg",
"modified": "2022-05-17T04:57:16Z",
"published": "2022-05-17T04:57:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-6865"
},
{
"type": "WEB",
"url": "https://service.sap.com/sap/support/notes/1893558"
},
{
"type": "WEB",
"url": "http://scn.sap.com/docs/DOC-8218"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/55537"
},
{
"type": "WEB",
"url": "http://www.sybase.com/detail?id=1099371"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P5R-M5H8-G9RJ
Vulnerability from github – Published: 2022-05-17 05:44 – Updated: 2025-04-11 03:40The browser-plugin implementation in RealNetworks RealPlayer 11.0 through 11.1 and RealPlayer SP 1.0 through 1.1 allows remote attackers to arguments to the RecordClip method, which allows remote attackers to download an arbitrary program onto a client machine, and execute this program, via a " (double quote) in an argument to the RecordClip method, aka "parameter injection."
{
"affected": [],
"aliases": [
"CVE-2010-3749"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-10-19T00:00:00Z",
"severity": "HIGH"
},
"details": "The browser-plugin implementation in RealNetworks RealPlayer 11.0 through 11.1 and RealPlayer SP 1.0 through 1.1 allows remote attackers to arguments to the RecordClip method, which allows remote attackers to download an arbitrary program onto a client machine, and execute this program, via a \" (double quote) in an argument to the RecordClip method, aka \"parameter injection.\"",
"id": "GHSA-6p5r-m5h8-g9rj",
"modified": "2025-04-11T03:40:16Z",
"published": "2022-05-17T05:44:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-3749"
},
{
"type": "WEB",
"url": "http://service.real.com/realplayer/security/10152010_player/en"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/15991"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/44144"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/44443"
},
{
"type": "WEB",
"url": "http://www.zerodayinitiative.com/advisories/ZDI-10-211"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P6Q-JPG9-MWPP
Vulnerability from github – Published: 2022-05-01 23:57 – Updated: 2022-05-01 23:57Multiple PHP remote file inclusion vulnerabilities in BoonEx Dolphin 6.1.2, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the (1) dir[plugins] parameter to (a) HTMLSax3.php and (b) safehtml.php in plugins/safehtml/ and the (2) sIncPath parameter to (c) ray/modules/global/inc/content.inc.php. NOTE: vector 1 might be a problem in SafeHTML instead of Dolphin.
{
"affected": [],
"aliases": [
"CVE-2008-3167"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-07-14T23:41:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in BoonEx Dolphin 6.1.2, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the (1) dir[plugins] parameter to (a) HTMLSax3.php and (b) safehtml.php in plugins/safehtml/ and the (2) sIncPath parameter to (c) ray/modules/global/inc/content.inc.php. NOTE: vector 1 might be a problem in SafeHTML instead of Dolphin.",
"id": "GHSA-6p6q-jpg9-mwpp",
"modified": "2022-05-01T23:57:20Z",
"published": "2022-05-01T23:57:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-3167"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43647"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/6024"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30981"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30995"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/3993"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/30136"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P84-8GMV-PXFX
Vulnerability from github – Published: 2022-05-01 18:29 – Updated: 2022-05-01 18:29Multiple incomplete blacklist vulnerabilities in iziContents 1 RC6 and earlier allow remote attackers to execute arbitrary PHP code via a URL in (1) the admin_home parameter to modules/poll/poll_summary.php or (2) the rootdp parameter to include/db.php; or a URL in the language_home parameter to (3) search/search.php, (4) poll/inlinepoll.php, (5) poll/showpoll.php, (6) links/showlinks.php, or (7) links/submit_links.php in modules/; related to missing checks in (a) modules/moduleSec.php and (b) include/includeSec.php for inclusion of certain URLs, as demonstrated by an ftps:// URL.
{
"affected": [],
"aliases": [
"CVE-2007-5053"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-09-24T22:17:00Z",
"severity": "HIGH"
},
"details": "Multiple incomplete blacklist vulnerabilities in iziContents 1 RC6 and earlier allow remote attackers to execute arbitrary PHP code via a URL in (1) the admin_home parameter to modules/poll/poll_summary.php or (2) the rootdp parameter to include/db.php; or a URL in the language_home parameter to (3) search/search.php, (4) poll/inlinepoll.php, (5) poll/showpoll.php, (6) links/showlinks.php, or (7) links/submit_links.php in modules/; related to missing checks in (a) modules/moduleSec.php and (b) include/includeSec.php for inclusion of certain URLs, as demonstrated by an ftps:// URL.",
"id": "GHSA-6p84-8gmv-pxfx",
"modified": "2022-05-01T18:29:30Z",
"published": "2022-05-01T18:29:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5053"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4441"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P85-RRMV-FXVW
Vulnerability from github – Published: 2022-05-01 23:54 – Updated: 2022-05-01 23:54PHP remote file inclusion vulnerability in includes/Cache/Lite/Output.php in the Cache_Lite package in Mambo 4.6.4 and earlier, when register_globals is enabled, allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.
{
"affected": [],
"aliases": [
"CVE-2008-2905"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-06-30T18:24:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in includes/Cache/Lite/Output.php in the Cache_Lite package in Mambo 4.6.4 and earlier, when register_globals is enabled, allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.",
"id": "GHSA-6p85-rrmv-fxvw",
"modified": "2022-05-01T23:54:36Z",
"published": "2022-05-01T23:54:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2905"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43101"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5808"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30685"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/29716"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1020295"
}
],
"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.