CVE-2026-137184: PowerShell MCP: WinRM credentials exposed in spawned PowerShell command line

Published Nov 30, 2026
·
Updated

PowerShell MCP is a Model Context Protocol server for headless Windows operations. Prior to 0.5.3, the winrmexec tool places a script containing the caller-supplied WinRM username and plaintext password in the PowerShell child process's -Command argument when explicit credentials are used. Local users or monitoring systems with access to process command lines or retained telemetry can recover the credentials. sshexec is not affected because it uses SSH in process. This issue is fixed in 0.5.3.

Other sources

The winrmexec tool constructed a PowerShell script containing the caller-supplied WinRM username and plaintext password, then passed that full script as the literal value of the PowerShell -Command process argument. Local users, privileged monitoring agents, process-creation audit logs, EDR, or SIEM tooling with access to process command lines could recover the credential while the child ran or from retained telemetry. Exploitation requires use of explicit WinRM credentials plus local process-command-line or log visibility on the MCP host. sshexec is not affected because it uses ssh2 in-process.

The issue is fixed in @imrrd/powershell-mcp 0.5.3 by keeping a fixed non-sensitive PowerShell bootstrap in argv and transporting all caller-controlled WinRM data through child stdin. The deprecated unscoped powershell-mcp package will not receive a patched legacy release; remove it and install @imrrd/powershell-mcp@0.5.3 or later.

Reported responsibly by Syed Anas Mohiuddin, Independent Researcher, Maintainer of mcp-safeguard (@SyedAnas01).

— GitHub

Affected Software

4 affected componentsFixes available
PowerShell MCP<0.5.3
npm/powershell-mcp<=0.3.2
npm/@imrrd/powershell-mcp<=0.5.2
0.5.3
npm/@imrrd/powershell-mcp<0.5.3
0.5.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@imrrd/powershell-mcp to a version that resolves this vulnerability.

    Fixed in 0.5.3
  2. Upgrade

    Upgrade @imrrd/powershell-mcp to a version that resolves this vulnerability.

    Fixed in 0.5.3
  3. Remove

    Remove powershell-mcp from your environment.

    Remove the deprecated unscoped powershell-mcp package; it will not receive a patched legacy release.

Event History

Nov 30, 2026
CVE Published
via MITRE·06:30 PM
Data Sourced
via MITRE·06:30 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·08:47 PM
Data Sourced
via GitHub·08:47 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·08:47 PM
Affected Software

Frequently Asked Questions

1

Which deployments are affected?

PowerShell MCP versions prior to 0.5.3 are affected when the winrm_exec tool is used with explicit WinRM credentials. The issue occurs because the supplied username and plaintext password are included in a spawned PowerShell process command line.

2

Who could recover the exposed credentials?

Local users and monitoring systems that can access process command lines may recover them. Credentials may also be recoverable from retained telemetry that recorded those command lines.

3

Is the SSH execution path affected?

No. The ssh_exec tool is not affected because it uses SSH in process rather than placing credentials in a spawned PowerShell command line.

4

How can I assess whether credentials may already have been exposed?

Review whether winrm_exec was used with explicit credentials on an affected version, then check process-command-line monitoring and retained telemetry for the corresponding PowerShell -Command arguments. Any credentials found in those records should be treated as exposed.

5

What should be done if this applies to our environment?

Upgrade PowerShell MCP to version 0.5.3, which fixes the issue. For potentially exposed WinRM credentials, rotate them and limit access to command-line telemetry and process inspection data.

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