Dev.to Security 🔐 Cybersecurity 👁 0 📖 2 min read

CVE-2026-100368: CVE-2026-100368: OS Command Injection in CliInvoke Shell Wrappers

CVE-2026-100368: OS Command Injection in CliInvoke Shell Wrappers Vulnerability ID: CVE-2026-100368 CVSS Score: 8.4 Published: 2026-09-25 An OS command injection vulnerability exists in the PowerShell and Cmd shell

CVE-2026-100368: OS Command Injection in CliInvoke Shell Wrappers

Vulnerability ID: CVE-2026-100368
CVSS Score: 8.4
Published: 2026-09-25

An OS command injection vulnerability exists in the PowerShell and Cmd shell wrappers of the CliInvoke .NET library (specifically the CliInvoke.Specializations package). Under vulnerable configurations, arguments and targets are passed as a single flat string to ProcessStartInfo.Arguments, permitting double-quote breakout and execution of arbitrary secondary commands with host process privileges.

TL;DR

Flaw in CliInvoke shell wrappers allows unauthenticated local attackers to execute arbitrary OS commands via crafted double-quote characters in target paths or execution arguments.

⚠️ Exploit Status: POC

Technical Details

  • CWE ID: CWE-78
  • Attack Vector: Local
  • CVSS Score: 8.4
  • EPSS Score: N/A
  • Impact: High (Full Confidentiality, Integrity, and Availability Impact)
  • Exploit Status: poc
  • KEV Status: Not Listed

Affected Systems

  • CliInvoke.Specializations
  • AlastairLundy.CliInvoke.Specializations
  • .NET Core and .NET applications wrapping powershell or cmd execution via CliInvoke
  • CliInvoke.Specializations: >= 2.2.0, <= 2.8.4 (Fixed in: 2.8.5)
  • CliInvoke.Specializations: >= 2.9.0, <= 2.9.3 (Fixed in: 2.9.4)
  • CliInvoke.Specializations: >= 2.10.0, <= 2.10.4 (Fixed in: 2.10.5)
  • CliInvoke.Specializations: 3.0.0-alpha.1 - 3.0.0-alpha.10 (Fixed in: 3.0.0-beta.1)
  • AlastairLundy.CliInvoke.Specializations: >= 1.0.0-rc.1, <= 2.0.0 (Fixed in: 2.0.2)

Code Analysis

Commit: 1e98582

Refactors argument parsing to support modern structured argument delivery. Introduces ArgumentTokenizer and utilizes Native ProcessStartInfo.ArgumentList on supported TFMs.

Commit: 2077e52

Fully integrates ArgumentList throughout PowerShell and Cmd middleware configurations, eliminating string-concatenated Arguments fields.

Exploit Details

Mitigation Strategies

  • Upgrade CliInvoke.Specializations to safe versions (2.8.5, 2.9.4, 2.10.5, or 3.0.0-beta.1)
  • Strictly validate user-supplied parameters to reject double quotes (")
  • Bypass shell wrappers entirely when executing processes using untrusted parameters

Remediation Steps:

  1. Identify all projects using CliInvoke.Specializations or AlastairLundy.CliInvoke.Specializations
  2. Update NuGet dependencies to the appropriate patched release versions
  3. Audit validation libraries to block quotes (") and shell operators (; | & $ ` ()) on legacy lines

References

Read the full report for CVE-2026-100368 on our website for more details including interactive diagrams and full exploit analysis.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.