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.
8353 vulnerabilities reference this CWE, most recent first.
GHSA-3PJG-H7VP-42P9
Vulnerability from github – Published: 2025-10-23 15:30 – Updated: 2025-10-23 18:31A Host Header Injection vulnerability in the password reset component in axewater sharewarez v2.4.3 allows remote attackers to conduct password reset poisoning and account takeover via manipulation of the Host header when Flask's url_for(_external=True) generates reset links without a fixed SERVER_NAME.
{
"affected": [],
"aliases": [
"CVE-2025-61136"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-10-23T15:15:44Z",
"severity": "HIGH"
},
"details": "A Host Header Injection vulnerability in the password reset component in axewater sharewarez v2.4.3 allows remote attackers to conduct password reset poisoning and account takeover via manipulation of the Host header when Flask\u0027s url_for(_external=True) generates reset links without a fixed SERVER_NAME.",
"id": "GHSA-3pjg-h7vp-42p9",
"modified": "2025-10-23T18:31:14Z",
"published": "2025-10-23T15:30:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-61136"
},
{
"type": "WEB",
"url": "https://drive.google.com/file/d/15X5L1uEqgWOLrjKqm96cEPAWp2ph0zJp/view?usp=sharing"
},
{
"type": "WEB",
"url": "https://gist.github.com/BrookeYangRui/145e529b5fd4f56af299efde37edf4fa"
},
{
"type": "WEB",
"url": "https://github.com/axewater/sharewarez/blob/d04c90b7dc3fbae1596f731d1b168d3fb9fdd2df/modules/routes_login.py#L188-L217"
},
{
"type": "WEB",
"url": "https://github.com/axewater/sharewarez/blob/d04c90b7dc3fbae1596f731d1b168d3fb9fdd2df/modules/utils_smtp.py#L191-L206"
},
{
"type": "WEB",
"url": "https://portswigger.net/web-security/host-header/exploiting/password-reset-poisoning"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-3PJH-HJMX-5PVH
Vulnerability from github – Published: 2022-05-02 03:16 – Updated: 2025-04-09 04:10Array index error in Excel in Microsoft Office 2000 SP3 and Office 2004 and 2008 for Mac, and Open XML File Format Converter for Mac, allows remote attackers to execute arbitrary code via a crafted Excel file with a malformed record object, aka "Array Indexing Memory Corruption Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2009-0558"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-06-10T18:30:00Z",
"severity": "HIGH"
},
"details": "Array index error in Excel in Microsoft Office 2000 SP3 and Office 2004 and 2008 for Mac, and Open XML File Format Converter for Mac, allows remote attackers to execute arbitrary code via a crafted Excel file with a malformed record object, aka \"Array Indexing Memory Corruption Vulnerability.\"",
"id": "GHSA-3pjh-hjmx-5pvh",
"modified": "2025-04-09T04:10:48Z",
"published": "2022-05-02T03:16:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0558"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-021"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11525"
},
{
"type": "WEB",
"url": "http://osvdb.org/54954"
},
{
"type": "WEB",
"url": "http://secunia.com/secunia_research/2009-1"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/504188/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/35242"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1022351"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA09-160A.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/1540"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-3PJR-R4GG-JPHF
Vulnerability from github – Published: 2022-05-01 17:45 – Updated: 2022-05-01 17:45Variable overwrite vulnerability in interface/globals.php in OpenEMR 2.8.2 and earlier allows remote attackers to overwrite arbitrary program variables and conduct other unauthorized activities, such as conduct (a) remote file inclusion attacks via the srcdir parameter in custom/import_xml.php or (b) cross-site scripting (XSS) attacks via the rootdir parameter in interface/login/login_frame.php, via vectors associated with extract operations on the (1) POST and (2) GET superglobal arrays. NOTE: this issue was originally disputed before the extract behavior was identified in post-disclosure analysis. Also, the original report identified "Open Conference Systems," but this was an error.
{
"affected": [],
"aliases": [
"CVE-2007-0649"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-02-01T01:28:00Z",
"severity": "MODERATE"
},
"details": "Variable overwrite vulnerability in interface/globals.php in OpenEMR 2.8.2 and earlier allows remote attackers to overwrite arbitrary program variables and conduct other unauthorized activities, such as conduct (a) remote file inclusion attacks via the srcdir parameter in custom/import_xml.php or (b) cross-site scripting (XSS) attacks via the rootdir parameter in interface/login/login_frame.php, via vectors associated with extract operations on the (1) POST and (2) GET superglobal arrays. NOTE: this issue was originally disputed before the extract behavior was identified in post-disclosure analysis. Also, the original report identified \"Open Conference Systems,\" but this was an error.",
"id": "GHSA-3pjr-r4gg-jphf",
"modified": "2022-05-01T17:45:53Z",
"published": "2022-05-01T17:45:53Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-0649"
},
{
"type": "WEB",
"url": "http://attrition.org/pipermail/vim/2007-January/001254.html"
},
{
"type": "WEB",
"url": "http://attrition.org/pipermail/vim/2007-January/001258.html"
},
{
"type": "WEB",
"url": "http://osvdb.org/33603"
},
{
"type": "WEB",
"url": "http://osvdb.org/33609"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/2202"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/458306/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/458426/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/458456/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/458476/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/458486/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/458565/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/22346"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/22348"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-3PMW-F2R9-3RWG
Vulnerability from github – Published: 2022-02-15 00:02 – Updated: 2023-08-08 15:31PublicCMS v4.0 was discovered to contain a remote code execution (RCE) vulnerability via the cmdarray parameter.
{
"affected": [],
"aliases": [
"CVE-2022-23389"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-02-14T21:15:00Z",
"severity": "CRITICAL"
},
"details": "PublicCMS v4.0 was discovered to contain a remote code execution (RCE) vulnerability via the cmdarray parameter.",
"id": "GHSA-3pmw-f2r9-3rwg",
"modified": "2023-08-08T15:31:43Z",
"published": "2022-02-15T00:02:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23389"
},
{
"type": "WEB",
"url": "https://github.com/sanluan/PublicCMS/issues/59"
}
],
"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-3PW2-J2VJ-GHMP
Vulnerability from github – Published: 2022-05-24 22:28 – Updated: 2022-05-24 22:28The Trend Micro Security 2020 and 2021 families of consumer products are vulnerable to a code injection vulnerability which could allow an attacker to disable the program’s password protection and disable protection.
An attacker must already have administrator privileges on the machine to exploit this vulnerability.
{
"affected": [],
"aliases": [
"CVE-2021-25251"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-02-10T22:15:00Z",
"severity": "HIGH"
},
"details": "The Trend Micro Security 2020 and 2021 families of consumer products are vulnerable to a code injection vulnerability which could allow an attacker to disable the program\u2019s password protection and disable protection.\n\nAn attacker must already have administrator privileges on the machine to exploit this vulnerability.",
"id": "GHSA-3pw2-j2vj-ghmp",
"modified": "2022-05-24T22:28:09Z",
"published": "2022-05-24T22:28:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-25251"
},
{
"type": "WEB",
"url": "https://helpcenter.trendmicro.com/en-us/article/TMKA-10211"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-3PX5-66W8-X4Q8
Vulnerability from github – Published: 2025-02-10 21:31 – Updated: 2025-02-11 15:32The issue was addressed with improved memory handling. This issue is fixed in iOS 17.4 and iPadOS 17.4, tvOS 17.4, watchOS 10.4, visionOS 1.1, macOS Sonoma 14.4. Processing web content may lead to arbitrary code execution.
{
"affected": [],
"aliases": [
"CVE-2024-27859"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-10T19:15:37Z",
"severity": "HIGH"
},
"details": "The issue was addressed with improved memory handling. This issue is fixed in iOS 17.4 and iPadOS 17.4, tvOS 17.4, watchOS 10.4, visionOS 1.1, macOS Sonoma 14.4. Processing web content may lead to arbitrary code execution.",
"id": "GHSA-3px5-66w8-x4q8",
"modified": "2025-02-11T15:32:22Z",
"published": "2025-02-10T21:31:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-27859"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/120881"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/120882"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/120883"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/120893"
},
{
"type": "WEB",
"url": "https://support.apple.com/en-us/120895"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-3PX7-9CXH-C3Q3
Vulnerability from github – Published: 2024-12-18 21:30 – Updated: 2026-04-01 18:32Improper Control of Generation of Code ('Code Injection') vulnerability in VibeThemes WPLMS allows Code Injection.This issue affects WPLMS: from n/a before 1.9.9.5.
{
"affected": [],
"aliases": [
"CVE-2024-56051"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-18T19:15:12Z",
"severity": "HIGH"
},
"details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in VibeThemes WPLMS allows Code Injection.This issue affects WPLMS: from n/a before 1.9.9.5.",
"id": "GHSA-3px7-9cxh-c3q3",
"modified": "2026-04-01T18:32:52Z",
"published": "2024-12-18T21:30:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-56051"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Plugin/wplms_plugin/vulnerability/wordpress-wplms-plugin-1-9-9-5-student-remote-code-execution-rce-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/plugin/wplms-plugin/vulnerability/wordpress-wplms-plugin-1-9-9-5-student-remote-code-execution-rce-vulnerability?_s_id=cve"
}
],
"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"
}
]
}
GHSA-3Q2P-XJ33-XM8J
Vulnerability from github – Published: 2025-07-22 21:31 – Updated: 2026-04-13 15:30Insufficient escaping in the “Copy as cURL” feature could potentially be used to trick a user into executing unexpected code. This vulnerability affects Firefox < 141, Firefox ESR < 128.13, Firefox ESR < 140.1, Thunderbird < 141, Thunderbird < 128.13, and Thunderbird < 140.1.
{
"affected": [],
"aliases": [
"CVE-2025-8030"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-22T21:15:50Z",
"severity": "HIGH"
},
"details": "Insufficient escaping in the \u201cCopy as cURL\u201d feature could potentially be used to trick a user into executing unexpected code. This vulnerability affects Firefox \u003c 141, Firefox ESR \u003c 128.13, Firefox ESR \u003c 140.1, Thunderbird \u003c 141, Thunderbird \u003c 128.13, and Thunderbird \u003c 140.1.",
"id": "GHSA-3q2p-xj33-xm8j",
"modified": "2026-04-13T15:30:46Z",
"published": "2025-07-22T21:31:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-8030"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1968414"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2025/07/msg00016.html"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2025-56"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2025-58"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2025-59"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2025-61"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2025-62"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2025-63"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-3Q4C-68FC-P58J
Vulnerability from github – Published: 2026-07-21 00:30 – Updated: 2026-07-21 18:30An issue in SJCAM AllWinner Tech products SJ4000-Air V1.4C and before and Whitelabel based v.1.4C and before allows an attacker to execute arbitrary code via a crafted FEX file
{
"affected": [],
"aliases": [
"CVE-2026-52656"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-20T22:17:15Z",
"severity": "CRITICAL"
},
"details": "An issue in SJCAM AllWinner Tech products SJ4000-Air V1.4C and before and Whitelabel based v.1.4C and before allows an attacker to execute arbitrary code via a crafted FEX file",
"id": "GHSA-3q4c-68fc-p58j",
"modified": "2026-07-21T18:30:56Z",
"published": "2026-07-21T00:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-52656"
},
{
"type": "WEB",
"url": "https://keowu.re/posts/Lelouch--Reverse-Engineering-of-an-SJCAM-Action-Camera-with-proprietary-Android--based-firmware-and-Rewriting-a-completely-OpenSource-CFW"
},
{
"type": "WEB",
"url": "https://sjcam.com"
}
],
"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-3Q6H-Q44P-XW88
Vulnerability from github – Published: 2023-05-11 18:30 – Updated: 2024-11-29 12:31Angle brackets (<>) are not considered dangerous characters when inserted into CSS contexts. Templates containing multiple actions separated by a '/' character can result in unexpectedly closing the CSS context and allowing for injection of unexpected HTML, if executed with untrusted input.
{
"affected": [],
"aliases": [
"CVE-2023-24539"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-05-11T16:15:09Z",
"severity": "HIGH"
},
"details": "Angle brackets (\u003c\u003e) are not considered dangerous characters when inserted into CSS contexts. Templates containing multiple actions separated by a \u0027/\u0027 character can result in unexpectedly closing the CSS context and allowing for injection of unexpected HTML, if executed with untrusted input.",
"id": "GHSA-3q6h-q44p-xw88",
"modified": "2024-11-29T12:31:47Z",
"published": "2023-05-11T18:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-24539"
},
{
"type": "WEB",
"url": "https://go.dev/cl/491615"
},
{
"type": "WEB",
"url": "https://go.dev/issue/59720"
},
{
"type": "WEB",
"url": "https://groups.google.com/g/golang-announce/c/MEb0UyuSMsU"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2023-1751"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20241129-0005"
}
],
"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:L",
"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.