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.
5386 vulnerabilities reference this CWE, most recent first.
GHSA-MW25-45P2-8556
Vulnerability from github – Published: 2022-02-25 00:01 – Updated: 2023-08-08 15:31TOTOLink A3100R V4.1.2cu.5050_B20200504 was discovered to contain a command injection vulnerability in the "Main" function. This vulnerability allows attackers to execute arbitrary commands via the QUERY_STRING parameter.
{
"affected": [],
"aliases": [
"CVE-2022-25077"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-02-24T15:15:00Z",
"severity": "CRITICAL"
},
"details": "TOTOLink A3100R V4.1.2cu.5050_B20200504 was discovered to contain a command injection vulnerability in the \"Main\" function. This vulnerability allows attackers to execute arbitrary commands via the QUERY_STRING parameter.",
"id": "GHSA-mw25-45p2-8556",
"modified": "2023-08-08T15:31:44Z",
"published": "2022-02-25T00:01:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-25077"
},
{
"type": "WEB",
"url": "https://github.com/EPhaha/IOT_vuln/blob/main/TOTOLink/A3100R/README.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-MW2V-P95M-2VQG
Vulnerability from github – Published: 2023-07-15 00:30 – Updated: 2024-04-04 06:09WAYOS FBM-291W 19.09.11V was discovered to contain a command injection vulnerability via the component /upgrade_filter.asp.
{
"affected": [],
"aliases": [
"CVE-2023-37794"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-07-14T23:15:09Z",
"severity": "CRITICAL"
},
"details": "WAYOS FBM-291W 19.09.11V was discovered to contain a command injection vulnerability via the component /upgrade_filter.asp.",
"id": "GHSA-mw2v-p95m-2vqg",
"modified": "2024-04-04T06:09:08Z",
"published": "2023-07-15T00:30:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-37794"
},
{
"type": "WEB",
"url": "https://github.com/PwnYouLin/IOT_vul/tree/main/wayos/1"
}
],
"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-MW3P-XPCV-H9GQ
Vulnerability from github – Published: 2024-11-07 18:31 – Updated: 2024-11-07 18:31A vulnerability, which was classified as critical, has been found in TOTOLINK X18 9.1.0cu.2024_B20220329. Affected by this issue is some unknown functionality of the file /cgi-bin/cstecgi.cgi. The manipulation of the argument enable leads to os command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.
{
"affected": [],
"aliases": [
"CVE-2024-10966"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-07T18:15:16Z",
"severity": "MODERATE"
},
"details": "A vulnerability, which was classified as critical, has been found in TOTOLINK X18 9.1.0cu.2024_B20220329. Affected by this issue is some unknown functionality of the file /cgi-bin/cstecgi.cgi. The manipulation of the argument enable leads to os command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.",
"id": "GHSA-mw3p-xpcv-h9gq",
"modified": "2024-11-07T18:31:24Z",
"published": "2024-11-07T18:31:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10966"
},
{
"type": "WEB",
"url": "https://github.com/Dreamy-elfland/240914"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.283412"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.283412"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.437310"
},
{
"type": "WEB",
"url": "https://www.totolink.net"
},
{
"type": "WEB",
"url": "https://www.youtube.com/watch?v=zRNv1OvT55c"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-MW65-XRM6-GRCV
Vulnerability from github – Published: 2023-01-23 18:30 – Updated: 2025-04-02 18:30The management portal component of JetNexus/EdgeNexus ADC 4.2.8 was discovered to contain a command injection vulnerability. This vulnerability allows authenticated attackers to execute arbitrary commands through a specially crafted payload. This vulnerability can also be exploited from an unauthenticated context via unspecified vectors
{
"affected": [],
"aliases": [
"CVE-2022-37718"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-01-23T17:15:00Z",
"severity": "HIGH"
},
"details": "The management portal component of JetNexus/EdgeNexus ADC 4.2.8 was discovered to contain a command injection vulnerability. This vulnerability allows authenticated attackers to execute arbitrary commands through a specially crafted payload. This vulnerability can also be exploited from an unauthenticated context via unspecified vectors",
"id": "GHSA-mw65-xrm6-grcv",
"modified": "2025-04-02T18:30:43Z",
"published": "2023-01-23T18:30:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-37718"
},
{
"type": "WEB",
"url": "https://www.cryptnetix.com/blog/2022/09/14/Edge-Nexus-Vulnerability-Disclosure.html"
},
{
"type": "WEB",
"url": "https://www.edgenexus.io/products/load-balancer"
}
],
"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-MWJQ-Q4W6-76FX
Vulnerability from github – Published: 2025-03-02 21:30 – Updated: 2025-03-02 21:30A vulnerability was found in TOTOLINK X18 9.1.0cu.2024_B20220329. It has been declared as critical. This vulnerability affects the function setMtknatCfg of the file /cgi-bin/cstecgi.cgi. The manipulation of the argument mtkhnatEnable leads to os command injection. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [],
"aliases": [
"CVE-2025-1829"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-78"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-02T19:15:10Z",
"severity": "MODERATE"
},
"details": "A vulnerability was found in TOTOLINK X18 9.1.0cu.2024_B20220329. It has been declared as critical. This vulnerability affects the function setMtknatCfg of the file /cgi-bin/cstecgi.cgi. The manipulation of the argument mtkhnatEnable leads to os command injection. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-mwjq-q4w6-76fx",
"modified": "2025-03-02T21:30:50Z",
"published": "2025-03-02T21:30:50Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-1829"
},
{
"type": "WEB",
"url": "https://github.com/sjwszt/CVE/blob/main/CVE_2.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.298096"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.298096"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.504983"
},
{
"type": "WEB",
"url": "https://www.totolink.net"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-MWPG-84JX-GC55
Vulnerability from github – Published: 2025-06-22 18:30 – Updated: 2025-06-22 18:30A vulnerability was found in TOTOLINK A3002R 1.1.1-B20200824.0128. It has been classified as critical. This affects the function formWlSiteSurvey of the file /boafrm/formWlSiteSurvey. The manipulation of the argument wlanif leads to os command injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used.
{
"affected": [],
"aliases": [
"CVE-2025-6485"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-06-22T17:15:23Z",
"severity": "MODERATE"
},
"details": "A vulnerability was found in TOTOLINK A3002R 1.1.1-B20200824.0128. It has been classified as critical. This affects the function formWlSiteSurvey of the file /boafrm/formWlSiteSurvey. The manipulation of the argument wlanif leads to os command injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used.",
"id": "GHSA-mwpg-84jx-gc55",
"modified": "2025-06-22T18:30:31Z",
"published": "2025-06-22T18:30:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-6485"
},
{
"type": "WEB",
"url": "https://github.com/wudipjq/my_vuln/blob/main/totolink3/vuln_34/34.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.313593"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.313593"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.600727"
},
{
"type": "WEB",
"url": "https://www.totolink.net"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-MWR6-3GP8-9JMJ
Vulnerability from github – Published: 2026-01-13 19:12 – Updated: 2026-01-13 19:12Impact
The MCP server generation logic relies on string manipulation that incorporates the summary field from the OpenAPI specification without proper validation or escaping. This allows an attacker to "break out" of the string literal and inject arbitrary code.
Here is an example OpenAPI with the exploit
```yaml openapi: 3.0.4 info: title: Swagger Petstore - OpenAPI 3.0 description: |- This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at https://swagger.io. In the third iteration of the pet store, we've switched to the design first approach! You can now help us improve the API whether it's by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
Some useful links:
- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
termsOfService: https://swagger.io/terms/ contact: email: apiteam@swagger.io license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html version: 1.0.27-SNAPSHOT externalDocs: description: Find out more about Swagger url: https://swagger.io servers: - url: https://petstore3.swagger.io/api/v3 tags: - name: pet description: Everything about your Pets externalDocs: description: Find out more url: https://swagger.io - name: store description: Access to Petstore orders externalDocs: description: Find out more about our store url: https://swagger.io - name: user description: Operations about user paths: /pet/findByStatus: get: tags: - pet summary: Finds Pets by status.' + require('child_process').execSync("open -a Calculator").toString(),// description: Multiple status values can be provided with comma separated strings. operationId: findPetsByStatus parameters: - name: status in: query description: Status values that need to be considered for filter schema: type: string responses: '200': description: successful operation content: application/json: schema: type: string '400': description: Invalid status value default: description: Unexpected error security: - petstore_auth: - write:pets - read:pets ```
Patches
This is fixed in version 7.18.0 or higher
Workarounds
Do check your generated OpenAPI yaml/json before running through Orval CLI and correct it if it has injection.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "@orval/mcp"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "7.18.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-22785"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-13T19:12:22Z",
"nvd_published_at": "2026-01-12T19:16:04Z",
"severity": "CRITICAL"
},
"details": "### Impact\nThe MCP server generation logic relies on string manipulation that incorporates the summary field from the OpenAPI specification without proper validation or escaping. This allows an attacker to \"break out\" of the string literal and inject arbitrary code.\n\nHere is an example OpenAPI with the exploit\n\n```yaml\nopenapi: 3.0.4\ninfo:\n title: Swagger Petstore - OpenAPI 3.0\n description: |-\n This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\n Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we\u0027ve switched to the design first approach!\n You can now help us improve the API whether it\u0027s by making changes to the definition itself or to the code.\n That way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\n Some useful links:\n - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\n - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\n termsOfService: https://swagger.io/terms/\n contact:\n email: apiteam@swagger.io\n license:\n name: Apache 2.0\n url: https://www.apache.org/licenses/LICENSE-2.0.html\n version: 1.0.27-SNAPSHOT\nexternalDocs:\n description: Find out more about Swagger\n url: https://swagger.io\nservers:\n - url: https://petstore3.swagger.io/api/v3\ntags:\n - name: pet\n description: Everything about your Pets\n externalDocs:\n description: Find out more\n url: https://swagger.io\n - name: store\n description: Access to Petstore orders\n externalDocs:\n description: Find out more about our store\n url: https://swagger.io\n - name: user\n description: Operations about user\npaths:\n /pet/findByStatus:\n get:\n tags:\n - pet\n summary: Finds Pets by status.\u0027 + require(\u0027child_process\u0027).execSync(\"open -a Calculator\").toString(),//\n description: Multiple status values can be provided with comma separated strings.\n operationId: findPetsByStatus\n parameters:\n - name: status\n in: query\n description: Status values that need to be considered for filter\n schema:\n type: string\n responses:\n \u0027200\u0027:\n description: successful operation\n content:\n application/json:\n schema:\n type: string\n \u0027400\u0027:\n description: Invalid status value\n default:\n description: Unexpected error\n security:\n - petstore_auth:\n - write:pets\n - read:pets\n ```\n \n\n### Patches\nThis is fixed in version 7.18.0 or higher\n\n### Workarounds\nDo check your generated OpenAPI yaml/json before running through Orval CLI and correct it if it has injection.",
"id": "GHSA-mwr6-3gp8-9jmj",
"modified": "2026-01-13T19:12:22Z",
"published": "2026-01-13T19:12:22Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/orval-labs/orval/security/advisories/GHSA-mwr6-3gp8-9jmj"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22785"
},
{
"type": "WEB",
"url": "https://github.com/orval-labs/orval/commit/80b5fe73b94f120a3a5561952d6d4b0f8d7e928d"
},
{
"type": "PACKAGE",
"url": "https://github.com/orval-labs/orval"
}
],
"schema_version": "1.4.0",
"severity": [
{
"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": "orval MCP client is vulnerable to a code injection attack."
}
GHSA-MWVV-2FFF-4JMX
Vulnerability from github – Published: 2022-05-24 16:47 – Updated: 2024-04-04 00:55In NETGEAR ReadyNAS Surveillance before 1.4.3-17 x86 and before 1.1.4-7 ARM, $_GET['uploaddir'] is not escaped and is passed to system() through $tmp_upload_dir, leading to upgrade_handle.php?cmd=writeuploaddir remote command execution.
{
"affected": [],
"aliases": [
"CVE-2017-18378"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-06-11T21:29:00Z",
"severity": "CRITICAL"
},
"details": "In NETGEAR ReadyNAS Surveillance before 1.4.3-17 x86 and before 1.1.4-7 ARM, $_GET[\u0027uploaddir\u0027] is not escaped and is passed to system() through $tmp_upload_dir, leading to upgrade_handle.php?cmd=writeuploaddir remote command execution.",
"id": "GHSA-mwvv-2fff-4jmx",
"modified": "2024-04-04T00:55:03Z",
"published": "2022-05-24T16:47:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-18378"
},
{
"type": "WEB",
"url": "https://kb.netgear.com/000049072/Security-Advisory-for-Command-Injection-in-ReadyNAS-Surveillance-Application-PSV-2017-2653"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/42956"
}
],
"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"
}
]
}
GHSA-MX2H-QJGG-2VV4
Vulnerability from github – Published: 2023-10-13 15:30 – Updated: 2024-04-04 08:37Netis N3Mv2-V1.0.1.865 was discovered to contain a command injection vulnerability via the ddnsDomainName parameter in the Dynamic DNS settings.
{
"affected": [],
"aliases": [
"CVE-2023-45465"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-10-13T13:15:12Z",
"severity": "CRITICAL"
},
"details": "Netis N3Mv2-V1.0.1.865 was discovered to contain a command injection vulnerability via the ddnsDomainName parameter in the Dynamic DNS settings.",
"id": "GHSA-mx2h-qjgg-2vv4",
"modified": "2024-04-04T08:37:48Z",
"published": "2023-10-13T15:30:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-45465"
},
{
"type": "WEB",
"url": "https://github.com/adhikara13/CVE/blob/main/netis_N3/blind%20command%20injection%20in%20ddnsDomainName%20parameter%20in%20Dynamic%20DNS%20setting.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-MX3R-W3PJ-7WV7
Vulnerability from github – Published: 2021-03-19 21:10 – Updated: 2021-03-23 21:26** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: none. Reason: This candidate was withdrawn by its CNA. Further investigation showed that it was not a security issue. Notes: none.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "wc-cmd"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.0.9"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-28431"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": true,
"github_reviewed_at": "2021-03-18T23:48:14Z",
"nvd_published_at": "2021-02-23T16:15:00Z",
"severity": "CRITICAL"
},
"details": "** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: none. Reason: This candidate was withdrawn by its CNA. Further investigation showed that it was not a security issue. Notes: none.",
"id": "GHSA-mx3r-w3pj-7wv7",
"modified": "2021-03-23T21:26:23Z",
"published": "2021-03-19T21:10:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-28431"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-WCCMD-1050423"
}
],
"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": "Command injection in wc-cmd",
"withdrawn": "2021-03-23T21:26:23Z"
}
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.