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.
8385 vulnerabilities reference this CWE, most recent first.
GHSA-7245-X6GQ-6QG5
Vulnerability from github – Published: 2024-04-08 06:31 – Updated: 2024-08-01 15:31An issue was discovered in CandyCMS version 1.0.0, allows remote attackers to execute arbitrary code via the install.php component.
{
"affected": [],
"aliases": [
"CVE-2024-31022"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-08T06:15:07Z",
"severity": "CRITICAL"
},
"details": "An issue was discovered in CandyCMS version 1.0.0, allows remote attackers to execute arbitrary code via the install.php component.",
"id": "GHSA-7245-x6gq-6qg5",
"modified": "2024-08-01T15:31:37Z",
"published": "2024-04-08T06:31:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31022"
},
{
"type": "WEB",
"url": "https://www.xuxblog.top/2024/03/25/CandyCMS-Pre-Auth-RCE"
}
],
"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-7257-96VG-QF6X
Vulnerability from github – Published: 2020-08-21 17:03 – Updated: 2024-10-26 18:37Impact
A RCE exploit has been discovered in the Streams module: this exploit allows Discord users with specifically crafted "going live" messages to inject code into the Streams module's going live message. By abusing this exploit, it's possible to perform destructive actions and/or access sensitive information.
Patches
This critical exploit has been fixed on version 3.3.12 & 3.4.
Workarounds
Unloading the Streams module with unload streams can render this exploit not accessible. We still highly recommend updating to 3.3.12 or 3.4 to completely patch this issue.
References
- https://github.com/Cog-Creators/Red-DiscordBot/pull/4183
For more information
If you have any questions or comments about this advisory: * Open an issue in Cog-Creators/Red-DiscordBot * Over on our Discord server
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.3.11"
},
"package": {
"ecosystem": "PyPI",
"name": "Red-DiscordBot"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.3.12"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-15147"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-21T17:02:40Z",
"nvd_published_at": "2020-08-21T18:15:00Z",
"severity": "HIGH"
},
"details": "### Impact\nA RCE exploit has been discovered in the Streams module: this exploit allows Discord users with specifically crafted \"going live\" messages to inject code into the Streams module\u0027s going live message. By abusing this exploit, it\u0027s possible to perform destructive actions and/or access sensitive information.\n\n### Patches\nThis critical exploit has been fixed on version ``3.3.12`` \u0026 ``3.4``.\n\n### Workarounds\nUnloading the Streams module with ``unload streams`` can render this exploit not accessible. We still highly recommend updating to ``3.3.12`` or ``3.4`` to completely patch this issue.\n\n### References\n* https://github.com/Cog-Creators/Red-DiscordBot/pull/4183\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Cog-Creators/Red-DiscordBot](https://github.com/Cog-Creators/Red-DiscordBot)\n* Over on our [Discord server](https://discord.gg/red)",
"id": "GHSA-7257-96vg-qf6x",
"modified": "2024-10-26T18:37:01Z",
"published": "2020-08-21T17:03:24Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Cog-Creators/Red-DiscordBot/security/advisories/GHSA-7257-96vg-qf6x"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-15147"
},
{
"type": "WEB",
"url": "https://github.com/Cog-Creators/Red-DiscordBot/pull/4183"
},
{
"type": "WEB",
"url": "https://github.com/Cog-Creators/Red-DiscordBot/pull/4183/commits/e269ea0d3bc88417163c18431b1df38a9be92bfc"
},
{
"type": "WEB",
"url": "https://github.com/Cog-Creators/Red-DiscordBot"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/red-discordbot/PYSEC-2020-266.yaml"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Remote Code Execution in Red Discord Bot"
}
GHSA-727G-3F42-FCRV
Vulnerability from github – Published: 2025-08-15 18:31 – Updated: 2025-08-15 18:31Improper Control of Generation of Code ('Code Injection') vulnerability in Wulkano KAP on MacOS allows TCC Bypass.This issue affects KAP: 3.6.0.
{
"affected": [],
"aliases": [
"CVE-2025-7961"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-15T17:15:32Z",
"severity": "MODERATE"
},
"details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in Wulkano KAP on MacOS allows TCC Bypass.This issue affects KAP: 3.6.0.",
"id": "GHSA-727g-3f42-fcrv",
"modified": "2025-08-15T18:31:12Z",
"published": "2025-08-15T18:31:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-7961"
},
{
"type": "WEB",
"url": "https://fluidattacks.com/advisories/cafrune"
},
{
"type": "WEB",
"url": "https://getkap.co"
},
{
"type": "WEB",
"url": "https://github.com/wulkano/Kap"
},
{
"type": "WEB",
"url": "http://wulkano.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:L/SI:L/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-728Q-F8MC-XGQ3
Vulnerability from github – Published: 2024-09-10 03:31 – Updated: 2024-09-10 03:31The Frontend Dashboard plugin for WordPress is vulnerable to unauthorized code execution due to insufficient filtering on callable methods/functions via the ajax_request() function in all versions up to, and including, 2.2.4. This makes it possible for authenticated attackers, with subscriber-level access and above, to call arbitrary functions that can be leverage for privilege escalation by changing user's passwords.
{
"affected": [],
"aliases": [
"CVE-2024-8268"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-10T03:15:03Z",
"severity": "HIGH"
},
"details": "The Frontend Dashboard plugin for WordPress is vulnerable to unauthorized code execution due to insufficient filtering on callable methods/functions via the ajax_request() function in all versions up to, and including, 2.2.4. This makes it possible for authenticated attackers, with subscriber-level access and above, to call arbitrary functions that can be leverage for privilege escalation by changing user\u0027s passwords.",
"id": "GHSA-728q-f8mc-xgq3",
"modified": "2024-09-10T03:31:32Z",
"published": "2024-09-10T03:31:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-8268"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/frontend-dashboard/tags/2.2.4/route/class-fed-request.php#L29"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3147868/frontend-dashboard/tags/2.2.5/route/class-fed-request.php?old=3048034\u0026old_path=frontend-dashboard%2Ftags%2F2.2.4%2Froute%2Fclass-fed-request.php"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/7d66694a-c99f-44f8-8004-1a47ad9f9250?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-7299-R4W8-X368
Vulnerability from github – Published: 2022-05-24 19:17 – Updated: 2022-05-24 19:17IBM Cognos Analytics 11.1.7 and 11.2.0 could allow an authenticated user to execute code remotely due to incorrectly neutralizaing user-contrlled input that could be interpreted a a server-side include (SSI) directive. IBM X-Force ID: 199915.
{
"affected": [],
"aliases": [
"CVE-2021-29679"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-10-15T16:15:00Z",
"severity": "HIGH"
},
"details": "IBM Cognos Analytics 11.1.7 and 11.2.0 could allow an authenticated user to execute code remotely due to incorrectly neutralizaing user-contrlled input that could be interpreted a a server-side include (SSI) directive. IBM X-Force ID: 199915.",
"id": "GHSA-7299-r4w8-x368",
"modified": "2022-05-24T19:17:40Z",
"published": "2022-05-24T19:17:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-29679"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/199915"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20211112-0005"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/6491661"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-72C6-XXGM-523F
Vulnerability from github – Published: 2022-05-02 03:42 – Updated: 2022-05-02 03:42Microsoft Office Excel 2002 SP3, 2003 SP3, and 2007 SP1 and SP2; Office 2004 and 2008 for Mac; Open XML File Format Converter for Mac; Office Excel Viewer 2003 SP3; Office Excel Viewer SP1 and SP2; and Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats SP1 and SP2 allow remote attackers to execute arbitrary code via a spreadsheet containing a malformed formula, related to a "pointer corruption" issue, aka "Excel Index Parsing Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2009-3132"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-11-11T20:30:00Z",
"severity": "HIGH"
},
"details": "Microsoft Office Excel 2002 SP3, 2003 SP3, and 2007 SP1 and SP2; Office 2004 and 2008 for Mac; Open XML File Format Converter for Mac; Office Excel Viewer 2003 SP3; Office Excel Viewer SP1 and SP2; and Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats SP1 and SP2 allow remote attackers to execute arbitrary code via a spreadsheet containing a malformed formula, related to a \"pointer corruption\" issue, aka \"Excel Index Parsing Vulnerability.\"",
"id": "GHSA-72c6-xxgm-523f",
"modified": "2022-05-02T03:42:06Z",
"published": "2022-05-02T03:42:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-3132"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-067"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6526"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1023157"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA09-314A.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-72CM-R793-QXX6
Vulnerability from github – Published: 2025-03-01 09:30 – Updated: 2025-03-01 09:30The The Authors List plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 2.0.6. This is due to the software allowing users to execute an action that does not properly validate a value before running do_shortcode. This makes it possible for unauthenticated attackers to execute arbitrary shortcodes.
{
"affected": [],
"aliases": [
"CVE-2024-13806"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-01T08:15:33Z",
"severity": "MODERATE"
},
"details": "The The Authors List plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 2.0.6. This is due to the software allowing users to execute an action that does not properly validate a value before running do_shortcode. This makes it possible for unauthenticated attackers to execute arbitrary shortcodes.",
"id": "GHSA-72cm-r793-qxx6",
"modified": "2025-03-01T09:30:29Z",
"published": "2025-03-01T09:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-13806"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset?sfp_email=\u0026sfph_mail=\u0026reponame=\u0026old=3246757%40authors-list\u0026new=3246757%40authors-list\u0026sfp_email=\u0026sfph_mail="
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/dbfa20ad-6411-4054-9973-cb12d17c57f6?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-72F4-86JM-86F6
Vulnerability from github – Published: 2022-05-01 07:44 – Updated: 2022-05-01 07:44PHP remote file inclusion vulnerability in config.inc.php3 in Power Phlogger 2.0.9 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the rel_path parameter.
{
"affected": [],
"aliases": [
"CVE-2006-7106"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-03-03T21:19:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in config.inc.php3 in Power Phlogger 2.0.9 and earlier allows remote attackers to execute arbitrary PHP code via a URL in the rel_path parameter.",
"id": "GHSA-72f4-86jm-86f6",
"modified": "2022-05-01T07:44:47Z",
"published": "2022-05-01T07:44:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-7106"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/29701"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/2602"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20638"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/20644"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-72FM-PGXW-XW9M
Vulnerability from github – Published: 2022-05-01 23:36 – Updated: 2025-04-09 03:52Opera before 9.26 allows user-assisted remote attackers to execute arbitrary script via images that contain custom comments, which are treated as script when the user displays the image properties.
{
"affected": [],
"aliases": [
"CVE-2008-1081"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-02-29T02:44:00Z",
"severity": "MODERATE"
},
"details": "Opera before 9.26 allows user-assisted remote attackers to execute arbitrary script via images that contain custom comments, which are treated as script when the user displays the image properties.",
"id": "GHSA-72fm-pgxw-xw9m",
"modified": "2025-04-09T03:52:01Z",
"published": "2022-05-01T23:36:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-1081"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2008-02/msg00010.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/29029"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/29152"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/29178"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-200803-09.xml"
},
{
"type": "WEB",
"url": "http://www.opera.com/docs/changelogs/linux/926"
},
{
"type": "WEB",
"url": "http://www.opera.com/support/search/view/879"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/27901"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/0622"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-72GC-X9Q7-VH7V
Vulnerability from github – Published: 2023-01-19 15:30 – Updated: 2023-01-27 18:30An issue was discovered in function httpProcDataSrv in TL-WDR7660 2.0.30 that allows attackers to execute arbitrary code.
{
"affected": [],
"aliases": [
"CVE-2021-37774"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-01-19T13:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in function httpProcDataSrv in TL-WDR7660 2.0.30 that allows attackers to execute arbitrary code.",
"id": "GHSA-72gc-x9q7-vh7v",
"modified": "2023-01-27T18:30:33Z",
"published": "2023-01-19T15:30:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-37774"
},
{
"type": "WEB",
"url": "https://github.com/fishykz/TP-POC"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:L/PR:L/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.