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.
8360 vulnerabilities reference this CWE, most recent first.
GHSA-8JX3-M8C9-XWM8
Vulnerability from github – Published: 2022-05-17 05:27 – Updated: 2024-10-10 15:30ESRI ArcMap 9 and ArcGIS 10.0.2.3200 and earlier does not properly prompt users before executing embedded VBA macros, which allows user-assisted remote attackers to execute arbitrary VBA code via a crafted map (.mxd) file.
{
"affected": [],
"aliases": [
"CVE-2012-1661"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-07-12T21:55:00Z",
"severity": "HIGH"
},
"details": "ESRI ArcMap 9 and ArcGIS 10.0.2.3200 and earlier does not properly prompt users before executing embedded VBA macros, which allows user-assisted remote attackers to execute arbitrary VBA code via a crafted map (.mxd) file.",
"id": "GHSA-8jx3-m8c9-xwm8",
"modified": "2024-10-10T15:30:30Z",
"published": "2022-05-17T05:27:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-1661"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.org/files/113644/ESRI-ArcMap-Arbitrary-Code-Execution.html"
},
{
"type": "WEB",
"url": "http://www.cs.umb.edu/~joecohen/exploits/CVE-2012-1661"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/19138"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/82986"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1027170"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8JXQ-75RW-FHJ9
Vulnerability from github – Published: 2018-07-12 20:29 – Updated: 2024-09-20 17:17io/mongo/parser.py in Eve (aka pyeve) before 0.7.5 allows remote attackers to execute arbitrary code via Code Injection in the where parameter.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "eve"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.7.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2018-8097"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:25:51Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "`io/mongo/parser.py` in Eve (aka pyeve) before 0.7.5 allows remote attackers to execute arbitrary code via Code Injection in the `where` parameter.",
"id": "GHSA-8jxq-75rw-fhj9",
"modified": "2024-09-20T17:17:54Z",
"published": "2018-07-12T20:29:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-8097"
},
{
"type": "WEB",
"url": "https://github.com/pyeve/eve/issues/1101"
},
{
"type": "WEB",
"url": "https://github.com/pyeve/eve/commit/f8f7019ffdf9b4e05faf95e1f04e204aa4c91f98"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-8jxq-75rw-fhj9"
},
{
"type": "PACKAGE",
"url": "https://github.com/pyeve/eve"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/eve/PYSEC-2018-8.yaml"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Eve allows execution of arbitrary code"
}
GHSA-8JXX-3X82-42H5
Vulnerability from github – Published: 2022-05-01 23:30 – Updated: 2022-05-01 23:30Multiple PHP remote file inclusion vulnerabilities in Lama Software allow remote attackers to execute arbitrary PHP code via a URL in the MY_CONF[classRoot] parameter to (1) inc.steps.access_error.php, (2) inc.steps.check_login.php, or (3) inc.steps.init_system.php in admin/functions/.
{
"affected": [],
"aliases": [
"CVE-2008-0423"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-01-23T22:00:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Lama Software allow remote attackers to execute arbitrary PHP code via a URL in the MY_CONF[classRoot] parameter to (1) inc.steps.access_error.php, (2) inc.steps.check_login.php, or (3) inc.steps.init_system.php in admin/functions/.",
"id": "GHSA-8jxx-3x82-42h5",
"modified": "2022-05-01T23:30:09Z",
"published": "2022-05-01T23:30:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-0423"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/39821"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4955"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/28442"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/27380"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/0230"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8M2F-74R2-X3F2
Vulnerability from github – Published: 2022-03-18 00:01 – Updated: 2022-03-18 22:41All versions of package accesslog are vulnerable to Arbitrary Code Injection due to the usage of the Function constructor without input sanitization. If (attacker-controlled) user input is given to the format option of the package's exported constructor function, it is possible for an attacker to execute arbitrary JavaScript code on the host that this package is being run on.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "accesslog"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-25760"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-03-18T22:41:34Z",
"nvd_published_at": "2022-03-17T12:15:00Z",
"severity": "HIGH"
},
"details": "All versions of package accesslog are vulnerable to Arbitrary Code Injection due to the usage of the Function constructor without input sanitization. If (attacker-controlled) user input is given to the format option of the package\u0027s exported constructor function, it is possible for an attacker to execute arbitrary JavaScript code on the host that this package is being run on.",
"id": "GHSA-8m2f-74r2-x3f2",
"modified": "2022-03-18T22:41:34Z",
"published": "2022-03-18T00:01:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-25760"
},
{
"type": "PACKAGE",
"url": "https://github.com/carlos8f/node-accesslog"
},
{
"type": "WEB",
"url": "https://github.com/carlos8f/node-accesslog/blob/master/lib/compile.js%23L6"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-ACCESSLOG-2312099"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L",
"type": "CVSS_V3"
}
],
"summary": "Code injection in accesslog"
}
GHSA-8M46-FV52-2GQ6
Vulnerability from github – Published: 2022-05-01 23:58 – Updated: 2022-05-01 23:58Unspecified vulnerability in the PDF distiller component in the BlackBerry Attachment Service in BlackBerry Unite! 1.0 SP1 (1.0.1) before bundle 36 and BlackBerry Enterprise Server 4.1 SP3 (4.1.3) through 4.1 SP5 (4.1.5) allows user-assisted remote attackers to execute arbitrary code via a crafted PDF file attachment.
{
"affected": [],
"aliases": [
"CVE-2008-3246"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-07-21T16:41:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in the PDF distiller component in the BlackBerry Attachment Service in BlackBerry Unite! 1.0 SP1 (1.0.1) before bundle 36 and BlackBerry Enterprise Server 4.1 SP3 (4.1.3) through 4.1 SP5 (4.1.5) allows user-assisted remote attackers to execute arbitrary code via a crafted PDF file attachment.",
"id": "GHSA-8m46-fv52-2gq6",
"modified": "2022-05-01T23:58:07Z",
"published": "2022-05-01T23:58:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-3246"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43840"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43843"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31092"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31141"
},
{
"type": "WEB",
"url": "http://www.blackberry.com/btsc/articles/635/KB15770_f.SAL_Public.html"
},
{
"type": "WEB",
"url": "http://www.blackberry.com/btsc/articles/660/KB15766_f.SAL_Public.html"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/289235"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1020505"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/2108/references"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8M52-QHHM-24HG
Vulnerability from github – Published: 2025-04-03 21:33 – Updated: 2025-04-04 18:30insightsoftware Hive JDBC through 2.6.13 has a remote code execution vulnerability. Attackers can inject malicious parameters into the JDBC URL, triggering JNDI injection during the process when the JDBC Driver uses this URL to connect to the database. This can further lead to remote code execution.
{
"affected": [],
"aliases": [
"CVE-2024-45199"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-04-03T21:15:38Z",
"severity": "HIGH"
},
"details": "insightsoftware Hive JDBC through 2.6.13 has a remote code execution vulnerability. Attackers can inject malicious parameters into the JDBC URL, triggering JNDI injection during the process when the JDBC Driver uses this URL to connect to the database. This can further lead to remote code execution.",
"id": "GHSA-8m52-qhhm-24hg",
"modified": "2025-04-04T18:30:54Z",
"published": "2025-04-03T21:33:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-45199"
},
{
"type": "WEB",
"url": "https://gist.github.com/azraelxuemo/d019ad079d540ef28870dbd9552a7c62"
}
],
"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-8M56-4WW2-95V5
Vulnerability from github – Published: 2022-05-02 03:57 – Updated: 2022-05-02 03:57PHP remote file inclusion vulnerability in anzeiger/start.php in Swinger Club Portal allows remote attackers to execute arbitrary PHP code via a URL in the go parameter.
{
"affected": [],
"aliases": [
"CVE-2009-4752"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-03-26T20:30:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in anzeiger/start.php in Swinger Club Portal allows remote attackers to execute arbitrary PHP code via a URL in the go parameter.",
"id": "GHSA-8m56-4ww2-95v5",
"modified": "2022-05-02T03:57:51Z",
"published": "2022-05-02T03:57:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2009-4752"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/51662"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/35724"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/55795"
},
{
"type": "WEB",
"url": "http://www.packetstormsecurity.org/0907-exploits/swingerclub-sqlrfi.txt"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8M5Q-X899-528F
Vulnerability from github – Published: 2026-07-23 15:30 – Updated: 2026-07-23 15:30In JetBrains TeamCity before 2026.1.2, 2025.11.6 сode execution via Kotlin DSL sandbox escape was possible
{
"affected": [],
"aliases": [
"CVE-2026-65906"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-23T13:16:31Z",
"severity": "HIGH"
},
"details": "In JetBrains TeamCity before 2026.1.2, 2025.11.6 \u0441ode execution via Kotlin DSL sandbox escape was possible",
"id": "GHSA-8m5q-x899-528f",
"modified": "2026-07-23T15:30:54Z",
"published": "2026-07-23T15:30:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-65906"
},
{
"type": "WEB",
"url": "https://www.jetbrains.com/privacy-security/issues-fixed"
}
],
"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-8M7G-3WF3-3HFF
Vulnerability from github – Published: 2022-05-02 06:10 – Updated: 2022-05-02 06:10Mozilla Firefox before 3.0.19, 3.5.x before 3.5.9, and 3.6.x before 3.6.2, and SeaMonkey before 2.0.4, does not prevent applets from interpreting mouse clicks as drag-and-drop actions, which allows remote attackers to execute arbitrary JavaScript with Chrome privileges by loading a chrome: URL and then loading a javascript: URL.
{
"affected": [],
"aliases": [
"CVE-2010-0178"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-04-05T17:30:00Z",
"severity": "HIGH"
},
"details": "Mozilla Firefox before 3.0.19, 3.5.x before 3.5.9, and 3.6.x before 3.6.2, and SeaMonkey before 2.0.4, does not prevent applets from interpreting mouse clicks as drag-and-drop actions, which allows remote attackers to execute arbitrary JavaScript with Chrome privileges by loading a chrome: URL and then loading a javascript: URL.",
"id": "GHSA-8m7g-3wf3-3hff",
"modified": "2022-05-02T06:10:42Z",
"published": "2022-05-02T06:10:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-0178"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=546909"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/57391"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10460"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6975"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2010-06/msg00001.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/39136"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/39240"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/39243"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/39308"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/39397"
},
{
"type": "WEB",
"url": "http://securitytracker.com/id?1023776"
},
{
"type": "WEB",
"url": "http://ubuntu.com/usn/usn-921-1"
},
{
"type": "WEB",
"url": "http://www.debian.org/security/2010/dsa-2027"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2010:070"
},
{
"type": "WEB",
"url": "http://www.mozilla.org/security/announce/2010/mfsa2010-20.html"
},
{
"type": "WEB",
"url": "http://www.redhat.com/support/errata/RHSA-2010-0332.html"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/0748"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/0764"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/0781"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2010/0849"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-8M88-59VR-3WH9
Vulnerability from github – Published: 2022-05-17 05:06 – Updated: 2022-05-17 05:06An unspecified function in Cisco Unified Communications Manager (CUCM) 7.1(x) through 9.1(2) allows remote authenticated users to execute arbitrary commands via unknown vectors, aka Bug ID CSCuh73440.
{
"affected": [],
"aliases": [
"CVE-2013-3402"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-07-18T12:48:00Z",
"severity": "MODERATE"
},
"details": "An unspecified function in Cisco Unified Communications Manager (CUCM) 7.1(x) through 9.1(2) allows remote authenticated users to execute arbitrary commands via unknown vectors, aka Bug ID CSCuh73440.",
"id": "GHSA-8m88-59vr-3wh9",
"modified": "2022-05-17T05:06:42Z",
"published": "2022-05-17T05:06:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-3402"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/54249"
},
{
"type": "WEB",
"url": "http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20130717-cucm"
}
],
"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.