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.
8285 vulnerabilities reference this CWE, most recent first.
GHSA-HJM7-RRWP-QW3F
Vulnerability from github – Published: 2022-04-30 18:22 – Updated: 2022-04-30 18:22PHP remote file inclusion vulnerability in thatfile.php in Thatware 0.3 through 0.5.2 allows remote attackers to execute arbitrary PHP code via the root_path parameter.
{
"affected": [],
"aliases": [
"CVE-2002-2299"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2002-12-31T05:00:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in thatfile.php in Thatware 0.3 through 0.5.2 allows remote attackers to execute arbitrary PHP code via the root_path parameter.",
"id": "GHSA-hjm7-rrwp-qw3f",
"modified": "2022-04-30T18:22:55Z",
"published": "2022-04-30T18:22:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2002-2299"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/10758"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/bugtraq/2002-12/0000.html"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1005733"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HJP3-76MG-X3JH
Vulnerability from github – Published: 2025-02-22 06:30 – Updated: 2025-02-22 06:30The The Show Me The Cookies plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 1.0. 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-2025-1509"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-22T04:15:09Z",
"severity": "HIGH"
},
"details": "The The Show Me The Cookies plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 1.0. 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-hjp3-76mg-x3jh",
"modified": "2025-02-22T06:30:33Z",
"published": "2025-02-22T06:30:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-1509"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/show-me-the-cookies"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/65d15ceb-ab39-4088-a289-7244063aedf8?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:L",
"type": "CVSS_V3"
}
]
}
GHSA-HJR4-FHGP-23G9
Vulnerability from github – Published: 2022-05-24 17:42 – Updated: 2024-10-14 16:09This affects all versions of package qlib. The workflow function in cli part of qlib was using an unsafe YAML load function.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "pyqlib"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.7.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-23338"
],
"database_specific": {
"cwe_ids": [
"CWE-502",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-04-29T11:02:15Z",
"nvd_published_at": "2021-02-15T16:15:00Z",
"severity": "MODERATE"
},
"details": "This affects all versions of package qlib. The workflow function in cli part of qlib was using an unsafe YAML load function.",
"id": "GHSA-hjr4-fhgp-23g9",
"modified": "2024-10-14T16:09:46Z",
"published": "2022-05-24T17:42:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23338"
},
{
"type": "WEB",
"url": "https://github.com/418sec/huntr/pull/1329"
},
{
"type": "PACKAGE",
"url": "https://github.com/microsoft/qlib"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/pyqlib/PYSEC-2021-86.yaml"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/SNYK-PYTHON-PYQLIB-1085990"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-PYTHON-QLIB-1054635"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "qlib Deserialization of Untrusted Data vulnerability"
}
GHSA-HJRM-8RPX-3JV8
Vulnerability from github – Published: 2022-05-01 23:36 – Updated: 2022-05-01 23:36Multiple PHP remote file inclusion vulnerabilities in phpQLAdmin 2.2.7 allow remote attackers to execute arbitrary PHP code via a URL in the _SESSION[path] parameter to (1) ezmlm.php and (2) tools/update_translations.php.
{
"affected": [],
"aliases": [
"CVE-2008-1067"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-02-28T21:44:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in phpQLAdmin 2.2.7 allow remote attackers to execute arbitrary PHP code via a URL in the _SESSION[path] parameter to (1) ezmlm.php and (2) tools/update_translations.php.",
"id": "GHSA-hjrm-8rpx-3jv8",
"modified": "2022-05-01T23:36:24Z",
"published": "2022-05-01T23:36:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-1067"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5173"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/29076"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HM24-P578-9G92
Vulnerability from github – Published: 2022-05-02 03:30 – Updated: 2025-04-09 04:10inc/init.php in DokuWiki 2009-02-14, rc2009-02-06, and rc2009-01-30, when register_globals is enabled, allows remote attackers to include and execute arbitrary local files via the config_cascade[main][default][] parameter to doku.php. NOTE: PHP remote file inclusion is also possible in PHP 5 using ftp:// URLs.
{
"affected": [],
"aliases": [
"CVE-2009-1960"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-06-08T01:00:00Z",
"severity": "HIGH"
},
"details": "inc/init.php in DokuWiki 2009-02-14, rc2009-02-06, and rc2009-01-30, when register_globals is enabled, allows remote attackers to include and execute arbitrary local files via the config_cascade[main][default][] parameter to doku.php. NOTE: PHP remote file inclusion is also possible in PHP 5 using ftp:// URLs.",
"id": "GHSA-hm24-p578-9g92",
"modified": "2025-04-09T04:10:31Z",
"published": "2022-05-02T03:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-1960"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/8781"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/8812"
},
{
"type": "WEB",
"url": "http://bugs.splitbrain.org/index.php?do=details\u0026task_id=1700"
},
{
"type": "WEB",
"url": "http://dev.splitbrain.org/darcsweb/darcsweb.cgi?r=dokuwiki%3Ba=commitdiff%3Bh=20090526145030-7ad00-c0483e021f47898c8597f3bfbdd26c637f891d86.gz"
},
{
"type": "WEB",
"url": "http://dev.splitbrain.org/darcsweb/darcsweb.cgi?r=dokuwiki;a=commitdiff;h=20090526145030-7ad00-c0483e021f47898c8597f3bfbdd26c637f891d86.gz"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35218"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/35095"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HM25-53GR-MC5R
Vulnerability from github – Published: 2022-04-03 00:01 – Updated: 2022-04-09 00:00In all versions of GitLab CE/EE, certain Unicode characters can be abused to commit malicious code into projects without being noticed in merge request or source code viewer UI.
{
"affected": [],
"aliases": [
"CVE-2021-39908"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-04-01T23:15:00Z",
"severity": "HIGH"
},
"details": "In all versions of GitLab CE/EE, certain Unicode characters can be abused to commit malicious code into projects without being noticed in merge request or source code viewer UI.",
"id": "GHSA-hm25-53gr-mc5r",
"modified": "2022-04-09T00:00:39Z",
"published": "2022-04-03T00:01:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39908"
},
{
"type": "WEB",
"url": "https://hackerone.com/reports/1280077"
},
{
"type": "WEB",
"url": "https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-39908.json"
},
{
"type": "WEB",
"url": "https://gitlab.com/gitlab-org/gitlab/-/issues/337193"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-HM2W-V9FJ-73PW
Vulnerability from github – Published: 2022-05-17 00:41 – Updated: 2022-05-17 00:41Multiple PHP remote file inclusion vulnerabilities in Micronation Banking System (minba) 1.5.0 allow remote attackers to execute arbitrary PHP code via a URL in the minsoft_path parameter to (1) utdb_access.php and (2) utgn_message.php in utility/.
{
"affected": [],
"aliases": [
"CVE-2008-6006"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-01-30T18:30:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Micronation Banking System (minba) 1.5.0 allow remote attackers to execute arbitrary PHP code via a URL in the minsoft_path parameter to (1) utdb_access.php and (2) utgn_message.php in utility/.",
"id": "GHSA-hm2w-v9fj-73pw",
"modified": "2022-05-17T00:41:55Z",
"published": "2022-05-17T00:41:55Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6006"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/45529"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/6632"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/31492"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HM3P-P79C-PH3C
Vulnerability from github – Published: 2022-05-02 03:50 – Updated: 2022-05-02 03:50Mozilla Firefox before 3.0.16 and 3.5.x before 3.5.6, and SeaMonkey before 2.0.1, allows remote attackers to execute arbitrary JavaScript with chrome privileges by leveraging a reference to a chrome window from a content window, related to the window.opener property.
{
"affected": [],
"aliases": [
"CVE-2009-3986"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-12-17T17:30:00Z",
"severity": "HIGH"
},
"details": "Mozilla Firefox before 3.0.16 and 3.5.x before 3.5.6, and SeaMonkey before 2.0.1, allows remote attackers to execute arbitrary JavaScript with chrome privileges by leveraging a reference to a chrome window from a content window, related to the window.opener property.",
"id": "GHSA-hm3p-p79c-ph3c",
"modified": "2022-05-02T03:50:33Z",
"published": "2022-05-02T03:50:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-3986"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=522430"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=546724"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/54803"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11568"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A8489"
},
{
"type": "WEB",
"url": "https://rhn.redhat.com/errata/RHSA-2009-1674.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-December/msg00995.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-December/msg01034.html"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2009-December/msg01041.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37699"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37704"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37785"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37813"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37856"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/37881"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1023344"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1023345"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2009/dsa-1956"
},
{
"type": "WEB",
"url": "http://www.mozilla.org/security/announce/2009/mfsa2009-70.html"
},
{
"type": "WEB",
"url": "http://www.novell.com/linux/security/advisories/2009_63_firefox.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/37349"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/37365"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-873-1"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/USN-874-1"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2009/3547"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HM63-8HPC-WC5J
Vulnerability from github – Published: 2022-05-17 01:52 – Updated: 2022-05-17 01:52PHP remote file inclusion vulnerability in actions.php in the Allwebmenus plugin 1.1.3 for WordPress allows remote attackers to execute arbitrary PHP code via a URL in the abspath parameter.
{
"affected": [],
"aliases": [
"CVE-2011-3981"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2011-10-04T10:55:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in actions.php in the Allwebmenus plugin 1.1.3 for WordPress allows remote attackers to execute arbitrary PHP code via a URL in the abspath parameter.",
"id": "GHSA-hm63-8hpc-wc5j",
"modified": "2022-05-17T01:52:35Z",
"published": "2022-05-17T01:52:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-3981"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/69929"
},
{
"type": "WEB",
"url": "http://plugins.trac.wordpress.org/changeset/438959/allwebmenus-wordpress-menu-plugin/trunk/actions.php?old=408304\u0026old_path=allwebmenus-wordpress-menu-plugin%2Ftrunk%2Factions.php"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/46068"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/17861"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/49685"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HM6H-MCGV-H2X8
Vulnerability from github – Published: 2026-05-21 12:31 – Updated: 2026-05-21 12:31Insufficient Validation of Member Zone Data May Cause Catalog Zone Transfer to Fail
{
"affected": [],
"aliases": [
"CVE-2026-42396"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-21T10:16:25Z",
"severity": "MODERATE"
},
"details": "Insufficient Validation of Member Zone Data May Cause Catalog Zone Transfer to Fail",
"id": "GHSA-hm6h-mcgv-h2x8",
"modified": "2026-05-21T12:31:45Z",
"published": "2026-05-21T12:31:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-42396"
},
{
"type": "WEB",
"url": "https://docs.powerdns.com/authoritative/security-advisories/powerdns-advisory-powerdns-2026-06.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:N/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.