VS Code Agent Host runs agent-originated local commands without expected terminal approval
Summary
Per the vendor advisory, the VS Code Agent Host in 1.145.2 and earlier could treat local-command syntax from an agent message as if the user had entered it. The command could then run without the expected terminal approval. The advisory says an attacker would need to influence an agent's child prompt, typically through untrusted repository instructions, and the user would need to grant the related session tool operation. The fix is available starting with VS Code 1.145.3.
Severity
Timeline
Advisory GHSA-w9fm-7vcm-cvq4 (CVE-2026-120782) published by the vendor, per the vendor advisory
How it happened
Per the vendor advisory, local-command syntax in an agent message could be handled as user-entered input and execute without the expected terminal approval. The advisory says the attacker would need to influence an agent's child prompt, typically through untrusted repository instructions or other prompt content. It also says the user would need to grant the related session tool operation.
How to check your app
- VS Code 1.145.2 and earlier: Check the installed VS Code version. Versions below 1.145.3 are listed as vulnerable.
- VS Code earlier than 1.145.3: Check whether session-wide tool permissions were granted in repositories that contain untrusted instructions.
Sources
Corrections and updates
Cite this entry
- Title
- VS Code Agent Host runs agent-originated local commands without expected terminal approval
- Added
- Nov 16, 2026
- URL
- https://vibeincidents.com/incidents/vs-code-cve-2026-120782/
- Suggested citation
VibeIncidents. "VS Code Agent Host runs agent-originated local commands without expected terminal approval." Nov 16, 2026. https://vibeincidents.com/incidents/vs-code-cve-2026-120782/