CWE-77
Allowed-with-ReviewImproper Neutralization of Special Elements used in a Command ('Command Injection')
Abstraction: Class · Status: Draft
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
5382 vulnerabilities reference this CWE, most recent first.
GHSA-G2V5-2PCR-Q98P
Vulnerability from github – Published: 2023-12-01 03:30 – Updated: 2023-12-06 21:30An issue in TOTOLINK X6000R V9.4.0cu.652_B20230116 and V9.4.0cu.852_B20230719 allows a remote attacker to execute arbitrary code via the IP parameter of the setDiagnosisCfg component.
{
"affected": [],
"aliases": [
"CVE-2023-43453"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-12-01T02:15:07Z",
"severity": "CRITICAL"
},
"details": "An issue in TOTOLINK X6000R V9.4.0cu.652_B20230116 and V9.4.0cu.852_B20230719 allows a remote attacker to execute arbitrary code via the IP parameter of the setDiagnosisCfg component.",
"id": "GHSA-g2v5-2pcr-q98p",
"modified": "2023-12-06T21:30:58Z",
"published": "2023-12-01T03:30:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-43453"
},
{
"type": "WEB",
"url": "https://github.com/tharsis1024/vuln/blob/main/TOTOLINK/X6000R/2.md"
}
],
"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-G338-CR75-98GG
Vulnerability from github – Published: 2024-01-26 00:30 – Updated: 2024-01-26 00:30A command injection vulnerability exists in the gena.cgi module of D-Link DAP-1650 devices. An unauthenticated attacker can exploit this vulnerability to gain command execution on the device as root.
{
"affected": [],
"aliases": [
"CVE-2024-23624"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-01-26T00:15:10Z",
"severity": "CRITICAL"
},
"details": "A command injection vulnerability exists in the gena.cgi module of D-Link DAP-1650 devices. An unauthenticated attacker can exploit this vulnerability to gain command execution on the device as root.\n",
"id": "GHSA-g338-cr75-98gg",
"modified": "2024-01-26T00:30:30Z",
"published": "2024-01-26T00:30:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-23624"
},
{
"type": "WEB",
"url": "https://blog.exodusintel.com/2024/01/25/d-link-dap-1650-gena-cgi-subscribe-command-injection-vulnerability"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-G34C-MG6M-XVXJ
Vulnerability from github – Published: 2022-05-17 05:27 – Updated: 2023-02-06 20:08A Command Injection in action_power.py in Cobbler prior to v2.6.0 allows remote attackers to execute arbitrary commands via shell metacharacters in the (1) username or (2) password fields to the power_system method in the xmlrpc API.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "cobbler"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.6.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2012-2395"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": true,
"github_reviewed_at": "2023-02-06T20:08:52Z",
"nvd_published_at": "2012-06-16T00:55:00Z",
"severity": "HIGH"
},
"details": "A Command Injection in action_power.py in Cobbler prior to v2.6.0 allows remote attackers to execute arbitrary commands via shell metacharacters in the (1) username or (2) password fields to the power_system method in the xmlrpc API.",
"id": "GHSA-g34c-mg6m-xvxj",
"modified": "2023-02-06T20:08:53Z",
"published": "2022-05-17T05:27:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-2395"
},
{
"type": "WEB",
"url": "https://github.com/cobbler/cobbler/issues/141"
},
{
"type": "WEB",
"url": "https://github.com/cobbler/cobbler/commit/6d9167e5da44eca56bdf42b5776097a6779aaadf"
},
{
"type": "WEB",
"url": "https://bugs.launchpad.net/ubuntu/+source/cobbler/+bug/978999"
},
{
"type": "PACKAGE",
"url": "https://github.com/cobbler/cobbler"
},
{
"type": "WEB",
"url": "https://lists.opensuse.org/opensuse-security-announce/2012-05/msg00016.html"
},
{
"type": "WEB",
"url": "https://lists.opensuse.org/opensuse-security-announce/2012-07/msg00000.html"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20120712025653/http://www.securityfocus.com/bid/53666"
},
{
"type": "WEB",
"url": "https://www.openwall.com/lists/oss-security/2012/05/23/18"
},
{
"type": "WEB",
"url": "https://www.openwall.com/lists/oss-security/2012/05/23/4"
},
{
"type": "WEB",
"url": "https://www.osvdb.org/82458"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Cobbler subject to Command Injection"
}
GHSA-G359-P277-83P3
Vulnerability from github – Published: 2025-01-22 00:33 – Updated: 2025-01-22 15:32A remote code injection vulnerability exists in the Ambari Metrics and AMS Alerts feature, allowing authenticated users to inject and execute arbitrary code. The vulnerability occurs when processing alert definitions, where malicious input can be injected into the alert script execution path. An attacker with authenticated access can exploit this vulnerability to execute arbitrary commands on the server. The issue has been fixed in the latest versions of Ambari.
{
"affected": [],
"aliases": [
"CVE-2024-51941"
],
"database_specific": {
"cwe_ids": [
"CWE-75",
"CWE-77",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-21T22:15:12Z",
"severity": "HIGH"
},
"details": "A remote code injection vulnerability exists in the Ambari Metrics and \nAMS Alerts feature, allowing authenticated users to inject and execute \narbitrary code. The vulnerability occurs when processing alert \ndefinitions, where malicious input can be injected into the alert script\n execution path. An attacker with authenticated access can exploit this \nvulnerability to execute arbitrary commands on the server. The issue has\n been fixed in the latest versions of Ambari.",
"id": "GHSA-g359-p277-83p3",
"modified": "2025-01-22T15:32:33Z",
"published": "2025-01-22T00:33:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-51941"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/xq50nlff7o7z1kq3y637clzzl6mjhl8j"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2025/01/21/9"
}
],
"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-G37F-R5C6-X58F
Vulnerability from github – Published: 2023-12-14 09:30 – Updated: 2023-12-18 21:30There is a command injection vulnerability in some ZTE mobile internet products. Due to insufficient input validation of multiple network parameters, an authenticated attacker could use the vulnerability to execute arbitrary commands.
{
"affected": [],
"aliases": [
"CVE-2023-25643"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-12-14T08:15:38Z",
"severity": "HIGH"
},
"details": "\n\n\nThere is a command injection vulnerability in some ZTE mobile internet\u00a0products. Due to insufficient input\u00a0validation of\u00a0multiple network parameters, an authenticated attacker could use the vulnerability to execute arbitrary commands.\n\n\n\n",
"id": "GHSA-g37f-r5c6-x58f",
"modified": "2023-12-18T21:30:23Z",
"published": "2023-12-14T09:30:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-25643"
},
{
"type": "WEB",
"url": "https://support.zte.com.cn/support/news/LoopholeInfoDetail.aspx?newsId=1032504"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-G37X-JPMR-W7P9
Vulnerability from github – Published: 2023-07-06 19:24 – Updated: 2024-04-04 05:30An attacker with physical access to Moxa's bootloader versions of UC-8580 Series V1.1, UC-8540 Series V1.0 to V1.2, UC-8410A Series V2.2, UC-8200 Series V1.0 to V2.4, UC-8100A-ME-T Series V1.0 to V1.1, UC-8100 Series V1.2 to V1.3, UC-5100 Series V1.2, UC-3100 Series V1.2 to V2.0, UC-2100 Series V1.3 to V1.5, and UC-2100-W Series V1.3 to V1.5 can initiate a restart of the device and gain access to its BIOS. Command line options can then be altered, allowing the attacker to access the terminal. From the terminal, the attacker can modify the device’s authentication files to create a new user and gain full access to the system.
{
"affected": [],
"aliases": [
"CVE-2022-3086"
],
"database_specific": {
"cwe_ids": [
"CWE-1263",
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-02T20:15:00Z",
"severity": "HIGH"
},
"details": "An attacker with physical access to Moxa\u0027s bootloader versions of UC-8580 Series V1.1, UC-8540 Series V1.0 to V1.2, UC-8410A Series V2.2, UC-8200 Series V1.0 to V2.4, UC-8100A-ME-T Series V1.0 to V1.1, UC-8100 Series V1.2 to V1.3, UC-5100 Series V1.2, UC-3100 Series V1.2 to V2.0, UC-2100 Series V1.3 to V1.5, and UC-2100-W Series V1.3 to V1.5 can initiate a restart of the device and gain access to its BIOS. Command line options can then be altered, allowing the attacker to access the terminal. From the terminal, the attacker can modify the device\u2019s authentication files to create a new user and gain full access to the system.",
"id": "GHSA-g37x-jpmr-w7p9",
"modified": "2024-04-04T05:30:41Z",
"published": "2023-07-06T19:24:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-3086"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/uscert/ics/advisories/icsa-22-321-02"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/uscert/ics/advisories/icsa-22-333-04"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-G38C-WXJF-XRH6
Vulnerability from github – Published: 2025-09-22 18:01 – Updated: 2025-10-16 20:41Background on the vulnerability
This vulnerability manifests with the library's primary exported API: gitCommiters(options, callback)
which allows specifying options such as cwd for current working directory and revisionRange as a revision pointer, such as HEAD.
However, the library does not sanitize for user input or practice secure process execution API to separate commands from their arguments and as such, uncontrolled user input is concatenated into command execution.
Exploit
- Install
git-commiters@0.1.1or earlier - Initiaizlie a new Git directory with commits in it
- Create the following script in that directory:
var gitCommiters = require("git-commiters");
var options = {
cwd: "./",
revisionRange: "HEAD; touch /tmp/pwn; #",
};
gitCommiters(options, function (err, result) {
if (err) console.log(err);
else console.log(result);
});
- Observe new file created on disk at
/tmp/pwn
The git commiters functionality works as expected, too, despite the command execution, which further hinders the problem as it may not be apparent that a command injection occured on a running application.
@lirantal ➜ /workspaces/git-commiters.js (master) $ node app.js
[
{
email: 'github@qslw.com',
name: 'Morton Fox',
deletions: 1,
insertions: 1,
commits: 1
},
{
email: 'snowyu.lee@gmail.com',
name: 'Riceball LEE',
deletions: 11,
insertions: 1198,
commits: 7
}
]
@lirantal ➜ /workspaces/git-commiters.js (master) $ ls -alh /tmp/pwn
-rw-r--rw- 1 codespace codespace 0 Jul 1 06:09 /tmp/pwn
Credit
Liran Tal
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "git-commiters"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-59831"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2025-09-22T18:01:37Z",
"nvd_published_at": "2025-09-25T14:15:46Z",
"severity": "HIGH"
},
"details": "## Background on the vulnerability\n\nThis vulnerability manifests with the library\u0027s primary exported API: `gitCommiters(options, callback)`\nwhich allows specifying options such as `cwd` for current working directory and `revisionRange` as a revision pointer, such as `HEAD`.\n\nHowever, the library does not sanitize for user input or practice secure process execution API to separate commands from their arguments and as such, uncontrolled user input is concatenated into command execution.\n\n## Exploit\n\n1. Install `git-commiters@0.1.1` or earlier\n2. Initiaizlie a new Git directory with commits in it\n3. Create the following script in that directory:\n\n```js\nvar gitCommiters = require(\"git-commiters\");\n\nvar options = {\n cwd: \"./\",\n revisionRange: \"HEAD; touch /tmp/pwn; #\",\n};\ngitCommiters(options, function (err, result) {\n if (err) console.log(err);\n else console.log(result);\n});\n```\n\n3. Observe new file created on disk at `/tmp/pwn`\n\nThe git commiters functionality works as expected, too, despite the command execution, which further hinders the problem as it may not be apparent that a command injection occured on a running application.\n\n```sh\n@lirantal \u279c /workspaces/git-commiters.js (master) $ node app.js\n[\n {\n email: \u0027github@qslw.com\u0027,\n name: \u0027Morton Fox\u0027,\n deletions: 1,\n insertions: 1,\n commits: 1\n },\n {\n email: \u0027snowyu.lee@gmail.com\u0027,\n name: \u0027Riceball LEE\u0027,\n deletions: 11,\n insertions: 1198,\n commits: 7\n }\n]\n\n@lirantal \u279c /workspaces/git-commiters.js (master) $ ls -alh /tmp/pwn\n-rw-r--rw- 1 codespace codespace 0 Jul 1 06:09 /tmp/pwn\n```\n\n# Credit\n\nLiran Tal",
"id": "GHSA-g38c-wxjf-xrh6",
"modified": "2025-10-16T20:41:52Z",
"published": "2025-09-22T18:01:37Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/snowyu/git-commiters.js/security/advisories/GHSA-g38c-wxjf-xrh6"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-59831"
},
{
"type": "WEB",
"url": "https://github.com/snowyu/git-commiters.js/commit/7f0abfedbf506e3a61ac875d91324a8dbe756e84"
},
{
"type": "PACKAGE",
"url": "https://github.com/snowyu/git-commiters.js"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "`git-comiters` Command Injection vulnerability"
}
GHSA-G3H6-CFP7-4W45
Vulnerability from github – Published: 2023-01-05 09:30 – Updated: 2023-01-11 18:30Vulnerabilities in the ClearPass Policy Manager web-based management interface allow remote authenticated users to run arbitrary commands on the underlying host. Successful exploits could allow an attacker to execute arbitrary commands as root on the underlying operating system leading to complete system compromise in Aruba ClearPass Policy Manager version(s): ClearPass Policy Manager 6.10.x: 6.10.7 and below and ClearPass Policy Manager 6.9.x: 6.9.12 and below.
{
"affected": [],
"aliases": [
"CVE-2022-43536"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-01-05T07:15:00Z",
"severity": "HIGH"
},
"details": "Vulnerabilities in the ClearPass Policy Manager web-based management interface allow remote authenticated users to run arbitrary commands on the underlying host. Successful exploits could allow an attacker to execute arbitrary commands as root on the underlying operating system leading to complete system compromise in Aruba ClearPass Policy Manager version(s): ClearPass Policy Manager 6.10.x: 6.10.7 and below and ClearPass Policy Manager 6.9.x: 6.9.12 and below.",
"id": "GHSA-g3h6-cfp7-4w45",
"modified": "2023-01-11T18:30:31Z",
"published": "2023-01-05T09:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-43536"
},
{
"type": "WEB",
"url": "https://www.arubanetworks.com/assets/alert/ARUBA-PSA-2022-020.txt"
}
],
"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-G3PJ-7FP2-JHXR
Vulnerability from github – Published: 2024-03-26 21:30 – Updated: 2024-08-06 15:30Tenda AC18 V15.03.05.05 contains a command injection vulnerablility in the deviceName parameter of formsetUsbUnload function.
{
"affected": [],
"aliases": [
"CVE-2024-28545"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-03-26T21:15:53Z",
"severity": "CRITICAL"
},
"details": "Tenda AC18 V15.03.05.05 contains a command injection vulnerablility in the deviceName parameter of formsetUsbUnload function.",
"id": "GHSA-g3pj-7fp2-jhxr",
"modified": "2024-08-06T15:30:47Z",
"published": "2024-03-26T21:30:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-28545"
},
{
"type": "WEB",
"url": "https://github.com/abcdefg-png/IoT-vulnerable/blob/main/Tenda/AC18/setUsbUnload.md"
}
],
"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-G3Q6-9JXV-CJJG
Vulnerability from github – Published: 2021-12-27 00:00 – Updated: 2022-07-13 00:01Certain NETGEAR devices are affected by command injection by an authenticated user. This affects D7800 before 1.0.1.66, EX2700 before 1.0.1.68, WN3000RPv2 before 1.0.0.90, WN3000RPv3 before 1.0.2.100, LBR1020 before 2.6.5.20, LBR20 before 2.6.5.32, R6700AX before 1.0.10.110, R7800 before 1.0.2.86, R8900 before 1.0.5.38, R9000 before 1.0.5.38, RAX10 before 1.0.10.110, RAX120v1 before 1.2.3.28, RAX120v2 before 1.2.3.28, RAX70 before 1.0.10.110, RAX78 before 1.0.10.110, XR450 before 2.3.2.130, XR500 before 2.3.2.130, and XR700 before 1.0.1.46.
{
"affected": [],
"aliases": [
"CVE-2021-45602"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-12-26T01:15:00Z",
"severity": "HIGH"
},
"details": "Certain NETGEAR devices are affected by command injection by an authenticated user. This affects D7800 before 1.0.1.66, EX2700 before 1.0.1.68, WN3000RPv2 before 1.0.0.90, WN3000RPv3 before 1.0.2.100, LBR1020 before 2.6.5.20, LBR20 before 2.6.5.32, R6700AX before 1.0.10.110, R7800 before 1.0.2.86, R8900 before 1.0.5.38, R9000 before 1.0.5.38, RAX10 before 1.0.10.110, RAX120v1 before 1.2.3.28, RAX120v2 before 1.2.3.28, RAX70 before 1.0.10.110, RAX78 before 1.0.10.110, XR450 before 2.3.2.130, XR500 before 2.3.2.130, and XR700 before 1.0.1.46.",
"id": "GHSA-g3q6-9jxv-cjjg",
"modified": "2022-07-13T00:01:51Z",
"published": "2021-12-27T00:00:58Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45602"
},
{
"type": "WEB",
"url": "https://immersivelabs.com/resources/blog/netgear-vulnerabilities-could-put-small-business-routers-at-risk"
},
{
"type": "WEB",
"url": "https://kb.netgear.com/000064407/Security-Advisory-for-Post-Authentication-Command-Injection-Sensitive-Information-Disclosure-on-Multiple-Products-PSV-2021-0169-PSV-2021-0171"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
If at all possible, use library calls rather than external processes to recreate the desired functionality.
Mitigation
If possible, ensure that all external commands called from the program are statically created.
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.
Mitigation
Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.
Mitigation
Assign permissions that prevent the user from accessing/opening privileged files.
CAPEC-136: LDAP Injection
An attacker manipulates or crafts an LDAP query for the purpose of undermining the security of the target. Some applications use user input to create LDAP queries that are processed by an LDAP server. For example, a user might provide their username during authentication and the username might be inserted in an LDAP query during the authentication process. An attacker could use this input to inject additional commands into an LDAP query that could disclose sensitive information. For example, entering a * in the aforementioned query might return information about all users on the system. This attack is very similar to an SQL injection attack in that it manipulates a query to gather additional information or coerce a particular return value.
CAPEC-15: Command Delimiters
An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or denylist input validation, as opposed to allowlist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or denylist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
CAPEC-183: IMAP/SMTP Command Injection
An adversary exploits weaknesses in input validation on web-mail servers to execute commands on the IMAP/SMTP server. Web-mail servers often sit between the Internet and the IMAP or SMTP mail server. User requests are received by the web-mail servers which then query the back-end mail server for the requested information and return this response to the user. In an IMAP/SMTP command injection attack, mail-server commands are embedded in parts of the request sent to the web-mail server. If the web-mail server fails to adequately sanitize these requests, these commands are then sent to the back-end mail server when it is queried by the web-mail server, where the commands are then executed. This attack can be especially dangerous since administrators may assume that the back-end server is protected against direct Internet access and therefore may not secure it adequately against the execution of malicious commands.
CAPEC-248: Command Injection
An adversary looking to execute a command of their choosing, injects new items into an existing command thus modifying interpretation away from what was intended. Commands in this context are often standalone strings that are interpreted by a downstream component and cause specific responses. This type of attack is possible when untrusted values are used to build these command strings. Weaknesses in input validation or command construction can enable the attack and lead to successful exploitation.
CAPEC-40: Manipulating Writeable Terminal Devices
This attack exploits terminal devices that allow themselves to be written to by other users. The attacker sends command strings to the target terminal device hoping that the target user will hit enter and thereby execute the malicious command with their privileges. The attacker can send the results (such as copying /etc/passwd) to a known directory and collect once the attack has succeeded.
CAPEC-43: Exploiting Multiple Input Interpretation Layers
An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: <parser1> --> <input validator> --> <parser2>. In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
CAPEC-75: Manipulating Writeable Configuration Files
Generally these are manually edited files that are not in the preview of the system administrators, any ability on the attackers' behalf to modify these files, for example in a CVS repository, gives unauthorized access directly to the application, the same as authorized users.
CAPEC-76: Manipulating Web Input to File System Calls
An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.