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.
8400 vulnerabilities reference this CWE, most recent first.
GHSA-6P6Q-JPG9-MWPP
Vulnerability from github – Published: 2022-05-01 23:57 – Updated: 2022-05-01 23:57Multiple PHP remote file inclusion vulnerabilities in BoonEx Dolphin 6.1.2, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the (1) dir[plugins] parameter to (a) HTMLSax3.php and (b) safehtml.php in plugins/safehtml/ and the (2) sIncPath parameter to (c) ray/modules/global/inc/content.inc.php. NOTE: vector 1 might be a problem in SafeHTML instead of Dolphin.
{
"affected": [],
"aliases": [
"CVE-2008-3167"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-07-14T23:41:00Z",
"severity": "HIGH"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in BoonEx Dolphin 6.1.2, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the (1) dir[plugins] parameter to (a) HTMLSax3.php and (b) safehtml.php in plugins/safehtml/ and the (2) sIncPath parameter to (c) ray/modules/global/inc/content.inc.php. NOTE: vector 1 might be a problem in SafeHTML instead of Dolphin.",
"id": "GHSA-6p6q-jpg9-mwpp",
"modified": "2022-05-01T23:57:20Z",
"published": "2022-05-01T23:57:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-3167"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43647"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/6024"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30981"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30995"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/3993"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/30136"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P84-8GMV-PXFX
Vulnerability from github – Published: 2022-05-01 18:29 – Updated: 2022-05-01 18:29Multiple incomplete blacklist vulnerabilities in iziContents 1 RC6 and earlier allow remote attackers to execute arbitrary PHP code via a URL in (1) the admin_home parameter to modules/poll/poll_summary.php or (2) the rootdp parameter to include/db.php; or a URL in the language_home parameter to (3) search/search.php, (4) poll/inlinepoll.php, (5) poll/showpoll.php, (6) links/showlinks.php, or (7) links/submit_links.php in modules/; related to missing checks in (a) modules/moduleSec.php and (b) include/includeSec.php for inclusion of certain URLs, as demonstrated by an ftps:// URL.
{
"affected": [],
"aliases": [
"CVE-2007-5053"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-09-24T22:17:00Z",
"severity": "HIGH"
},
"details": "Multiple incomplete blacklist vulnerabilities in iziContents 1 RC6 and earlier allow remote attackers to execute arbitrary PHP code via a URL in (1) the admin_home parameter to modules/poll/poll_summary.php or (2) the rootdp parameter to include/db.php; or a URL in the language_home parameter to (3) search/search.php, (4) poll/inlinepoll.php, (5) poll/showpoll.php, (6) links/showlinks.php, or (7) links/submit_links.php in modules/; related to missing checks in (a) modules/moduleSec.php and (b) include/includeSec.php for inclusion of certain URLs, as demonstrated by an ftps:// URL.",
"id": "GHSA-6p84-8gmv-pxfx",
"modified": "2022-05-01T18:29:30Z",
"published": "2022-05-01T18:29:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-5053"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4441"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P85-RRMV-FXVW
Vulnerability from github – Published: 2022-05-01 23:54 – Updated: 2022-05-01 23:54PHP remote file inclusion vulnerability in includes/Cache/Lite/Output.php in the Cache_Lite package in Mambo 4.6.4 and earlier, when register_globals is enabled, allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.
{
"affected": [],
"aliases": [
"CVE-2008-2905"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-06-30T18:24:00Z",
"severity": "MODERATE"
},
"details": "PHP remote file inclusion vulnerability in includes/Cache/Lite/Output.php in the Cache_Lite package in Mambo 4.6.4 and earlier, when register_globals is enabled, allows remote attackers to execute arbitrary PHP code via a URL in the mosConfig_absolute_path parameter.",
"id": "GHSA-6p85-rrmv-fxvw",
"modified": "2022-05-01T23:54:36Z",
"published": "2022-05-01T23:54:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2905"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/43101"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/5808"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30685"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/29716"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1020295"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P99-9589-R79G
Vulnerability from github – Published: 2022-05-17 04:59 – Updated: 2022-05-17 04:59Multiple unspecified vulnerabilities in the CJDB_FILL_MEMORY_FROM_PPB function in the Project System (PS-IS) module for SAP ERP Central Component (ECC) allow remote attackers to execute arbitrary code via a (1) RFC or (2) SOAP-RFC request.
{
"affected": [],
"aliases": [
"CVE-2013-3244"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-10-24T00:55:00Z",
"severity": "MODERATE"
},
"details": "Multiple unspecified vulnerabilities in the CJDB_FILL_MEMORY_FROM_PPB function in the Project System (PS-IS) module for SAP ERP Central Component (ECC) allow remote attackers to execute arbitrary code via a (1) RFC or (2) SOAP-RFC request.",
"id": "GHSA-6p99-9589-r79g",
"modified": "2022-05-17T04:59:24Z",
"published": "2022-05-17T04:59:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-3244"
},
{
"type": "WEB",
"url": "https://service.sap.com/sap/support/notes/1776695"
},
{
"type": "WEB",
"url": "http://scn.sap.com/docs/DOC-8218"
},
{
"type": "WEB",
"url": "http://www.esnc.de/sap-security-audit-and-scan-services/security-advisories/58-remote-code-injection-in-sap-erp-project-system.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6P9P-CWCR-3XJ6
Vulnerability from github – Published: 2022-05-13 01:38 – Updated: 2022-05-13 01:38A code injection flaw was found in the way capacity and utilization imported control files are processed. A remote, authenticated attacker with access to the capacity and utilization feature could use this flaw to execute arbitrary code as the user CFME runs as.
{
"affected": [],
"aliases": [
"CVE-2016-5402"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-10-31T13:29:00Z",
"severity": "HIGH"
},
"details": "A code injection flaw was found in the way capacity and utilization imported control files are processed. A remote, authenticated attacker with access to the capacity and utilization feature could use this flaw to execute arbitrary code as the user CFME runs as.",
"id": "GHSA-6p9p-cwcr-3xj6",
"modified": "2022-05-13T01:38:48Z",
"published": "2022-05-13T01:38:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-5402"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2016:2839"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2016-5402"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=1357559"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-5402"
},
{
"type": "WEB",
"url": "http://rhn.redhat.com/errata/RHSA-2016-2839.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/94612"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-6P9Q-3FP4-FF53
Vulnerability from github – Published: 2022-10-31 19:00 – Updated: 2025-05-07 15:31D-Link DIR-846 devices with firmware 100A35 allow remote attackers to execute arbitrary code as root via HNAP1/control/SetGuestWLanSettings.php.
{
"affected": [],
"aliases": [
"CVE-2020-21016"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-10-31T13:15:00Z",
"severity": "CRITICAL"
},
"details": "D-Link DIR-846 devices with firmware 100A35 allow remote attackers to execute arbitrary code as root via HNAP1/control/SetGuestWLanSettings.php.",
"id": "GHSA-6p9q-3fp4-ff53",
"modified": "2025-05-07T15:31:19Z",
"published": "2022-10-31T19:00:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-21016"
},
{
"type": "WEB",
"url": "https://github.com/dahua966/Routers-vuls/blob/master/DIR-846/GuestWLanSetting_RCE.md"
},
{
"type": "WEB",
"url": "https://www.dlink.com/en/security-bulletin"
}
],
"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-6PGR-6FJC-HF4M
Vulnerability from github – Published: 2024-03-05 15:32 – Updated: 2024-08-05 18:31A reflected cross-site scripting (XSS) vulnerability exists in SuperCali version 1.1.0, allowing remote attackers to execute arbitrary JavaScript code via the email parameter in the bad_password.php page.
{
"affected": [],
"aliases": [
"CVE-2024-27627"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-05T14:15:49Z",
"severity": "MODERATE"
},
"details": "A reflected cross-site scripting (XSS) vulnerability exists in SuperCali version 1.1.0, allowing remote attackers to execute arbitrary JavaScript code via the email parameter in the bad_password.php page.",
"id": "GHSA-6pgr-6fjc-hf4m",
"modified": "2024-08-05T18:31:42Z",
"published": "2024-03-05T15:32:41Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-27627"
},
{
"type": "WEB",
"url": "https://packetstormsecurity.com/files/177254/SuperCali-1.1.0-Cross-Site-Scripting.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-6PHF-6H5G-97J2
Vulnerability from github – Published: 2023-05-23 20:07 – Updated: 2023-06-02 22:05Summary
Sqlite-jdbc addresses a remote code execution vulnerability via JDBC URL.
Impacted versions :
3.6.14.1-3.41.2.1
References
https://github.com/xerial/sqlite-jdbc/releases/tag/3.41.2.2
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.xerial:sqlite-jdbc"
},
"ranges": [
{
"events": [
{
"introduced": "3.6.14.1"
},
{
"fixed": "3.41.2.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-32697"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-05-23T20:07:58Z",
"nvd_published_at": "2023-05-23T23:15:09Z",
"severity": "HIGH"
},
"details": "## Summary\n\nSqlite-jdbc addresses a remote code execution vulnerability via JDBC URL. \n\n## Impacted versions : \n\n3.6.14.1-3.41.2.1\n \n## References\n\nhttps://github.com/xerial/sqlite-jdbc/releases/tag/3.41.2.2",
"id": "GHSA-6phf-6h5g-97j2",
"modified": "2023-06-02T22:05:04Z",
"published": "2023-05-23T20:07:58Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/xerial/sqlite-jdbc/security/advisories/GHSA-6phf-6h5g-97j2"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-32697"
},
{
"type": "PACKAGE",
"url": "https://github.com/xerial/sqlite-jdbc"
},
{
"type": "WEB",
"url": "https://github.com/xerial/sqlite-jdbc/releases/tag/3.41.2.2"
}
],
"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"
}
],
"summary": "Sqlite-jdbc vulnerable to remote code execution when JDBC url is attacker controlled"
}
GHSA-6PM2-HWQ9-C8RW
Vulnerability from github – Published: 2022-05-17 01:49 – Updated: 2025-04-11 03:55rvrender.dll in RealNetworks RealPlayer 11.x, 14.x, and 15.x before 15.02.71, and RealPlayer SP 1.0 through 1.1.5, allows remote attackers to execute arbitrary code via crafted flags in an RMFF file.
{
"affected": [],
"aliases": [
"CVE-2012-0922"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-02-08T15:55:00Z",
"severity": "HIGH"
},
"details": "rvrender.dll in RealNetworks RealPlayer 11.x, 14.x, and 15.x before 15.02.71, and RealPlayer SP 1.0 through 1.1.5, allows remote attackers to execute arbitrary code via crafted flags in an RMFF file.",
"id": "GHSA-6pm2-hwq9-c8rw",
"modified": "2025-04-11T03:55:17Z",
"published": "2022-05-17T01:49:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-0922"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/73018"
},
{
"type": "WEB",
"url": "http://osvdb.org/78911"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/47896"
},
{
"type": "WEB",
"url": "http://service.real.com/realplayer/security/02062012_player/en"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/51883"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6PM3-7HQJ-9F4C
Vulnerability from github – Published: 2022-05-17 01:47 – Updated: 2022-05-17 01:47Multiple PHP remote file inclusion vulnerabilities in Newscoop 3.5.x before 3.5.5 and 4 before RC4, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the GLOBALS[g_campsiteDir] parameter to (1) include/phorum_load.php, (2) conf/install_conf.php, or (3) conf/liveuser_configuration.php.
{
"affected": [],
"aliases": [
"CVE-2012-1933"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-08-27T21:55:00Z",
"severity": "MODERATE"
},
"details": "Multiple PHP remote file inclusion vulnerabilities in Newscoop 3.5.x before 3.5.5 and 4 before RC4, when register_globals is enabled, allow remote attackers to execute arbitrary PHP code via a URL in the GLOBALS[g_campsiteDir] parameter to (1) include/phorum_load.php, (2) conf/install_conf.php, or (3) conf/liveuser_configuration.php.",
"id": "GHSA-6pm3-7hqj-9f4c",
"modified": "2022-05-17T01:47:12Z",
"published": "2022-05-17T01:47:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-1933"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/75031"
},
{
"type": "WEB",
"url": "https://www.htbridge.com/advisory/HTB23084"
},
{
"type": "WEB",
"url": "http://archives.neohapsis.com/archives/bugtraq/2012-04/0130.html"
},
{
"type": "WEB",
"url": "http://dev.sourcefabric.org/browse/CS-4179"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/48769"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/18752"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/53147"
},
{
"type": "WEB",
"url": "http://www.sourcefabric.org/en/newscoop/latestrelease/1141/Newscoop-355-and-Newscoop-4-RC4-security-releases.htm"
}
],
"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.