Common Weakness Enumeration

CWE-77

Allowed-with-Review

Improper 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.

5383 vulnerabilities reference this CWE, most recent first.

GHSA-C969-5X3P-VQ3V

Vulnerability from github – Published: 2026-06-18 14:25 – Updated: 2026-06-18 14:25
VLAI
Summary
PraisonAI: IMAP Command Injection via Unsanitized Email Search Parameters
Details

Summary

The email search tool in src/praisonai-agents/praisonaiagents/tools/email_tools.py constructs IMAP SEARCH commands by interpolating LLM-controlled parameters (from_addr, subject, query) directly into IMAP protocol strings using f-string formatting with double-quote delimiters. An attacker who can influence the arguments to the search_emails or reply_email tool (via crafted agent prompts) can inject arbitrary IMAP commands, potentially exfiltrating email data from other folders, deleting emails, or performing other unauthorized IMAP operations.

Details

Vulnerable code (lines 493–502):

criteria = []
if from_addr:
    criteria.append(f'FROM "{from_addr}"')
if subject:
    criteria.append(f'SUBJECT "{subject}"')
if query:
    criteria.append(f'TEXT "{query}"')
if not criteria:
    criteria.append("ALL")
search_str = " ".join(criteria)
status, data = mail.search(None, search_str)

