Patched Flaw in Visual Studio and SSMS Copilot Let a Trailing Dot Defeat Its Safety Checks
Microsoft has released a patch for CVE-2026-103572, a remote code execution vulnerability in Copilot within Visual Studio and SQL Server Management Studio (SSMS). Microsoft rated it Important. The researcher who reported it in August says the flaw lets Copilot get around a path validation check and write to its own settings and configuration files. That lets it escape the restrictions meant to contain it and run arbitrary commands.
The researcher also showed Microsoft that an outside party could exploit this through indirect prompt injection, achieving remote command execution. Both products are affected because they share the same code, including a common Copilot component called Microsoft.VisualStudio.Copilot.Core.dll. Older versions, including Visual Studio 2022, are also affected.
The root cause comes down to a quirk in Windows file naming. A filename ending in a dot is treated by Windows as the same file as the name without the dot. The code meant to stop Copilot from editing its configuration files, including MCP settings, checked names in a way that did not account for this. A name such as .mcp.json. with a trailing dot was therefore a possible way around the protection. This summary is based on the opening of the researcher's write-up, so it does not cover every technical detail.