Skip to content
microsoft/vscode·Indexed by this site · Originally published· Event →SelectedAttention39

VS Code Agent Host has a vulnerability where local commands from an Agent source bypass terminal approval and execute; fixed in 1.145.3

Command Execution via Agent-Originated Local Commands

AI summary

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.

Why it was selected

The advisory clearly states the attack preconditions and temporary mitigation configurations, so teams using VS Code Agent can use it to check terminal approval and session-level tool permission settings.

Read originalgithub.com