CVE-2026-100368

CliInvoke.Specializations: Command injection in PowerShell and Cmd shell wrappers

Published Sep 25, 2026 CVSS 3.1 · 8.4 High EPSS < 1% KEV · Not listed
Description
CliInvoke is a .NET library for invoking command-line programs, and its `CliInvoke.Specializations` packages provide specialized wrappers for shells such as PowerShell and Windows Command Prompt. `CliInvoke.Specializations` versions 2.2.0 through 2.8.4, 2.9.0 through 2.9.3, 2.10.0 through 2.10.4, 3.0.0-alpha.1 through 3.0.0-alpha.4, and 3.0.0-alpha.8 through 3.0.0-alpha.10, as well as `AlastairLundy.CliInvoke.Specializations` versions 1.0.0-rc.1 through 1.6.1.1, contain an OS command injection vulnerability in their PowerShell and Cmd wrappers. The wrappers pass a caller-controlled target and arguments to `pwsh -Command` or `cmd /c` using a single `ProcessStartInfo.Arguments` string, allowing a double quote in untrusted input to break operating-system-level quoting and cause the shell to execute an additional command with the host process's privileges. The vulnerability is patched in `CliInvoke.Specializations` versions 2.8.5, 2.9.4, 2.10.5, and 3.0.0-beta.1, and in `AlastairLundy.CliInvoke.Specializations` version 2.0.2. No complete workaround is available; users unable to upgrade should reject or remove double quotes from target paths and arguments, additionally reject shell metacharacters in versions 2.2.0 through 2.9.2 and 3.0.0-alpha.1 through 3.0.0-alpha.4, or bypass the PowerShell and Cmd wrappers and invoke target processes directly when handling untrusted input.

Analysis

AI-generated

Technical impact

CliInvoke is a .NET library for invoking command‑line programs, and its specialized wrappers for PowerShell and Windows Command Prompt include a flaw that allows an attacker to inject operating‑system commands via untrusted input. The wrappers concatenate caller‑controlled target and arguments into a single ProcessStartInfo.Arguments string passed to pwsh -Command or cmd /c. By inserting a double quote, the untrusted input can break OS‑level quoting and cause the shell to execute an additional command using the host process’s privileges. This is an instance of OS command injection (CWE‑78) and can lead to remote code execution with the rights of the running process.

Affected Systems

Versions of the library identified as alastairlundy:CliInvoke.Specializations and AlastairLundy.CliInvoke.Specializations between 2.2.0 and 2.8.4, 2.9.0 and 2.9.3, 2.10.0 and 2.10.4, 3.0.0‑alpha.1 to 3.0.0‑alpha.4, 3.0.0‑alpha.8 to 3.0.0‑alpha.10, as well as AlastairLundy.CliInvoke.Specializations 1.0.0‑rc.1 through 1.6.1.1 are affected. The vulnerability is fixed in CliInvoke.Specializations 2.8.5, 2.9.4, 2.10.5, 3.0.0‑beta.1 and AlastairLundy.CliInvoke.Specializations 2.0.2.

Risk and Exploitability

The CVSS score of 8.4 reflects a high‑severity flaw that can lead to remote code execution. The EPSS score is not available, but the absence of a KEV listing does not reduce the likelihood of exploitation in real world scenarios where untrusted input is passed to these wrapper functions. An attacker who can influence the arguments fed to the PowerShell or Cmd wrapper can execute arbitrary shell commands with the privileges of the host process. The exploit is straightforward because it relies on basic quoting manipulation and does not require advanced techniques or access to privileged APIs.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a patched release of the library – use CliInvoke.Specializations 2.8.5, 2.9.4, 2.10.5, 3.0.0‑beta.1 or AlastairLundy.CliInvoke.Specializations 2.0.2 or newer.
  • If an upgrade is impossible, remove or reject any double quotes from target paths and arguments and reject shell metacharacters for affected versions, ensuring no untrusted input is passed to the wrapper functions.
  • Bypass the PowerShell and Cmd wrappers entirely and invoke target processes directly when handling untrusted input, thereby eliminating the vulnerable shell interface.

Generated by OpenCVE AI on September 25, 2026 at 21:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-wrvw-254r-wpmv CliInvoke.Specializations has command injection in PowerShell and Cmd shell wrappers
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Alastairlundy
Alastairlundy cliinvoke.specializations
Vendors & Products Alastairlundy
Alastairlundy cliinvoke.specializations
Type Values Removed Values Added
Description CliInvoke is a .NET library for invoking command-line programs, and its `CliInvoke.Specializations` packages provide specialized wrappers for shells such as PowerShell and Windows Command Prompt. `CliInvoke.Specializations` versions 2.2.0 through 2.8.4, 2.9.0 through 2.9.3, 2.10.0 through 2.10.4, 3.0.0-alpha.1 through 3.0.0-alpha.4, and 3.0.0-alpha.8 through 3.0.0-alpha.10, as well as `AlastairLundy.CliInvoke.Specializations` versions 1.0.0-rc.1 through 1.6.1.1, contain an OS command injection vulnerability in their PowerShell and Cmd wrappers. The wrappers pass a caller-controlled target and arguments to `pwsh -Command` or `cmd /c` using a single `ProcessStartInfo.Arguments` string, allowing a double quote in untrusted input to break operating-system-level quoting and cause the shell to execute an additional command with the host process's privileges. The vulnerability is patched in `CliInvoke.Specializations` versions 2.8.5, 2.9.4, 2.10.5, and 3.0.0-beta.1, and in `AlastairLundy.CliInvoke.Specializations` version 2.0.2. No complete workaround is available; users unable to upgrade should reject or remove double quotes from target paths and arguments, additionally reject shell metacharacters in versions 2.2.0 through 2.9.2 and 3.0.0-alpha.1 through 3.0.0-alpha.4, or bypass the PowerShell and Cmd wrappers and invoke target processes directly when handling untrusted input.
Title CliInvoke.Specializations: Command injection in PowerShell and Cmd shell wrappers
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 30, 2026, 12:06 AM
Reserved
Sep 25, 2026, 7:19 PM
Status
Deferred
Published
Sep 25, 2026, 8:17 PM
Modified
Sep 30, 2026, 7:57 PM