CVE-2026-100368: CliInvoke.Specializations: Command injection in PowerShell and Cmd shell wrappers

Published Sep 25, 2026
·
Updated

Impact An OS command injection vulnerability exists in the PowerShell and Cmd shell wrappers provided by the CliInvoke.Specializations package (the PowershellProcessInvoker/CmdProcessInvoker invokers, and the UsePowerShell/UseCmd middleware in v3 pre-release versions).

The wrappers re-run a caller-supplied target and arguments inside a shell command (pwsh -Command ... / cmd /c ...). In affected versions the wrapped command was delivered to the operating system as a single ProcessStartInfo.Arguments string. The OS command-line parser re-tokenizes that string before the shell parses it, so a double quote (") in the target or arguments breaks OS-level quoting and lets the wrapped shell reassemble a second, unintended command.

An attacker could exploit this to execute arbitrary commands with the privileges of the host process.

Patches The Specializations Packages now deliver the command via ProcessStartInfo.ArgumentList (natively where supported, and polyfilled in older TFMs), so that the operating system passes argv verbatim and only the shell parses the command once.

Upgrade to: - 2.8.5 (2.8.x line) - 2.9.4 (2.9.x line) - 2.10.5 (2.10.x line) - 3.0.0-beta.1 (3.x pre-release line)

Workarounds No complete workaround is available. Until upgraded:

- Reject or strip " from any target path or argument passed to the PowerShell/Cmd wrappers. On 2.2.0 – 2.9.2 and 3.0.0-alpha.1 – alpha.4, also reject shell metacharacters (;, |, &, $, backtick, parentheses). - Alternatively, bypass the wrappers for untrusted input and invoke the target process directly so that no second shell parse of the data occurs.

Other sources

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.

— MITRE

Affected Software

8 affected componentsFixes available
nuget/CliInvoke.Specializations>=2.2.0<=2.8.4, >=2.9.0<=2.9.3, >=2.10.0<=2.10.4, >=3.0.0-alpha.1<=3.0.0-alpha.4, >=3.0.0-alpha.8<=3.0.0-alpha.10
nuget/AlastairLundy.CliInvoke.Specializations>=1.0.0-rc.1<=1.6.1.1
nuget/AlastairLundy.CliInvoke.Specializations>=1.0.0-rc.1<=1.6.1.1
2.0.2
nuget/CliInvoke.Specializations>=3.0.0-alpha.8<=3.0.0-alpha.10
3.0.0-beta.1
nuget/CliInvoke.Specializations>=3.0.0-alpha.1<=3.0.0-alpha.4
3.0.0-beta.1
nuget/CliInvoke.Specializations>=2.10.0<=2.10.4
2.10.5
nuget/CliInvoke.Specializations>=2.9.0<=2.9.3
2.9.4
nuget/CliInvoke.Specializations>=2.2.0<=2.8.4
2.8.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade nuget/AlastairLundy.CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 2.0.2
  2. Upgrade

    Upgrade nuget/CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 3.0.0-beta.1
  3. Upgrade

    Upgrade nuget/CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 2.10.5
  4. Upgrade

    Upgrade nuget/CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 2.9.4
  5. Upgrade

    Upgrade nuget/CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 2.8.5
  6. Upgrade

    Upgrade CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 2.8.5
  7. Upgrade

    Upgrade CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 2.9.4
  8. Upgrade

    Upgrade CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 2.10.5
  9. Upgrade

    Upgrade CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 3.0.0-beta.1
  10. Upgrade

    Upgrade AlastairLundy.CliInvoke.Specializations to a version that resolves this vulnerability.

    Fixed in 2.0.2
  11. Compensating control

    Until upgraded, bypass the PowerShell and Cmd wrappers for untrusted input and invoke the target process directly so the data is not subject to a second shell parse.

  12. Compensating control

    Until upgraded, reject or remove double quotes (") from target paths and arguments; for CliInvoke.Specializations versions 2.2.0 through 2.9.2 and 3.0.0-alpha.1 through 3.0.0-alpha.4, also reject shell metacharacters: ;, |, &, $, backtick, and parentheses.

Event History

Sep 25, 2026
CVE Published
via MITRE·07:53 PM
Data Sourced
via MITRE·07:53 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·09:41 PM
Data Sourced
via GitHub·09:41 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using the affected PowerShell or Cmd wrappers in the listed CliInvoke.Specializations or AlastairLundy.CliInvoke.Specializations versions are exposed when a caller-controlled target path or argument reaches those wrappers. The issue affects Windows Command Prompt and PowerShell invocation paths, not necessarily every use of the underlying library.

2

What does an attacker need to exploit it?

An attacker needs to control all or part of a target or argument supplied to an affected wrapper and include a double quote that breaks the operating-system-level quoting. Exploitation does not require privileges or user interaction, but is local according to the supplied severity vector.

3

What is the impact of successful exploitation?

The attacker can cause the shell to execute an additional command with the privileges of the host process. The supplied severity information indicates high impacts to confidentiality, integrity, and availability.

4

Which versions fix the issue?

Upgrade CliInvoke.Specializations to 2.8.5, 2.9.4, 2.10.5, or 3.0.0-beta.1, as appropriate for the version line in use. Upgrade AlastairLundy.CliInvoke.Specializations to 2.0.2.

5

What can be done if an upgrade is not immediately possible?

There is no complete workaround. Reject or remove double quotes from target paths and arguments, and additionally reject shell metacharacters from untrusted input.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203