The from_addr, subject, and query parameters originate from LLM tool call arguments (the search_emails public function at line 665). These values flow through without any sanitization or escaping. The double-quote (") characters in these parameters allow breaking out of the IMAP SEARCH quoted string context.

Additional injection points: - Line 416: mail.search(None, f'HEADER Message-ID "{search_id}"') - Line 447: Same pattern in _smtp_reply_email - Line 542: Same pattern in _smtp_archive_email

The search_id / message_id parameter in these functions is also LLM-controlled via the reply_email and archive_email public tool functions.

Reachability: The search_emails, reply_email, and archive_email functions are exposed as agent tools. They are reachable when an agent is configured with email tools (EMAIL_ADDRESS + EMAIL_PASSWORD environment variables set). This is a documented deployment scenario for email-capable agents.

PoC

Setup: Requires an IMAP server (not run here — this is a static proof). The vulnerability is demonstrated by tracing the data flow.

Positive trigger — IMAP injection via search_emails: An LLM agent processing a crafted prompt calls:

search_emails(from_addr='user@example.com" LOGOUT')

This produces the IMAP command:

SEARCH FROM "user@example.com" LOGOUT"

The LOGOUT command is injected after the prematurely closed quoted string, causing the IMAP connection to be terminated.

More severe injection — exfiltrate emails from another folder:

search_emails(query='" SEARCH RETURN (MIN) ALL')

Produces: TEXT "" SEARCH RETURN (MIN) ALL" — injects a secondary SEARCH command.

Negative control — legitimate search:

search_emails(from_addr='user@example.com')

Produces: FROM "user@example.com" — correct, no injection.

Cleanup: No persistent changes for read-only injection. For destructive injection (DELETE, EXPUNGE), impact persists.

Impact

An attacker who can craft prompts that cause an LLM agent to call search_emails with injection payloads can:

  • Terminate IMAP connections (denial of service)
  • Inject arbitrary IMAP commands — including LIST (enumerate folders), SELECT (switch folders), FETCH (read emails from other mailboxes), STORE (modify flags), COPY/MOVE (move emails), DELETE/EXPUNGE (permanently delete emails)
  • Exfiltrate email contents from folders the user did not intend to expose to the agent
  • Permanently delete emails via injected DELETE + EXPUNGE commands

The attack requires the IMAP backend to be configured (EMAIL_ADDRESS + EMAIL_PASSWORD env vars), which is a documented and common deployment for email-capable agents.

Suggested remediation

  1. Escape double-quote characters in IMAP parameters. Per RFC 3501, literal strings use {n}\r\n format or quoted strings with \ escaping:
def _escape_imap_string(s: str) -> str:
    """Escape a string for safe use in IMAP quoted strings."""
    # Use IMAP literal syntax for safety: {length}\r\n<data>
    encoded = s.encode('utf-8')
    return f'{{{len(encoded)}}}\r\n{encoded}'
  1. Use IMAP literal syntax ({n}\r\ndata) instead of quoted strings for all user-controlled parameters. This prevents any injection regardless of content.

  2. Apply the escaping to all IMAP search criteria parameters: from_addr, subject, query, and search_id/message_id.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 1.6.48"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "praisonaiagents"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.6.59"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-20",
      "CWE-77"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-18T14:25:03Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "## Summary\n\nThe email search tool in `src/praisonai-agents/praisonaiagents/tools/email_tools.py` constructs IMAP SEARCH commands by interpolating LLM-controlled parameters (from_addr, subject, query) directly into IMAP protocol strings using f-string formatting with double-quote delimiters. An attacker who can influence the arguments to the `search_emails` or `reply_email` tool (via crafted agent prompts) can inject arbitrary IMAP commands, potentially exfiltrating email data from other folders, deleting emails, or performing other unauthorized IMAP operations.\n## Details\n\n**Vulnerable code (lines 493\u2013502):**\n```python\ncriteria = []\nif from_addr:\n    criteria.append(f\u0027FROM \"{from_addr}\"\u0027)\nif subject:\n    criteria.append(f\u0027SUBJECT \"{subject}\"\u0027)\nif query:\n    criteria.append(f\u0027TEXT \"{query}\"\u0027)\nif not criteria:\n    criteria.append(\"ALL\")\nsearch_str = \" \".join(criteria)\nstatus, data = mail.search(None, search_str)\n```\n\nThe `from_addr`, `subject`, and `query` parameters originate from LLM tool call arguments (the `search_emails` public function at line 665). These values flow through without any sanitization or escaping. The double-quote (`\"`) characters in these parameters allow breaking out of the IMAP SEARCH quoted string context.\n\n**Additional injection points:**\n- Line 416: `mail.search(None, f\u0027HEADER Message-ID \"{search_id}\"\u0027)`\n- Line 447: Same pattern in `_smtp_reply_email`\n- Line 542: Same pattern in `_smtp_archive_email`\n\nThe `search_id` / `message_id` parameter in these functions is also LLM-controlled via the `reply_email` and `archive_email` public tool functions.\n\n**Reachability:** The `search_emails`, `reply_email`, and `archive_email` functions are exposed as agent tools. They are reachable when an agent is configured with email tools (EMAIL_ADDRESS + EMAIL_PASSWORD environment variables set). This is a documented deployment scenario for email-capable agents.\n\n## PoC\n\n**Setup:** Requires an IMAP server (not run here \u2014 this is a static proof). The vulnerability is demonstrated by tracing the data flow.\n\n**Positive trigger \u2014 IMAP injection via `search_emails`:**\nAn LLM agent processing a crafted prompt calls:\n```python\nsearch_emails(from_addr=\u0027user@example.com\" LOGOUT\u0027)\n```\nThis produces the IMAP command:\n```\nSEARCH FROM \"user@example.com\" LOGOUT\"\n```\nThe `LOGOUT` command is injected after the prematurely closed quoted string, causing the IMAP connection to be terminated.\n\n**More severe injection \u2014 exfiltrate emails from another folder:**\n```python\nsearch_emails(query=\u0027\" SEARCH RETURN (MIN) ALL\u0027)\n```\nProduces: `TEXT \"\" SEARCH RETURN (MIN) ALL\"` \u2014 injects a secondary SEARCH command.\n\n**Negative control \u2014 legitimate search:**\n```python\nsearch_emails(from_addr=\u0027user@example.com\u0027)\n```\nProduces: `FROM \"user@example.com\"` \u2014 correct, no injection.\n\n**Cleanup:** No persistent changes for read-only injection. For destructive injection (DELETE, EXPUNGE), impact persists.\n\n## Impact\n\nAn attacker who can craft prompts that cause an LLM agent to call `search_emails` with injection payloads can:\n\n- **Terminate IMAP connections** (denial of service)\n- **Inject arbitrary IMAP commands** \u2014 including LIST (enumerate folders), SELECT (switch folders), FETCH (read emails from other mailboxes), STORE (modify flags), COPY/MOVE (move emails), DELETE/EXPUNGE (permanently delete emails)\n- **Exfiltrate email contents** from folders the user did not intend to expose to the agent\n- **Permanently delete emails** via injected DELETE + EXPUNGE commands\n\nThe attack requires the IMAP backend to be configured (EMAIL_ADDRESS + EMAIL_PASSWORD env vars), which is a documented and common deployment for email-capable agents.\n\n## Suggested remediation\n\n1. **Escape double-quote characters** in IMAP parameters. Per RFC 3501, literal strings use `{n}\\r\\n` format or quoted strings with `\\` escaping:\n```python\ndef _escape_imap_string(s: str) -\u003e str:\n    \"\"\"Escape a string for safe use in IMAP quoted strings.\"\"\"\n    # Use IMAP literal syntax for safety: {length}\\r\\n\u003cdata\u003e\n    encoded = s.encode(\u0027utf-8\u0027)\n    return f\u0027{{{len(encoded)}}}\\r\\n{encoded}\u0027\n```\n\n2. Use IMAP literal syntax (`{n}\\r\\ndata`) instead of quoted strings for all user-controlled parameters. This prevents any injection regardless of content.\n\n3. Apply the escaping to all IMAP search criteria parameters: `from_addr`, `subject`, `query`, and `search_id`/`message_id`.",
  "id": "GHSA-c969-5x3p-vq3v",
  "modified": "2026-06-18T14:25:03Z",
  "published": "2026-06-18T14:25:03Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-c969-5x3p-vq3v"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/MervinPraison/PraisonAI"
    }
  ],
  "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:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "PraisonAI: IMAP Command Injection via Unsanitized Email Search Parameters"
}

