7.8high
PowerShell MCP: WinRM credentials exposed in spawned PowerShell command line
- Severity
- 7.8high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.28% (higher than 21% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mf4q-589h-8gwx
Description
PowerShell MCP is a Model Context Protocol server for headless Windows operations. Prior to 0.5.3, the winrm_exec 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. ssh_exec is not affected because it uses SSH in process. This issue is fixed in 0.5.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| IMRRD powershell-mcp | < 0.5.3 | CVE List |
| @imrrd/powershell-mcp (npm) | before 0.5.3 | GitHub Advisory Database |
| powershell-mcp (npm) | up to 0.3.2 | GitHub Advisory Database |
All scores
| GitHub_M | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
PowerShell MCP is a Model Context Protocol server for headless Windows operations. Prior to 0.5.3, the winrm_exec 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. ssh_exec is not affected because it uses SSH in process. This issue is fixed in 0.5.3.
GitHub Advisory Database
The winrm_exec 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. ssh_exec 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).
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-137184 changed 2026-11-30 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mf4q-589h-8gwx changed 2026-11-30 | CC-BY-4.0 |
| NVD | CVE-2026-137184 changed 2026-11-30 | Public domain |