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.
8497 vulnerabilities reference this CWE, most recent first.
GHSA-CVW4-VC58-FHX4
Vulnerability from github – Published: 2025-05-25 18:30 – Updated: 2025-05-25 18:30A vulnerability classified as critical has been found in defog-ai introspect up to 0.1.4. This affects the function execute_analysis_code_safely of the file introspect/backend/tools/analysis_tools.py. The manipulation of the argument code leads to code injection. It is possible to launch the attack on the local host. The exploit has been disclosed to the public and may be used. The patch is named 502. It is recommended to apply a patch to fix this issue. The code maintainer explains, that "[they] have added some workarounds to address this in #502, but will not be implementing a full fix. This is because this repo is meant to be run in a docker environment, which will significantly mitigate potential security risks. Having said that, we have added a SECURITY section in our README to make this clearer to users."
{
"affected": [],
"aliases": [
"CVE-2025-5151"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-05-25T17:15:20Z",
"severity": "MODERATE"
},
"details": "A vulnerability classified as critical has been found in defog-ai introspect up to 0.1.4. This affects the function execute_analysis_code_safely of the file introspect/backend/tools/analysis_tools.py. The manipulation of the argument code leads to code injection. It is possible to launch the attack on the local host. The exploit has been disclosed to the public and may be used. The patch is named 502. It is recommended to apply a patch to fix this issue. The code maintainer explains, that \"[they] have added some workarounds to address this in #502, but will not be implementing a full fix. This is because this repo is meant to be run in a docker environment, which will significantly mitigate potential security risks. Having said that, we have added a SECURITY section in our README to make this clearer to users.\"",
"id": "GHSA-cvw4-vc58-fhx4",
"modified": "2025-05-25T18:30:29Z",
"published": "2025-05-25T18:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-5151"
},
{
"type": "WEB",
"url": "https://github.com/defog-ai/introspect/issues/495"
},
{
"type": "WEB",
"url": "https://github.com/defog-ai/introspect/issues/495#issue-3036141048"
},
{
"type": "WEB",
"url": "https://github.com/defog-ai/introspect/issues/495#issuecomment-2894640278"
},
{
"type": "WEB",
"url": "https://github.com/defog-ai/introspect/pull/502"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.310239"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.310239"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.574809"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/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:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-CVX3-834P-CJ35
Vulnerability from github – Published: 2022-05-17 02:29 – Updated: 2022-05-17 02:29FineCMS 2.1.0 allows remote attackers to execute arbitrary PHP code by using a URL Manager "Add Site" action to enter this code after a ', sequence in a domain name, as demonstrated by the ',phpinfo() input value.
{
"affected": [],
"aliases": [
"CVE-2017-11167"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-07-12T13:29:00Z",
"severity": "CRITICAL"
},
"details": "FineCMS 2.1.0 allows remote attackers to execute arbitrary PHP code by using a URL Manager \"Add Site\" action to enter this code after a \u0027, sequence in a domain name, as demonstrated by the \u0027,phpinfo() input value.",
"id": "GHSA-cvx3-834p-cj35",
"modified": "2022-05-17T02:29:24Z",
"published": "2022-05-17T02:29:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-11167"
},
{
"type": "WEB",
"url": "http://www.03sec.com/3169.shtml"
}
],
"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-CW44-2FXG-4Q3M
Vulnerability from github – Published: 2025-12-29 18:30 – Updated: 2026-04-01 18:36Improper Control of Generation of Code ('Code Injection') vulnerability in Mohammad I. Okfie IF AS Shortcode allows Code Injection.This issue affects IF AS Shortcode: from n/a through 1.2.
{
"affected": [],
"aliases": [
"CVE-2025-68897"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-29T16:15:43Z",
"severity": "CRITICAL"
},
"details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in Mohammad I. Okfie IF AS Shortcode allows Code Injection.This issue affects IF AS Shortcode: from n/a through 1.2.",
"id": "GHSA-cw44-2fxg-4q3m",
"modified": "2026-04-01T18:36:24Z",
"published": "2025-12-29T18:30:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-68897"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/plugin/if-as-shortcode/vulnerability/wordpress-if-as-shortcode-plugin-1-2-remote-code-execution-rce-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://vdp.patchstack.com/database/wordpress/plugin/if-as-shortcode/vulnerability/wordpress-if-as-shortcode-plugin-1-2-remote-code-execution-rce-vulnerability?_s_id=cve"
}
],
"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-CW5C-XM7F-WX63
Vulnerability from github – Published: 2024-05-31 12:30 – Updated: 2025-10-22 00:33Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. This vulnerability allows a remote, unauthenticated attacker to execute arbitrary commands on the affected system by sending a specially crafted HTTP request. As of the CVE assignment date, Rejetto HFS 2.3m is no longer supported.
{
"affected": [],
"aliases": [
"CVE-2024-23692"
],
"database_specific": {
"cwe_ids": [
"CWE-1336",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-31T10:15:09Z",
"severity": "CRITICAL"
},
"details": "Rejetto HTTP File Server, up to and including version 2.3m, is vulnerable to a template injection vulnerability. This vulnerability allows a remote, unauthenticated attacker to execute arbitrary commands on the affected system by sending a specially crafted HTTP request. As of the CVE assignment date, Rejetto HFS 2.3m is no longer supported.",
"id": "GHSA-cw5c-xm7f-wx63",
"modified": "2025-10-22T00:33:03Z",
"published": "2024-05-31T12:30:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-23692"
},
{
"type": "WEB",
"url": "https://github.com/rapid7/metasploit-framework/pull/19240"
},
{
"type": "WEB",
"url": "https://mohemiv.com/all/rejetto-http-file-server-2-3m-unauthenticated-rce"
},
{
"type": "WEB",
"url": "https://vulncheck.com/advisories/rejetto-unauth-rce"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-23692"
},
{
"type": "WEB",
"url": "https://www.vicarius.io/vsociety/posts/cve-2024-23692-detect-rejetto-hfs-vulnerability"
},
{
"type": "WEB",
"url": "https://www.vicarius.io/vsociety/posts/cve-2024-23692-rejetto-hfs-mitigate-vulnerability"
},
{
"type": "WEB",
"url": "https://www.vicarius.io/vsociety/posts/unauthenticated-rce-flaw-in-rejetto-http-file-server-cve-2024-23692"
}
],
"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-CW7J-P4C6-68V7
Vulnerability from github – Published: 2022-05-02 03:53 – Updated: 2022-05-02 03:53Unspecified vulnerability in the Indeo codec in Microsoft Windows 2000 SP4, XP SP2 and SP3, and Server 2003 SP2 allows remote attackers to execute arbitrary code via crafted media content, as reported to Microsoft by Paul Byrne of NGS Software. NOTE: this might overlap CVE-2008-3615.
{
"affected": [],
"aliases": [
"CVE-2009-4311"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-12-13T01:30:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in the Indeo codec in Microsoft Windows 2000 SP4, XP SP2 and SP3, and Server 2003 SP2 allows remote attackers to execute arbitrary code via crafted media content, as reported to Microsoft by Paul Byrne of NGS Software. NOTE: this might overlap CVE-2008-3615.",
"id": "GHSA-cw7j-p4c6-68v7",
"modified": "2022-05-02T03:53:35Z",
"published": "2022-05-02T03:53:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-4311"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/54645"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11975"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37592"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1023302"
},
{
"type": "WEB",
"url": "http://support.microsoft.com/kb/954157"
},
{
"type": "WEB",
"url": "http://support.microsoft.com/kb/955759"
},
{
"type": "WEB",
"url": "http://support.microsoft.com/kb/976138"
},
{
"type": "WEB",
"url": "http://www.microsoft.com/technet/security/advisory/954157.mspx"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/37251"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/3440"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-CWCP-6C48-FM7M
Vulnerability from github – Published: 2020-09-01 16:39 – Updated: 2023-11-14 21:08Affected versions of summit allow attackers to execute arbitrary commands via collection names when using the PouchDB driver.
Recommendation
No direct patch is available at this time.
Currently, the best option to mitigate the issue is to avoid using the PouchDB driver, as the package author has abandoned this feature entirely.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "summit"
},
"ranges": [
{
"events": [
{
"introduced": "0.1.0"
},
{
"last_affected": "0.1.22"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2017-16020"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:18:59Z",
"nvd_published_at": "2018-06-04T19:29:01Z",
"severity": "CRITICAL"
},
"details": "Affected versions of `summit` allow attackers to execute arbitrary commands via collection names when using the `PouchDB` driver.\n\n## Recommendation\n\nNo direct patch is available at this time.\n\nCurrently, the best option to mitigate the issue is to avoid using the `PouchDB` driver, as the package author has abandoned this feature entirely.",
"id": "GHSA-cwcp-6c48-fm7m",
"modified": "2023-11-14T21:08:18Z",
"published": "2020-09-01T16:39:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-16020"
},
{
"type": "WEB",
"url": "https://github.com/notduncansmith/summit/issues/23"
},
{
"type": "PACKAGE",
"url": "https://github.com/fredhohman/summit"
}
],
"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": "Unsafe eval() in summit allows arbitrary code execution"
}
GHSA-CWH9-FC6C-2W9P
Vulnerability from github – Published: 2022-05-17 05:14 – Updated: 2025-04-11 04:07Opera before 12.13 allows remote attackers to execute arbitrary code via crafted clipPaths in an SVG document.
{
"affected": [],
"aliases": [
"CVE-2013-1638"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-02-08T11:58:00Z",
"severity": "HIGH"
},
"details": "Opera before 12.13 allows remote attackers to execute arbitrary code via crafted clipPaths in an SVG document.",
"id": "GHSA-cwh9-fc6c-2w9p",
"modified": "2025-04-11T04:07:16Z",
"published": "2022-05-17T05:14:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-1638"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-updates/2013-02/msg00038.html"
},
{
"type": "WEB",
"url": "http://www.opera.com/docs/changelogs/unified/1213"
},
{
"type": "WEB",
"url": "http://www.opera.com/support/kb/view/1043"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-CWHF-VQF3-Q732
Vulnerability from github – Published: 2022-05-14 01:36 – Updated: 2022-05-14 01:36Empire CMS 7.5 allows remote attackers to execute arbitrary PHP code via the ftemp parameter in an enews=EditMemberForm action because this code is injected into a memberform.$fid.php file.
{
"affected": [],
"aliases": [
"CVE-2018-20300"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-12-20T00:29:00Z",
"severity": "CRITICAL"
},
"details": "Empire CMS 7.5 allows remote attackers to execute arbitrary PHP code via the ftemp parameter in an enews=EditMemberForm action because this code is injected into a memberform.$fid.php file.",
"id": "GHSA-cwhf-vqf3-q732",
"modified": "2022-05-14T01:36:38Z",
"published": "2022-05-14T01:36:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-20300"
},
{
"type": "WEB",
"url": "http://p0desta.com/2018/12/19/empirecms%E6%9C%80%E6%96%B0%E7%89%88%E5%90%8E%E5%8F%B0%E5%A4%9A%E5%A4%84getshell"
}
],
"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-CWQR-WX5W-X96J
Vulnerability from github – Published: 2022-05-17 02:07 – Updated: 2022-05-17 02:07PHP remote file inclusion vulnerability in gallery.php in JV2 Folder Gallery 3.1 allows remote attackers to execute arbitrary PHP code via a URL in the lang_file parameter.
{
"affected": [],
"aliases": [
"CVE-2010-2127"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-06-01T21:30:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in gallery.php in JV2 Folder Gallery 3.1 allows remote attackers to execute arbitrary PHP code via a URL in the lang_file parameter.",
"id": "GHSA-cwqr-wx5w-x96j",
"modified": "2022-05-17T02:07:35Z",
"published": "2022-05-17T02:07:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-2127"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/58807"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.org/1005-exploits/jv2foldergallery-rfi.txt"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/12688"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/40339"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-CWR3-6H95-R5RC
Vulnerability from github – Published: 2022-05-01 06:39 – Updated: 2022-05-01 06:39Safari in Mac OS X 10.3 before 10.3.9 and 10.4 before 10.4.5 allows remote attackers to redirect users to local files and execute arbitrary JavaScript via unspecified vectors involving HTTP redirection to local resources.
{
"affected": [],
"aliases": [
"CVE-2006-0388"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2006-03-03T22:02:00Z",
"severity": "LOW"
},
"details": "Safari in Mac OS X 10.3 before 10.3.9 and 10.4 before 10.4.5 allows remote attackers to redirect users to local files and execute arbitrary JavaScript via unspecified vectors involving HTTP redirection to local resources.",
"id": "GHSA-cwr3-6h95-r5rc",
"modified": "2022-05-01T06:39:32Z",
"published": "2022-05-01T06:39:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-0388"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/25038"
},
{
"type": "WEB",
"url": "http://docs.info.apple.com/article.html?artnum=303382"
},
{
"type": "WEB",
"url": "http://lists.apple.com/archives/security-announce/2006/Mar/msg00000.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/19064"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1015713"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/16907"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA06-062A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2006/0791"
}
],
"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.