GHSA-C969-QWM2-PF77

Vulnerability from github – Published: 2025-09-02 15:31 – Updated: 2025-09-02 21:30
VLAI
Details

Wavlink WN535K3 20191010 was found to contain a command injection vulnerability in the set_sys_adm function via the username parameter. This vulnerability allows attackers to execute arbitrary commands via a crafted request.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-50757"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-09-02T15:15:32Z",
    "severity": "MODERATE"
  },
  "details": "Wavlink WN535K3 20191010 was found to contain a command injection vulnerability in the set_sys_adm function via the username parameter. This vulnerability allows attackers to execute arbitrary commands via a crafted request.",
  "id": "GHSA-c969-qwm2-pf77",
  "modified": "2025-09-02T21:30:57Z",
  "published": "2025-09-02T15:31:08Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-50757"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Summermu/VulnForIoT/tree/main/Wavlink_WN535K3/set_sys_adm_username/readme.md"
    }
  ],
  "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-C96R-89XW-Q4PV

Vulnerability from github – Published: 2022-05-24 17:45 – Updated: 2022-07-11 00:00
VLAI
Details

A command injection on the /admin/broadcast.php script of Invigo Automatic Device Management (ADM) through 5.0 allows remote authenticated attackers to execute arbitrary PHP code on the server as the user running the application.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-10580"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-03-25T20:15:00Z",
    "severity": "HIGH"
  },
  "details": "A command injection on the /admin/broadcast.php script of Invigo Automatic Device Management (ADM) through 5.0 allows remote authenticated attackers to execute arbitrary PHP code on the server as the user running the application.",
  "id": "GHSA-c96r-89xw-q4pv",
  "modified": "2022-07-11T00:00:25Z",
  "published": "2022-05-24T17:45:19Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-10580"
    },
    {
      "type": "WEB",
      "url": "https://cwe.mitre.org/data/definitions/77.html"
    },
    {
      "type": "WEB",
      "url": "https://www.on-x.com/sites/default/files/security_advisory_-_multiple_vulnerabilities_-_invigo_adm.pdf"
    }
  ],
  "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-C97V-9PFC-P975

Vulnerability from github – Published: 2022-05-17 02:20 – Updated: 2022-05-17 02:20
VLAI
Details

