Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-100368 Overview
CliInvoke is a .NET library for invoking command-line programs. Its CliInvoke.Specializations packages provide wrappers for shells including PowerShell and Windows Command Prompt. CVE-2026-100368 is an OS command injection vulnerability [CWE-78] in these shell wrappers. The wrappers pass caller-controlled target paths and arguments to pwsh -Command or cmd /c as a single ProcessStartInfo.Arguments string. A double quote in untrusted input breaks the operating-system-level quoting and causes the shell to execute an additional command with the host process's privileges.
Critical Impact
Attackers who control input passed to the PowerShell or Cmd wrappers can execute arbitrary shell commands with the privileges of the host process.
Affected Products
- CliInvoke.Specializations versions 2.2.0 through 2.8.4, 2.9.0 through 2.9.3, 2.10.0 through 2.10.4
- CliInvoke.Specializations versions 3.0.0-alpha.1 through 3.0.0-alpha.4 and 3.0.0-alpha.8 through 3.0.0-alpha.10
- AlastairLundy.CliInvoke.Specializations versions 1.0.0-rc.1 through 1.6.1.1
Discovery Timeline
- 2026-09-25 - CVE-2026-100368 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-100368
Vulnerability Analysis
The vulnerability resides in the PowerShell and Cmd wrapper classes within CliInvoke.Specializations. These wrappers construct a shell command line by concatenating a target path and arguments into a single string, then passing that string to pwsh -Command or cmd /c through ProcessStartInfo.Arguments. Because the arguments are joined as text rather than passed as a structured argument list, operating-system-level quoting rules apply. An attacker who injects a double quote character into the target or arguments can terminate the intended quoted string early. The remainder of the attacker-controlled input is then parsed by the shell as additional commands.
Successful exploitation gives the attacker command execution within the context of the invoking .NET process. The attack vector is local because the attacker must supply input that reaches the wrapper, but any application that forwards untrusted strings to these wrappers inherits the flaw.
Root Cause
The root cause is unsafe argument serialization. The wrappers rely on string concatenation into ProcessStartInfo.Arguments without escaping double quotes or shell metacharacters before handing the composite string to PowerShell or cmd.exe. In the earlier affected ranges (2.2.0 through 2.9.2 and 3.0.0-alpha.1 through 3.0.0-alpha.4), additional shell metacharacters beyond double quotes are also unsanitized, widening the injection surface.
Attack Vector
An attacker supplies a target path or argument string containing a double quote followed by shell syntax. When the wrapper builds the -Command or /c payload, the quote closes the intended token and the trailing content is interpreted by the shell. For example, injected input terminating a quoted path and appending ; <command> in PowerShell, or & <command> in cmd.exe, causes the appended command to execute with the privileges of the host process. See the GitHub Security Advisory GHSA-wrvw-254r-wpmv for authoritative technical detail.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-100368
Indicators of Compromise
- Unexpected pwsh.exe or cmd.exe child processes spawned by .NET host applications that depend on CliInvoke.Specializations.
- Process command lines containing stray double quote characters followed by shell separators such as ;, &, &&, or |.
- Outbound network connections or file writes originating from pwsh or cmd processes launched by applications that normally invoke only benign command-line tools.
Detection Strategies
- Inventory application dependencies for vulnerable CliInvoke.Specializations or AlastairLundy.CliInvoke.Specializations package versions using SBOM or NuGet audit tooling.
- Create endpoint detection rules that flag pwsh -Command and cmd /c invocations whose argument strings contain double quotes adjacent to shell metacharacters.
- Correlate process ancestry so that shell processes launched by .NET host executables with non-standard arguments trigger review.
Monitoring Recommendations
- Monitor process creation telemetry for pwsh.exe and cmd.exe spawned by applications known to use the affected libraries.
- Alert on child processes of those shells (for example powershell -enc, curl, certutil, bitsadmin) that are atypical for the host application.
- Capture full command lines in endpoint logging so that injected payloads remain visible for post-incident analysis.
How to Mitigate CVE-2026-100368
Immediate Actions Required
- Upgrade CliInvoke.Specializations to version 2.8.5, 2.9.4, 2.10.5, or 3.0.0-beta.1 depending on the branch in use.
- Upgrade AlastairLundy.CliInvoke.Specializations to version 2.0.2.
- Audit application code for any path where untrusted input is forwarded to the PowerShell or Cmd wrappers and prioritize those services for patching.
Patch Information
The maintainer has published fixed releases: CliInvoke.Specializations 2.8.5, 2.9.4, 2.10.5, and 3.0.0-beta.1, and AlastairLundy.CliInvoke.Specializations 2.0.2. Patch details are available in the GitHub Security Advisory GHSA-wrvw-254r-wpmv.
Workarounds
- No complete workaround exists. Operators who cannot upgrade should reject or strip double quotes from target paths and arguments before invocation.
- For versions 2.2.0 through 2.9.2 and 3.0.0-alpha.1 through 3.0.0-alpha.4, additionally reject shell metacharacters such as ;, &, |, `, $, and newline characters.
- Bypass the PowerShell and Cmd wrappers entirely when handling untrusted input and invoke target processes directly through ProcessStartInfo with argument lists.
# Upgrade example using the .NET CLI
dotnet add package CliInvoke.Specializations --version 2.10.5
dotnet add package AlastairLundy.CliInvoke.Specializations --version 2.0.2
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

