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.
8691 vulnerabilities reference this CWE, most recent first.
GHSA-HJ9P-PJ53-VPRR
Vulnerability from github – Published: 2022-05-14 01:23 – Updated: 2022-05-14 01:23Simple Machines Forum (SMF) 2.0.4 allows PHP Code Injection via the index.php?action=admin;area=languages;sa=editlang dictionary parameter.
{
"affected": [],
"aliases": [
"CVE-2013-7468"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-03-07T23:29:00Z",
"severity": "HIGH"
},
"details": "Simple Machines Forum (SMF) 2.0.4 allows PHP Code Injection via the index.php?action=admin;area=languages;sa=editlang dictionary parameter.",
"id": "GHSA-hj9p-pj53-vprr",
"modified": "2022-05-14T01:23:15Z",
"published": "2022-05-14T01:23:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-7468"
},
{
"type": "WEB",
"url": "https://packetstormsecurity.com/files/121391/public_phpInjection-smf204.txt"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-HJCX-6R9F-F974
Vulnerability from github – Published: 2022-04-29 00:00 – Updated: 2022-05-06 00:00In JetBrains Rider before 2022.1 local code execution via links in ReSharper Quick Documentation was possible
{
"affected": [],
"aliases": [
"CVE-2022-29821"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-04-28T10:15:00Z",
"severity": "HIGH"
},
"details": "In JetBrains Rider before 2022.1 local code execution via links in ReSharper Quick Documentation was possible",
"id": "GHSA-hjcx-6r9f-f974",
"modified": "2022-05-06T00:00:54Z",
"published": "2022-04-29T00:00:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-29821"
},
{
"type": "WEB",
"url": "https://www.jetbrains.com/privacy-security/issues-fixed"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-HJFH-3QCG-J4X3
Vulnerability from github – Published: 2025-12-01 18:30 – Updated: 2025-12-01 21:30The service wmp-agent of KerOS prior 5.12 does not properly validate so-called ‘magic URLs’ allowing an unauthenticated remote attacker to execute arbitrary OS commands as root when the service is reachable over network. Typically, the service is protected via local firewall.
{
"affected": [],
"aliases": [
"CVE-2024-39148"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-01T16:15:49Z",
"severity": "HIGH"
},
"details": "The service wmp-agent of KerOS prior 5.12 does not properly validate so-called \u2018magic URLs\u2019 allowing an unauthenticated remote attacker to execute arbitrary OS commands as root when the service is reachable over network. Typically, the service is protected via local firewall.",
"id": "GHSA-hjfh-3qcg-j4x3",
"modified": "2025-12-01T21:30:26Z",
"published": "2025-12-01T18:30:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-39148"
},
{
"type": "WEB",
"url": "https://keros.docs.kerlink.com/security/security_advisories_kerOS5"
},
{
"type": "WEB",
"url": "https://www.bdosecurity.de/en-gb/advisories/cve-2024-39148"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-HJG5-F4M4-GJFX
Vulnerability from github – Published: 2022-05-01 07:46 – Updated: 2022-05-01 07:46PHP remote file inclusion vulnerability in mod/nc_phpmyadmin/core/libraries/Theme_Manager.class.php in Ixprim 2.0 allows remote attackers to execute arbitrary PHP code via a URL in an unspecified parameter. NOTE: the provenance of this information is unknown; the details are obtained solely from third party information.
{
"affected": [],
"aliases": [
"CVE-2006-7237"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-03-31T17:30:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in mod/nc_phpmyadmin/core/libraries/Theme_Manager.class.php in Ixprim 2.0 allows remote attackers to execute arbitrary PHP code via a URL in an unspecified parameter. NOTE: the provenance of this information is unknown; the details are obtained solely from third party information.",
"id": "GHSA-hjg5-f4m4-gjfx",
"modified": "2022-05-01T07:46:08Z",
"published": "2022-05-01T07:46:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2006-7237"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42471"
},
{
"type": "WEB",
"url": "http://downloads.securityfocus.com/vulnerabilities/exploits/19816.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/19816"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-HJGH-VH3C-8RG8
Vulnerability from github – Published: 2024-01-16 18:31 – Updated: 2025-03-18 18:30Rejected reason: To maintain compliance with CNA rules, we have rejected this CVE record because it has not been used.
{
"affected": [],
"aliases": [
"CVE-2023-22514"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-01-16T18:15:09Z",
"severity": "HIGH"
},
"details": "Rejected reason: To maintain compliance with CNA rules, we have rejected this CVE record because it has not been used.",
"id": "GHSA-hjgh-vh3c-8rg8",
"modified": "2025-03-18T18:30:38Z",
"published": "2024-01-16T18:31:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-22514"
},
{
"type": "WEB",
"url": "https://confluence.atlassian.com/pages/viewpage.action?pageId=1299929380"
},
{
"type": "WEB",
"url": "https://jira.atlassian.com/browse/SRCTREE-8076"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-HJHG-JPH5-3MXH
Vulnerability from github – Published: 2025-08-27 12:30 – Updated: 2025-08-27 12:30In the Print.pl service, the "uhcPrintServerPrint" function allows execution of arbitrary code via the "CopyCounter" parameter.
{
"affected": [],
"aliases": [
"CVE-2025-2313"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-27T11:15:30Z",
"severity": "CRITICAL"
},
"details": "In the Print.pl service, the \"uhcPrintServerPrint\" function allows execution of arbitrary code via the \"CopyCounter\" parameter.",
"id": "GHSA-hjhg-jph5-3mxh",
"modified": "2025-08-27T12:30:26Z",
"published": "2025-08-27T12:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-2313"
},
{
"type": "WEB",
"url": "https://cert.pl/en/posts/2025/08/CVE-2025-2313"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/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-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": []
}
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.