Proxy command injection vulnerability in Trend Micro InterScan Messaging Virtual Appliance 9.0 and 9.1 allows remote attackers to execute arbitrary code on vulnerable installations. The specific flaw can be exploited by parsing the "T" parameter within modTMCSS Proxy. Formerly ZDI-CAN-4745.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2017-11392"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2017-08-03T15:29:00Z",
    "severity": "HIGH"
  },
  "details": "Proxy command injection vulnerability in Trend Micro InterScan Messaging Virtual Appliance 9.0 and 9.1 allows remote attackers to execute arbitrary code on vulnerable installations. The specific flaw can be exploited by parsing the \"T\" parameter within modTMCSS Proxy. Formerly ZDI-CAN-4745.",
  "id": "GHSA-c97v-9pfc-p975",
  "modified": "2022-05-17T02:20:06Z",
  "published": "2022-05-17T02:20:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-11392"
    },
    {
      "type": "WEB",
      "url": "https://success.trendmicro.com/solution/1117723"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/100075"
    },
    {
      "type": "WEB",
      "url": "http://www.zerodayinitiative.com/advisories/ZDI-17-504"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-C9C6-XFR6-Q42W

Vulnerability from github – Published: 2026-05-11 21:31 – Updated: 2026-05-12 15:31
VLAI
Details

EDIMAX BR-6428nS V3 1.15 is vulnerable to Command Injection. An authenticated attacker with access to the network can submit crafted input to the WLAN configuration functionality. Due to insufficient input validation, the attacker is able to execute arbitrary system commands on the device.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-36734"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-11T20:25:41Z",
    "severity": "HIGH"
  },
  "details": "EDIMAX BR-6428nS V3 1.15 is vulnerable to Command Injection. An authenticated attacker with access to the network can submit crafted input to the WLAN configuration functionality. Due to insufficient input validation, the attacker is able to execute arbitrary system commands on the device.",
  "id": "GHSA-c9c6-xfr6-q42w",
  "modified": "2026-05-12T15:31:31Z",
  "published": "2026-05-11T21:31:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-36734"
    },
    {
      "type": "WEB",
      "url": "https://github.com/theShinigami/CVE-Disclosures/tree/main/CVE-2026-36734"
    },
    {
      "type": "WEB",
      "url": "http://edimax.com"
    }
  ],
  "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-C9J3-WQPH-5XX9

Vulnerability from github – Published: 2018-09-17 20:43 – Updated: 2023-02-03 20:45
VLAI
Summary
Command Injection in egg-scripts
Details

Versions of egg-scripts before 2.8.1 are vulnerable to command injection. This is only exploitable if a malicious argument is provided on the command line.

Example: eggctl start --daemon --stderr='/tmp/eggctl_stderr.log; touch /tmp/malicious'

Recommendation

Update to version 2.8.1 or later.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "egg-scripts"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.8.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2018-3786"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77",
      "CWE-78"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:30:55Z",
    "nvd_published_at": "2018-08-24T20:29:00Z",
    "severity": "CRITICAL"
  },
  "details": "Versions of `egg-scripts` before 2.8.1 are vulnerable to command injection. This is only exploitable if a malicious argument is provided on the command line.\n\n\nExample:\n`eggctl start --daemon --stderr=\u0027/tmp/eggctl_stderr.log; touch /tmp/malicious\u0027`\n\n\n## Recommendation\n\nUpdate to version 2.8.1 or later.",
  "id": "GHSA-c9j3-wqph-5xx9",
  "modified": "2023-02-03T20:45:07Z",
  "published": "2018-09-17T20:43:34Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-3786"
    },
    {
      "type": "WEB",
      "url": "https://github.com/eggjs/egg-scripts/pull/26"
    },
    {
      "type": "WEB",
      "url": "https://github.com/eggjs/egg-scripts/commit/b98fd03d1e3aaed68004b881f0b3d42fe47341dd"
    },
    {
      "type": "WEB",
      "url": "https://hackerone.com/reports/388936"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-c9j3-wqph-5xx9"
    },
    {
      "type": "WEB",
      "url": "https://github.com/eggjs/egg-scripts/blob/2.8.1/History.md"
    },
    {
      "type": "WEB",
      "url": "https://www.npmjs.com/advisories/694"
    }
  ],
  "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 egg-scripts"
}

GHSA-C9Q3-R4RV-MJM7

Vulnerability from github – Published: 2023-01-27 00:54 – Updated: 2023-02-06 16:46
VLAI
Summary
Fix for arbitrary command execution in custom layout update through blocks
Details

Impact

