CVE-2025-26631

7.3 HIGH

📋 TL;DR

This vulnerability in Visual Studio Code allows an authorized attacker to execute arbitrary code with elevated privileges by exploiting an uncontrolled search path element. It affects users who have local access to systems running vulnerable versions of Visual Studio Code. The attacker must already have some level of access to the system to exploit this vulnerability.

💻 Affected Systems

Products:
  • Visual Studio Code
Versions: Versions prior to 1.95.0
Operating Systems: Windows, Linux, macOS
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations of Visual Studio Code prior to the patched version are vulnerable. The vulnerability exists in how VS Code handles DLL/Shared library loading paths.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker with local access could execute arbitrary code with SYSTEM/root privileges, potentially taking full control of the system, installing persistent malware, or accessing sensitive data.

🟠

Likely Case

An authorized user or malware with local access could elevate privileges to install additional software, modify system configurations, or bypass security controls.

🟢

If Mitigated

With proper access controls and least privilege principles, the impact is limited to the user's own environment without system-wide compromise.

🌐 Internet-Facing: LOW - This is a local privilege escalation vulnerability requiring local access to exploit.
🏢 Internal Only: HIGH - Internal users with access to vulnerable systems could exploit this to gain elevated privileges.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires local access and some level of user privileges. The attacker needs to place malicious DLLs in specific locations that VS Code will load from.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Visual Studio Code 1.95.0 and later

Vendor Advisory: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-26631

Restart Required: No

Instructions:

1. Open Visual Studio Code. 2. Click on Help menu. 3. Select Check for Updates. 4. Install update to version 1.95.0 or later. 5. Restart Visual Studio Code if prompted.

🔧 Temporary Workarounds

Restrict DLL loading paths

all

Configure system policies to restrict where applications can load DLLs/shared libraries from

Use application whitelisting

all

Implement application control policies to prevent execution of unauthorized binaries

🧯 If You Can't Patch

  • Implement strict access controls to limit who can run Visual Studio Code on sensitive systems
  • Monitor for suspicious DLL loading behavior and file creation in VS Code directories

🔍 How to Verify

Check if Vulnerable:

Check Visual Studio Code version: Open VS Code, go to Help > About. If version is below 1.95.0, the system is vulnerable.

Check Version:

code --version

Verify Fix Applied:

Verify Visual Studio Code version is 1.95.0 or higher in Help > About menu.

📡 Detection & Monitoring

Log Indicators:

  • Unusual DLL loading from non-standard paths by VS Code process
  • File creation events in VS Code installation directories

Network Indicators:

  • None - this is a local privilege escalation vulnerability

SIEM Query:

Process Creation where Image contains 'code.exe' AND CommandLine contains unusual DLL loading patterns

🔗 References

📤 Share & Export