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.
8355 vulnerabilities reference this CWE, most recent first.
GHSA-97HM-2MFR-2P97
Vulnerability from github – Published: 2023-07-08 09:30 – Updated: 2023-07-10 21:43Code Injection in GitHub repository nilsteampassnet/teampass prior to 3.0.10.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "nilsteampassnet/teampass"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.0.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-3551"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2023-07-10T21:43:16Z",
"nvd_published_at": "2023-07-08T09:15:42Z",
"severity": "CRITICAL"
},
"details": " Code Injection in GitHub repository nilsteampassnet/teampass prior to 3.0.10.",
"id": "GHSA-97hm-2mfr-2p97",
"modified": "2023-07-10T21:43:16Z",
"published": "2023-07-08T09:30:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-3551"
},
{
"type": "WEB",
"url": "https://github.com/nilsteampassnet/teampass/commit/cc6abc76aa46ed4a27736c1d2f21e432a5d54e6f"
},
{
"type": "PACKAGE",
"url": "https://github.com/nilsteampassnet/teampass"
},
{
"type": "WEB",
"url": "https://huntr.dev/bounties/cf8878ff-6cd9-49be-b313-7ac2a94fc7f7"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "TeamPass Code Injection vulnerability"
}
GHSA-97JV-C342-5XHC
Vulnerability from github – Published: 2022-12-19 15:30 – Updated: 2022-12-29 23:37A vulnerability classified as critical has been found in Furqan node-whois. Affected is an unknown function of the file index.coffee. The manipulation leads to improperly controlled modification of object prototype attributes ('prototype pollution'). It is possible to launch the attack remotely. The name of the patch is 46ccc2aee8d063c7b6b4dee2c2834113b7286076. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-216252.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "whois"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.13.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-36618"
],
"database_specific": {
"cwe_ids": [
"CWE-1321",
"CWE-74",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-12-19T18:24:03Z",
"nvd_published_at": "2022-12-19T14:15:00Z",
"severity": "CRITICAL"
},
"details": "A vulnerability classified as critical has been found in Furqan node-whois. Affected is an unknown function of the file `index.coffee`. The manipulation leads to improperly controlled modification of object prototype attributes (\u0027prototype pollution\u0027). It is possible to launch the attack remotely. The name of the patch is 46ccc2aee8d063c7b6b4dee2c2834113b7286076. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-216252.",
"id": "GHSA-97jv-c342-5xhc",
"modified": "2022-12-29T23:37:10Z",
"published": "2022-12-19T15:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-36618"
},
{
"type": "WEB",
"url": "https://github.com/FurqanSoftware/node-whois/pull/105"
},
{
"type": "WEB",
"url": "https://github.com/FurqanSoftware/node-whois/commit/46ccc2aee8d063c7b6b4dee2c2834113b7286076"
},
{
"type": "PACKAGE",
"url": "https://github.com/FurqanSoftware/node-whois"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.216252"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20220403104013/https://www.npmjs.com/package/whois"
}
],
"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"
}
],
"summary": "FurqanSoftware/node-whois vulnerable to Prototype Pollution"
}
GHSA-97M3-W2CP-4XX6
Vulnerability from github – Published: 2022-03-16 23:54 – Updated: 2022-03-25 19:58The package node-ipc versions 10.1.1 and 10.1.2 are vulnerable to embedded malicious code that was introduced by the maintainer. The malicious code was intended to overwrite arbitrary files dependent upon the geo-location of the user IP address. The maintainer removed the malicious code in version 10.1.3.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "node-ipc"
},
"ranges": [
{
"events": [
{
"introduced": "10.1.1"
},
{
"fixed": "10.1.3"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-23812"
],
"database_specific": {
"cwe_ids": [
"CWE-506",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2022-03-16T23:54:32Z",
"nvd_published_at": "2022-03-16T16:15:00Z",
"severity": "CRITICAL"
},
"details": "The package node-ipc versions 10.1.1 and 10.1.2 are vulnerable to embedded malicious code that was introduced by the maintainer. The malicious code was intended to overwrite arbitrary files dependent upon the geo-location of the user IP address. The maintainer removed the malicious code in version 10.1.3.",
"id": "GHSA-97m3-w2cp-4xx6",
"modified": "2022-03-25T19:58:47Z",
"published": "2022-03-16T23:54:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23812"
},
{
"type": "WEB",
"url": "https://github.com/RIAEvangelist/node-ipc/issues/233"
},
{
"type": "WEB",
"url": "https://github.com/RIAEvangelist/node-ipc/issues/236"
},
{
"type": "WEB",
"url": "https://github.com/RIAEvangelist/node-ipc/commit/847047cf7f81ab08352038b2204f0e7633449580"
},
{
"type": "PACKAGE",
"url": "https://github.com/RIAEvangelist/node-ipc"
},
{
"type": "WEB",
"url": "https://github.com/RIAEvangelist/node-ipc/blob/847047cf7f81ab08352038b2204f0e7633449580/dao/ssl-geospec.js"
},
{
"type": "WEB",
"url": "https://security.netapp.com/advisory/ntap-20220407-0005"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-NODEIPC-2426370"
}
],
"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"
}
],
"summary": "Embedded Malicious Code in node-ipc"
}
GHSA-97M5-3F7J-2CCV
Vulnerability from github – Published: 2024-12-06 12:30 – Updated: 2024-12-06 12:30The The ARMember – Membership Plugin, Content Restriction, Member Levels, User Profile & User signup plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 4.0.51. 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 authenticated attackers, with subscriber-level access and above, to execute arbitrary shortcodes.
{
"affected": [],
"aliases": [
"CVE-2024-10681"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-06T10:15:04Z",
"severity": "MODERATE"
},
"details": "The The ARMember \u2013 Membership Plugin, Content Restriction, Member Levels, User Profile \u0026 User signup plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 4.0.51. 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 authenticated attackers, with subscriber-level access and above, to execute arbitrary shortcodes.",
"id": "GHSA-97m5-3f7j-2ccv",
"modified": "2024-12-06T12:30:47Z",
"published": "2024-12-06T12:30:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10681"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3199747/armember-membership/trunk/core/classes/class.arm_shortcodes.php"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/ee0eead2-3eab-4a2a-bfe4-c0d8f91dc0a5?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-97M8-V3GC-QQ69
Vulnerability from github – Published: 2022-05-17 00:41 – Updated: 2022-05-17 00:41Eval injection vulnerability in reserve.php in phpScheduleIt 1.2.10 and earlier, when magic_quotes_gpc is disabled, allows remote attackers to execute arbitrary PHP code via the start_date parameter.
{
"affected": [],
"aliases": [
"CVE-2008-6132"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2009-02-13T18:30:00Z",
"severity": "MODERATE"
},
"details": "Eval injection vulnerability in reserve.php in phpScheduleIt 1.2.10 and earlier, when magic_quotes_gpc is disabled, allows remote attackers to execute arbitrary PHP code via the start_date parameter.",
"id": "GHSA-97m8-v3gc-qq69",
"modified": "2022-05-17T00:41:19Z",
"published": "2022-05-17T00:41:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-6132"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/45617"
},
{
"type": "WEB",
"url": "http://phpscheduleit.svn.sourceforge.net/viewvc/phpscheduleit/1.2.11/reserve.php?r1=318\u0026r2=328"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/32073"
},
{
"type": "WEB",
"url": "http://sourceforge.net/project/shownotes.php?release_id=662749"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/18037"
},
{
"type": "WEB",
"url": "http://www.exploit-db.com/exploits/6646"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/48797"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/31520"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-97V8-QWGF-963F
Vulnerability from github – Published: 2022-05-24 17:11 – Updated: 2022-05-24 17:11An issue was discovered in ONAP HOLMES before Dublin. By accessing port 9202 of dep-holmes-engine-mgmt pod, an unauthenticated attacker (who already has access to pod-to-pod communication) may execute arbitrary code inside that pod. All ONAP Operations Manager (OOM) setups are affected.
{
"affected": [],
"aliases": [
"CVE-2019-12114"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-03-18T19:15:00Z",
"severity": "HIGH"
},
"details": "An issue was discovered in ONAP HOLMES before Dublin. By accessing port 9202 of dep-holmes-engine-mgmt pod, an unauthenticated attacker (who already has access to pod-to-pod communication) may execute arbitrary code inside that pod. All ONAP Operations Manager (OOM) setups are affected.",
"id": "GHSA-97v8-qwgf-963f",
"modified": "2022-05-24T17:11:45Z",
"published": "2022-05-24T17:11:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-12114"
},
{
"type": "WEB",
"url": "https://jira.onap.org/browse/OJSI-10"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-97VM-C39P-JR86
Vulnerability from github – Published: 2025-08-13 21:30 – Updated: 2026-06-09 11:56Spreecommerce versions prior to 0.60.2 contains a remote command execution vulnerability in its search functionality. The application fails to properly sanitize input passed via the search[send][] parameter, which is dynamically invoked using Ruby’s send method. This allows attackers to execute arbitrary shell commands on the server without authentication.
{
"affected": [
{
"package": {
"ecosystem": "RubyGems",
"name": "spree"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.60.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2011-10019"
],
"database_specific": {
"cwe_ids": [
"CWE-1321",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-13T20:33:40Z",
"nvd_published_at": "2025-08-13T21:15:29Z",
"severity": "CRITICAL"
},
"details": "Spreecommerce versions prior to 0.60.2 contains a remote command execution vulnerability in its search functionality. The application fails to properly sanitize input passed via the search[send][] parameter, which is dynamically invoked using Ruby\u2019s send method. This allows attackers to execute arbitrary shell commands on the server without authentication.",
"id": "GHSA-97vm-c39p-jr86",
"modified": "2026-06-09T11:56:05Z",
"published": "2025-08-13T21:30:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2011-10019"
},
{
"type": "WEB",
"url": "https://github.com/orgs/spree"
},
{
"type": "WEB",
"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/spree/CVE-2011-10019.yml"
},
{
"type": "PACKAGE",
"url": "https://github.com/spree/spree"
},
{
"type": "WEB",
"url": "https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/multi/http/spree_search_exec.rb"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20111009192436/http://spreecommerce.com/blog/2011/10/05/remote-command-product-group"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/17941"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/spreecommerce-search-parameter-rce"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H",
"type": "CVSS_V4"
}
],
"summary": "Spree has Remote Command Execution vulnerability in search functionality"
}
GHSA-97WJ-4Q63-7PP6
Vulnerability from github – Published: 2023-10-30 15:30 – Updated: 2026-04-08 18:32The Ads by datafeedr.com plugin for WordPress is vulnerable to Remote Code Execution in versions up to, and including, 1.1.3 via the 'dfads_ajax_load_ads' function. This allows unauthenticated attackers to execute code on the server. The parameters of the callable function are limited, they cannot be specified arbitrarily.
{
"affected": [],
"aliases": [
"CVE-2023-5843"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-10-30T14:15:10Z",
"severity": "CRITICAL"
},
"details": "The Ads by datafeedr.com plugin for WordPress is vulnerable to Remote Code Execution in versions up to, and including, 1.1.3 via the \u0027dfads_ajax_load_ads\u0027 function. This allows unauthenticated attackers to execute code on the server. The parameters of the callable function are limited, they cannot be specified arbitrarily.",
"id": "GHSA-97wj-4q63-7pp6",
"modified": "2026-04-08T18:32:23Z",
"published": "2023-10-30T15:30:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-5843"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/ads-by-datafeedrcom/tags/1.1.3/inc/dfads.class.php#L34"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/2991088/ads-by-datafeedrcom"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/5412fd87-49bc-445c-8d16-443e38933d1e?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-985F-QC8V-Q2P6
Vulnerability from github – Published: 2022-05-17 02:58 – Updated: 2022-05-17 02:58LogInOut.php in Simple Machines Forum (SMF) 2.1 allows remote attackers to conduct PHP object injection attacks and execute arbitrary PHP code via vectors related to variables derived from user input in a foreach loop.
{
"affected": [],
"aliases": [
"CVE-2016-5727"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-02-09T15:59:00Z",
"severity": "HIGH"
},
"details": "LogInOut.php in Simple Machines Forum (SMF) 2.1 allows remote attackers to conduct PHP object injection attacks and execute arbitrary PHP code via vectors related to variables derived from user input in a foreach loop.",
"id": "GHSA-985f-qc8v-q2p6",
"modified": "2022-05-17T02:58:00Z",
"published": "2022-05-17T02:58:00Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-5727"
},
{
"type": "WEB",
"url": "https://github.com/SimpleMachines/SMF2.1/issues/3522"
},
{
"type": "WEB",
"url": "https://github.com/SimpleMachines/SMF2.1/commit/19e560b9f3e8fc6d7d9d60c1ff617b5ed5c08008#diff-513c4f9c501cbefcc14420c01848f23c"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2016/06/10/7"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2016/06/18/1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-9875-CW22-F7CX
Vulnerability from github – Published: 2025-06-13 20:40 – Updated: 2025-06-13 20:40Impact
Any user with edit right on a page (could be the user's profile) can execute code (Groovy, Python, Velocity) with programming right by defining a wiki macro. This allows full access to the whole XWiki installation and thus impacts its confidentiality, integrity and availability. The main problem is that if a wiki macro parameter allows wiki syntax, its default value is executed with the rights of the author of the document where it is used. This can be exploited by overriding a macro like the children macro that is used in a page that has programming right like the page XWiki.ChildrenMacro and thus allows arbitrary script macros. The full reproduction steps can be found in the original issue.
Patches
This vulnerability has been patched in XWiki 16.4.7, 16.10.3 and 17.0.0 by executing wiki parameters with the rights of the wiki macro's author when the parameter's value is the default value.
Workarounds
We're not aware of any workarounds except for upgrading.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 12.0"
},
"package": {
"ecosystem": "Maven",
"name": "org.xwiki.platform:xwiki-platform-rendering-wikimacro-store"
},
"ranges": [
{
"events": [
{
"introduced": "11.10.11"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c 12.7"
},
"package": {
"ecosystem": "Maven",
"name": "org.xwiki.platform:xwiki-platform-rendering-wikimacro-store"
},
"ranges": [
{
"events": [
{
"introduced": "12.6.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.xwiki.platform:xwiki-platform-rendering-wikimacro-store"
},
"ranges": [
{
"events": [
{
"introduced": "12.8-rc-1"
},
{
"fixed": "16.4.7"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.xwiki.platform:xwiki-platform-rendering-wikimacro-store"
},
"ranges": [
{
"events": [
{
"introduced": "16.5.0-rc-1"
},
{
"fixed": "16.10.3"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.xwiki.platform:xwiki-platform-rendering-wikimacro-store"
},
"ranges": [
{
"events": [
{
"introduced": "17.0.0-rc-1"
},
{
"fixed": "17.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-49581"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-06-13T20:40:19Z",
"nvd_published_at": "2025-06-13T16:15:27Z",
"severity": "HIGH"
},
"details": "### Impact\nAny user with edit right on a page (could be the user\u0027s profile) can execute code (Groovy, Python, Velocity) with programming right by defining a wiki macro. This allows full access to the whole XWiki installation and thus impacts its confidentiality, integrity and availability. The main problem is that if a wiki macro parameter allows wiki syntax, its default value is executed with the rights of the author of the document where it is used. This can be exploited by overriding a macro like the `children` macro that is used in a page that has programming right like the page `XWiki.ChildrenMacro` and thus allows arbitrary script macros. The full reproduction steps can be found in the [original issue](https://jira.xwiki.org/browse/XWIKI-22760).\n\n### Patches\nThis vulnerability has been patched in XWiki 16.4.7, 16.10.3 and 17.0.0 by executing wiki parameters with the rights of the wiki macro\u0027s author when the parameter\u0027s value is the default value.\n\n### Workarounds\nWe\u0027re not aware of any workarounds except for upgrading.",
"id": "GHSA-9875-cw22-f7cx",
"modified": "2025-06-13T20:40:19Z",
"published": "2025-06-13T20:40:19Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-9875-cw22-f7cx"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-49581"
},
{
"type": "WEB",
"url": "https://github.com/xwiki/xwiki-platform/commit/c99d501ed41cbee6a3c02ff927714531570789de"
},
{
"type": "PACKAGE",
"url": "https://github.com/xwiki/xwiki-platform"
},
{
"type": "WEB",
"url": "https://jira.xwiki.org/browse/XWIKI-22760"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "XWiki allows remote code execution through default value of wiki macro wiki-type parameters"
}
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.