Threat
Visual Studio Copilot and SSMS Remote Code Execution (CVE-2026-103572)
First reported · Discovered embracethered.com
Page published · Page updated
Earliest dated coverage: 13 Oct 2026 · First observed: 14 Oct 2026 · Latest dated coverage: 13 Oct 2026
Coverage timeline
Single-source incident — one report is available.
Why it matters
CVE-2026-103572 shows how an AI coding agent can be driven via indirect prompt injection to bypass configuration-file write protections and reach remote code execution in widely deployed enterprise IDEs, making Copilot a practical attack surface in developer environments.
CVE-2026-103572 is a path-validation-bypass vulnerability in the shared Microsoft.VisualStudio.Copilot.Core.dll used by Visual Studio Copilot and SQL Server Management Studio, reported by embracethered and patched by Microsoft (rated Important, Remote Code Execution). A trailing-dot filename trick (e.g. `.mcp.json.`) bypasses the check meant to stop Copilot from writing to its own settings and MCP configuration files; because Win32 strips the trailing dot, the write lands on the protected file, letting the AI agent escape containment and achieve arbitrary command execution. The researcher demonstrated exploitation by a third party via indirect prompt injection.
Summary
Security researcher Embrace The Red disclosed CVE-2026-103572, an Important-severity Remote Code Execution vulnerability affecting GitHub Copilot integrated into Visual Studio and SQL Server Management Studio (SSMS). Microsoft shipped a patch as part of Patch Tuesday on October 13, 2026, assigning a CVSS score of 8.8.[0][1]
The flaw is a file-path validation bypass in the shared Copilot DLL Microsoft.VisualStudio.Copilot.Core.dll. By appending a trailing dot to protected configuration filenames (e.g., `.mcp.json.` or `settings.VisualStudio.json.`), the Copilot agent evades a protected-filename check because Windows normalizes away the trailing period when the write actually occurs, letting the agent modify files it was explicitly restricted from touching and ultimately achieve arbitrary command execution.[0]
The researcher demonstrated the issue could be triggered by a third party through indirect prompt injection, hijacking Microsoft's MAI-Code-1-Flash model to write malicious settings and launch an attacker-controlled binary. This is vulnerability-research disclosure with proof-of-concept demos; there is no evidence of in-the-wild exploitation.[0]
Attack chain
- Initial Access / Injection: A misaligned or hijacked Copilot agent is steered via indirect prompt injection — malicious instructions delivered through file content or data returned from an MCP server — to act on behalf of an attacker.[0]
- Path Validation Bypass: The agent writes to a protected configuration file using a trailing-dot variant of the name (e.g., `settings.visualstudio.json.` or `~/.mcp.json.`), which passes the string-comparison protected-filename check but is canonicalized by Windows to the real protected file on write.[0]
- Reconnaissance / Discovery: For the MCP exploit path, the attacker uses path-traversal bypasses to read SSMS.isolation.ini, which discloses the InstallationID needed to construct the correct per-installation settings.json path.[0]
- Configuration Tampering: The agent modifies configuration to add a malicious command as an MCP server and enable it (adding to enabledMcpServers, removing from disabledMcpServers), or overwrites the Visual Studio ripgrepPath setting with an arbitrary binary path.[0]
- Execution: The IDE launches the attacker-configured MCP server command, or executes the substituted ripgrep binary when Copilot performs a search, achieving arbitrary command execution — the proof of concept pops calc.exe.[0]
Disclosure timeline
| Date | Event |
|---|---|
| August 4, 2026 | Researcher reported the initial path bypass leading to RCE to MSRC.[0] |
| August 4-7, 2026 | Researcher realized the broader Visual Studio implications and shared exploits for VS.[0] |
| August 30, 2026 | Follow-up with Microsoft.[0] |
| September 16, 2026 | Microsoft confirmed the vulnerability.[0] |
| October 11, 2026 | $0 bounty awarded.[0] |
| October 13, 2026 | Fix shipped as part of Patch Tuesday.[0][1] |
How it works
In Windows, a filename ending with the ASCII period (0x2E) is valid at the NTFS layer but the Win32 layer ignores the trailing dot, so `settings.json` and `settings.json.` typically resolve to the same file. Microsoft documents this behavior explicitly.[0][2]
The protection logic in EditsFunctionHandler.GetEditConfirmationTypeAsync compares the target filename against protected names using string comparison. Supplying `.mcp.json.` instead of `.mcp.json` passes the check because the two strings differ, yet the subsequent write via standard Windows file APIs strips the trailing dot and targets the protected `.mcp.json` file — defeating the guard.[0]
Additional discovered bypasses include path-traversal: paths starting inside the trusted Extensions directory can contain `..\` components that resolve outside the allowed directory, permitting reads of SSMS.isolation.ini and the user's settings file without the expected confirmation. SSMS.isolation.ini discloses the InstallationID needed to locate the writable per-install settings.json.[0]
Microsoft's fix added a call to GetFullPath, which on Windows removes trailing dots and resolves relative path components such as `..`, addressing the trailing-dot bypass and some path-traversal variants.[0]
Affected versions and patch status
| Product | Affected | Patch status |
|---|---|---|
| Visual Studio (Copilot integration) | Visual Studio 2026 and older versions including Visual Studio 2022, via the shared Microsoft.VisualStudio.Copilot.Core.dll | Patched in the October 13, 2026 Patch Tuesday release.[0][1] |
| SQL Server Management Studio (SSMS) | SSMS (shares the same code and shell as Visual Studio; references SSMS 22.0 installation path) | Patched in the October 13, 2026 Patch Tuesday release.[0][1] |
Key takeaways
- A single trailing dot was sufficient to bypass a protected-filename security check, highlighting the risk of string-comparison validation against filenames that Windows later canonicalizes differently.[0]
- AI coding agents expand the attack surface: indirect prompt injection can hijack a model (here MAI-Code-1-Flash, noted for poor injection resilience) to abuse filesystem canonicalization bugs and escape containment into arbitrary command execution.[0]
- Security controls around agents must remain effective even when the agent itself is compromised — an assume-breach, trust-no-AI posture.[0]
Defensive actions
- Apply the Microsoft patch for CVE-2026-103572 to all Visual Studio and SSMS installations.: The October 13, 2026 fix adds GetFullPath normalization that closes the trailing-dot and some path-traversal bypasses enabling agent containment escape and RCE.[0][1]
- Treat agent containment and security controls as defenses that must hold even when the AI agent is compromised or misaligned.: The researcher stresses that security controls around agents must hold under an assume-breach model, as indirect prompt injection can hijack the agent to abuse file-write protections.[0]