Security Update for Microsoft Visual Studio Code (February 2025)

high Nessus Plugin ID 216141

Synopsis

The remote host has an application installed that is missing a security update.

Description

The version of Microsoft Visual Studio Code installed on the remote host is prior to 1.97.1. It is, therefore, affected by multiple vulnerabilities:

- An elevation of privilege vulnerability exists in VS Code 1.97.0 and earlier versions for users of the code serve-web command on Windows. An attacker can place an evil version of the node module that is optionally required by one of the dependencies for the Visual Studio Code remote server in a world writable directory like C:\node_modules to get it executed under the privileges of the current user. (CVE-2025-24039)

- A vulnerability exists in VS Code 1.97.0 and earlier versions where an attacker with write permissions on certain common directories can place a binary that would be executed automatically by the JavaScript debugger. This requires an attacker to be able to create and modify files on the user's machine. (CVE-2025-24042)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Microsoft Visual Studio Code 1.97.1 or later.

See Also

https://code.visualstudio.com/updates/v1_97

https://github.com/microsoft/vscode/issues/240406

https://github.com/microsoft/vscode/issues/240407

Plugin Details

Severity: High

ID: 216141

File Name: microsoft_visual_studio_code_1_97_1.nasl

Version: 1.1

Type: local

Agent: windows, macosx, unix

Family: Misc.

Published: 2/11/2025

Updated: 2/11/2025

Configuration: Enable thorough checks

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: High

Score: 8.4

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Vector: CVSS2#AV:L/AC:L/Au:S/C:C/I:C/A:C

CVSS Score Source: CVE-2025-24042

CVSS v3

Risk Factor: High

Base Score: 7.3

Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

Vulnerability Information

CPE: cpe:/a:microsoft:visual_studio_code

Patch Publication Date: 2/11/2025

Vulnerability Publication Date: 2/11/2025

Reference Information

CVE: CVE-2025-24039, CVE-2025-24042