Custom Layout enabled admin users to execute arbitrary commands via block methods.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "openmage/magento-lts"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "19.4.22"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "openmage/magento-lts"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "20.0.0"
            },
            {
              "fixed": "20.0.19"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-39217"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-01-27T00:54:46Z",
    "nvd_published_at": "2023-01-27T18:15:00Z",
    "severity": "HIGH"
  },
  "details": "### Impact\nCustom Layout enabled admin users to execute arbitrary commands via block methods.\n\n",
  "id": "GHSA-c9q3-r4rv-mjm7",
  "modified": "2023-02-06T16:46:16Z",
  "published": "2023-01-27T00:54:46Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/OpenMage/magento-lts/security/advisories/GHSA-c9q3-r4rv-mjm7"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39217"
    },
    {
      "type": "WEB",
      "url": "https://github.com/OpenMage/magento-lts/commit/289bd4b4f53622138e3e5c2d2cef7502d780086f"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/OpenMage/magento-lts"
    },
    {
      "type": "WEB",
      "url": "https://github.com/OpenMage/magento-lts/releases/tag/v19.4.22"
    },
    {
      "type": "WEB",
      "url": "https://github.com/OpenMage/magento-lts/releases/tag/v20.0.19"
    }
  ],
  "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"
    }
  ],
  "summary": "Fix for arbitrary command execution in custom layout update through blocks"
}

GHSA-CC2G-584X-8VHW

Vulnerability from github – Published: 2023-02-03 18:30 – Updated: 2023-02-10 15:30
VLAI
Details

TOTOLINK CA300-PoE V6.2c.884 was discovered to contain a command injection vulnerability via the NetDiagHost parameter in the setNetworkDiag function.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2023-24139"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2023-02-03T16:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "TOTOLINK CA300-PoE V6.2c.884 was discovered to contain a command injection vulnerability via the NetDiagHost parameter in the setNetworkDiag function.",
  "id": "GHSA-cc2g-584x-8vhw",
  "modified": "2023-02-10T15:30:29Z",
  "published": "2023-02-03T18:30:33Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-24139"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Double-q1015/CVE-vulns/blob/main/totolink_ca300-poe/setNetworkDiag_NetDiagHost/setNetworkDiag_NetDiagHost.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-CC3F-9J5H-RJR3

Vulnerability from github – Published: 2022-05-24 19:06 – Updated: 2022-05-24 19:06
VLAI
Details

In IBOS 4.5.4 Open, the database backup has Command Injection Vulnerability.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2020-21785"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-06-24T16:15:00Z",
    "severity": "HIGH"
  },
  "details": "In IBOS 4.5.4 Open, the database backup has Command Injection Vulnerability.",
  "id": "GHSA-cc3f-9j5h-rjr3",
  "modified": "2022-05-24T19:06:05Z",
  "published": "2022-05-24T19:06:05Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-21785"
    },
    {
      "type": "WEB",
      "url": "https://gitee.com/ibos/IBOS/issues/I18IIV"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-CC43-2HJ7-X446

Vulnerability from github – Published: 2022-05-24 19:10 – Updated: 2022-05-24 19:10
VLAI
Details

Certain NETGEAR devices are affected by command injection by an unauthenticated attacker. This affects D7800 before 1.0.1.56, R7800 before 1.0.2.68, R8900 before 1.0.4.26, and R9000 before 1.0.4.26.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-38529"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-77"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-08-11T00:16:00Z",
    "severity": "CRITICAL"
  },
  "details": "Certain NETGEAR devices are affected by command injection by an unauthenticated attacker. This affects D7800 before 1.0.1.56, R7800 before 1.0.2.68, R8900 before 1.0.4.26, and R9000 before 1.0.4.26.",
  "id": "GHSA-cc43-2hj7-x446",
  "modified": "2022-05-24T19:10:46Z",
  "published": "2022-05-24T19:10:46Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-38529"
    },
    {
      "type": "WEB",
      "url": "https://kb.netgear.com/000063765/Security-Advisory-for-Pre-Authentication-Command-Injection-on-Some-Routers-and-Gateways-PSV-2018-0616"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

Mitigation
Architecture and Design

If at all possible, use library calls rather than external processes to recreate the desired functionality.

Mitigation
Implementation

If possible, ensure that all external commands called from the program are statically created.

Mitigation MIT-5
Implementation

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
Operation

Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.

Mitigation
System Configuration

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.