
A Trailing Dot Broke Visual Studio Copilot's Guardrails. Microsoft Fixed the 8.8 RCE and Paid the Researcher $0.
Windows quietly strips a period off the end of a filename. Copilot's own edit-confirmation check didn't know that — so an AI agent could rewrite its own MCP config and settings under a filename that looked different but wrote to the same file.
CVE Tools6 min read
Our read: this is a patch-now bug — CVSS 8.8, no workaround, fixed in the October 13, 2026 Patch Tuesday — but the more durable lesson is the bug class. Visual Studio's Copilot agent checked whether a filename matched a protected name as a literal string, before Windows' own filesystem silently stripped a trailing period from it. That one-character gap let a prompt-injected agent write to .mcp.json and settings.VisualStudio.json under a name that looked different but resolved to the file it was explicitly supposed to be blocked from touching. The same researcher, Johann Rehberger (wunderwuzzi) of Embrace The Red, says it's the third bug in two months that Microsoft patched but declined to pay a bounty for.
The bug: a string compare that didn't know about Windows' trailing-dot quirk
Visual Studio's and SQL Server Management Studio's Copilot agent can edit files in your workspace, but it's supposed to ask for confirmation before touching a short list of protected configuration files — .mcp.json (which MCP servers the agent is allowed to launch) and settings.VisualStudio.json (editor and tool settings, including the path to the ripgrep binary Copilot uses for search). The confirmation check, in EditsFunctionHandler.GetEditConfirmationTypeAsync inside Microsoft.VisualStudio.Copilot.Core.dll, compared the requested filename against the protected names as literal strings.
Windows has a decades-old quirk: Win32 file APIs accept a trailing ASCII period (0x2E) in a filename, but silently drop it when the file is actually created or written — settings.VisualStudio.json. and settings.VisualStudio.json are the same file on disk. The confirmation check ran before that normalization, so settings.VisualStudio.json. read as a different, unprotected string — and sailed through. The actual write landed on the real, protected file anyway. Rehberger found the same gap let path traversal (..\) escape the Extensions directory the agent is otherwise confined to, and that a leaked InstallationID inside SSMS.isolation.ini was enough to compute the exact settings path to target in SSMS.
From an untrusted prompt to code execution
- Attacker plants instructions in content the agent reads
- Prompt injection steers Copilot (MAI-Code-1-Flash) to edit a settings file
- Filename submitted with a trailing dot, e.g. settings.VisualStudio.json.
- String-compare guardrail doesn't recognize it as the protected file — no confirmation prompt
- Windows strips the dot on write; real settings.VisualStudio.json is overwritten
- ripgrepPath repointed to calc.exe, or .mcp.json registers a rogue MCP server
- Next search or IDE restart launches the attacker's command
Two working demos, both ending in arbitrary code execution
- Ripgrep hijack (Visual Studio). An injected prompt tells Copilot to set
copilot.general.tools.ripgrepPathtoC:\Windows\System32\calc.exeinsidesettings.VisualStudio.json.(trailing dot). The agent is then asked to run an ordinary grep search — Copilot shells out to what it thinks is ripgrep, and Calculator opens instead. - Rogue MCP server (SSMS). The agent rewrites
.mcp.json.to register a new MCP server pointing at an attacker-chosen command, adds that server's name toenabledMcpServers, and removes it fromdisabledMcpServers. The next time the IDE launches configured MCP servers, the attacker's command runs. In SSMS, the extra step is reading the leakedInstallationIDfromSSMS.isolation.inito locate the right settings path.
"Important" vs. 8.8: the severity label and the score disagree
| Field | Value | Source |
|---|---|---|
| CVSS score | 8.8 (CVSS 3.1, AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) | cve.tools / NVD |
| Microsoft's severity category | Important (not Critical) | MSRC advisory |
| EPSS | 0.82% — 56.9th percentile | cve.tools |
| CWE | CWE-94, Improper Control of Generation of Code | cve.tools |
| In CISA KEV? | No | cve.tools |
| Public exploit / PoC code | None tracked | cve.tools |
The part that isn't a CVE: a $0 bounty for a patched RCE
Disclosure to patch, in public dates
- Initial report to MSRCThe path-validation bypass leading to RCE, reported by Johann Rehberger.
- Broader Visual Studio impact sharedAdditional VS-specific exploit paths identified and sent to Microsoft.
- Follow-up communicationPer the researcher's published timeline.
- Microsoft confirms the vulnerability
- Bounty decision: $0Ruled "out of scope" for a reward.
- Fix shipsPatch Tuesday — Visual Studio 2022 17.14.42, Visual Studio 2026 18.10.4.
This will not prevent the write to that exact file! ... Security controls around agents must hold even when the agent itself is compromised or misaligned.
Rehberger frames the $0 decision as part of a pattern, not a one-off: by his count, this is the third vulnerability in two months that Microsoft confirmed and patched but ruled ineligible for a reward. He's not alleging the bug was faked or overstated — he's flagging an incentive problem: if confirmed, patched, CVE-rated RCEs keep coming back as "out of scope," independent researchers have less reason to report to the vendor first rather than disclosing publicly or selling the finding elsewhere.
What the guardrail checked vs. what Windows actually does
- Compares the requested filename to a list of protected names
- Treats the comparison as an exact string match
- Runs before the OS normalizes the path
- Silently strips a trailing ASCII period from filenames on write
- Resolves `..\` traversal components
- Has worked this way for decades — it's documented Microsoft behavior
Why this isn't just a Visual Studio story
CWE-94 — code injection that happens because an AI agent's own safety check can be routed around — is becoming a recurring shape, not an isolated class of bug. We covered the same root pattern in PraisonAI's CodeAgent (CVE-2026-61447, CVSS 10.0): a component designed to execute model-generated code, with a containment assumption that didn't hold once untrusted input reached it. The common thread across both is that the vulnerable surface isn't the AI model's judgment — it's the boring, deterministic plumbing (a path check, a sandbox boundary) that was supposed to backstop that judgment regardless of what the model decided to do.
| Product | Affected versions | Fixed in |
|---|---|---|
| Visual Studio 2022 (17.14) | 17.14.0 – below 17.14.42 | 17.14.42 |
| Visual Studio 2026 (18.10) | 18.10.0 – below 18.10.4 | 18.10.4 |
| SQL Server Management Studio | Shares the vulnerable Copilot.Core.dll | Fixed with the same rollup |
Microsoft's fix is a code change (`GetFullPath` normalization before the comparison), not a signature defenders can deploy. There is no public Sigma, Suricata, or Nuclei rule for this bug. Below is an audit check we wrote ourselves — not a vendor-issued or crowd-sourced detection — to help you confirm you're patched and your settings weren't already tampered with.
# PowerShell: flag suspicious ripgrepPath / MCP entries and leftover trailing-dot files
Get-ChildItem -Recurse -Filter "settings.VisualStudio.json*" $env:APPDATA,$env:LOCALAPPDATA 2>$null |
Where-Object { $_.Name -match '\.$' -or (Get-Content $_.FullName -Raw) -match 'ripgrepPath'} |
ForEach-Object { Write-Host "Review: $($_.FullName)" }
Get-ChildItem -Recurse -Filter ".mcp.json*" $env:USERPROFILE 2>$null |
Where-Object { $_.Name -match '\.$' } |
ForEach-Object { Write-Host "Trailing-dot .mcp.json found: $($_.FullName)" }- Update to Visual Studio 2022 17.14.42, Visual Studio 2026 18.10.4, or the equivalent patched SSMS build — there is no workaround short of the patch.
- After updating, manually inspect
.mcp.json,enabledMcpServers/disabledMcpServers, and thecopilot.general.tools.ripgrepPathvalue insettings.VisualStudio.jsonfor anything you didn't configure yourself. - If you run Copilot agents against untrusted content (web pages, third-party repos, tool output you don't control), treat that as the real attack surface — this bug needed prompt injection to matter, not network access.
- Track your own exposure on your stack rather than assuming a Patch Tuesday fix means every machine in your fleet is current.
Vulnerability and bounty data current as of October 23, 2026
For the bigger picture on the vendor behind this bug, see our Microsoft vendor page and trends for how this CVE compares to the rest of the record October 2026 Patch Tuesday batch.
Sources: Embrace The Red — "Visual Studio Copilot and SSMS Remote Code Execution" (original research) · Microsoft Security Response Center — CVE-2026-103572 advisory · NVD — CVE-2026-103572