VS Code agent local command bypass of terminal approval vulnerability has been fixed
Start here
A Microsoft security advisory discloses a VS Code Agent Host security feature bypass vulnerability: local command syntax in Agent messages can be treated as user input and executed without terminal approval. An attacker needs to influence the Agent sub-prompt (typically via untrusted repository instructions, etc.), and the user must have already granted session tool permissions. Versions before 1.145.3 are affected; it has been fixed in 1.145.3.
Generated by AI from reports · Updated 18 days ago
Progress timeline
- microsoft/vscodeSelectedVS Code Agent Host has a vulnerability where local commands from an Agent source bypass terminal approval and execute; fixed in 1.145.3
Microsoft released a security advisory disclosing a security feature bypass vulnerability in VS Code Agent Host (CVE-2026-120782, GHSA-w9fm-7vcm-cvq4): local command syntax from Agent messages may be treated as direct user input and executed without the expected terminal approval. Versions before 1.145.3 are affected, and it has been fixed in 1.145.3. An attacker needs to influence the Agent's sub-prompts (typically through prompt content such as untrusted repository instructions), and the user needs to grant the relevant session tool operation permissions. The fix works by preserving message provenance and restricting local command handling to messages that genuinely come from the user. Temporary mitigations include using the Copilot harness instead of the Local harness when available, keeping terminal approval enabled, and not granting session-level tool permissions to repositories containing untrusted instructions.