A trailing period in a filename was enough to defeat a protection intended to stop Copilot from rewriting its own configuration. According to security researcher Johann Rehberger, that file-validation failure could turn an indirect prompt injection into arbitrary command execution in Visual Studio and SQL Server Management Studio.
Microsoft shipped a fix on October 13, 2026, following Rehberger’s August report. In his technical disclosure, Rehberger says Microsoft classified CVE-2026-103572 as an Important remote code execution vulnerability with a CVSS score of 8.8.
Affected Visual Studio and SQL Server Management Studio installations should be updated. The attack crossed a security boundary because the software enforcing Copilot’s file-access restrictions misunderstood which file Windows would actually write. A hijacked agent could then change configuration that caused its host application to launch an attacker-selected command.
Windows Resolved a Different Filename Than Copilot Checked
Copilot had checks intended to prevent it from modifying sensitive settings and configuration files. Those checks examined the supplied filename, but ordinary Windows file operations could interpret that name differently.
For example, settings.json and settings.json. are different strings. Under normal Win32 path processing, however, a trailing period can be removed, causing both names to address the same file. The underlying filesystem and the Windows APIs above it do not always treat filenames identically.
Rehberger found that a trailing-dot variation could pass Copilot’s protected-filename check. When the subsequent write reached the Windows file APIs, normalization removed the distinction that had allowed it through. The agent could therefore overwrite a file that the application was supposed to protect.
The failure came down to the order of operations: the application made its security decision using one representation of a path, then performed the operation using another. A restriction on the first representation did not reliably protect the actual destination.
Rehberger also reported related path-traversal problems. A path could appear to begin in a trusted extensions directory while relative directory components caused it to resolve somewhere else. In those cases, too, the path’s textual appearance did not reliably identify its destination.
For developers, the rule is to resolve and normalize a path before using it to make an access-control decision. Validation must apply to the destination the file operation will actually reach.
How Prompt Injection Reached a Process-Launch Boundary
The filename bug provided the escape route. Indirect prompt injection gave an outside attacker a way to steer the agent toward it.
In an indirect prompt injection, instructions arrive inside material the assistant is supposed to read as data, rather than through a legitimate user request. Rehberger demonstrated malicious instructions embedded in a file that Copilot encountered. He also noted that content returned by an MCP server could provide another route into the conversation.
The reported chain depended on attacker-controlled material reaching a Copilot workflow and influencing the agent’s actions. It was not an unauthenticated network service executing any command sent to it.
Once influenced, the agent could exploit the path-validation defect to modify protected configuration. Rehberger described two routes from those edits to code execution:
- MCP configuration changes: The agent could alter server definitions and related enablement settings so that the IDE launched an attacker-selected command as an MCP server.
- Visual Studio search configuration changes: The agent could change the executable used for a search operation, causing a later search to launch a different program.
In both cases, the host application treated particular settings as instructions about which processes to start. These were configuration-based execution paths, not merely edits to ordinary project source files.
The protected files were therefore part of a process-launch security boundary. If an agent can rewrite them despite restrictions, denying it a direct command-execution tool is insufficient to contain it. A permitted file operation can become an execution mechanism when the destination controls executable behavior, so “the assistant can edit files” and “the assistant can execute commands” are not always separate capabilities.
The disclosure does not, by itself, establish privilege escalation beyond the permissions available to the host application. The demonstrated consequence is arbitrary command execution through the affected application’s workflow, not proof of administrator-level control in every installation.
Visual Studio and SSMS Share the Affected Component
Rehberger identified the vulnerable component as Microsoft.VisualStudio.Copilot.Core.dll, shared by Visual Studio and SQL Server Management Studio, or SSMS.
His disclosure describes demonstrations involving Visual Studio 2026 and SSMS, and says older versions, including Visual Studio 2022, are also affected. The shared component explains why the issue extends beyond a single development environment.
Updating Visual Studio does not establish that a separately installed SSMS instance has been remediated. Organizations need to check both product inventories and apply the updates relevant to each affected installation.
The exact affected and fixed releases should come from Microsoft’s CVE-2026-103572 advisory, rather than from an assumed version cutoff. The supplied advisory page did not expose its product-version table, so this article does not reproduce one.
The disclosure concerns the shared Copilot component in these applications. It does not establish that every Microsoft product using the Copilot name, or every editor offering GitHub Copilot, contains this vulnerability. Although the component name is useful context for security teams, remediation remains product-specific: identify affected Visual Studio and SSMS installations and verify that their applicable security updates have been installed.
The Fix Moves Normalization Ahead of Validation
Rehberger’s disclosure records an initial report on August 4, additional Visual Studio findings shared that week, Microsoft’s confirmation on September 16, and the patch shipping on October 13.
In his analysis of the fix, Rehberger says Microsoft added a GetFullPath call to normalize the path before validation. In the Windows behavior he examined, that removed the trailing period and resolved relative path components.
