Skip to content
RCE Advisory Intermediate CVE-2018-8172

Visual Studio Remote Code Execution Vulnerability (CVE-2018-8172)

Visual Studio did not properly check the source code of a file for an unbuilt project, allowing an attacker to run arbitrary code in the context of the current user. An attacker could exploit this by sending a specially crafted project or resource file and convincing the user to open it.

Soroush Dalili Follow

Originally disclosed on Microsoft

Description

A remote code execution vulnerability exists in Visual Studio software when the software does not check the source code of a file for an unbuilt project. An attacker who successfully exploited the vulnerability could run arbitrary code in the context of the current user. If the current user is logged on with administrative user rights, an attacker could take control of the affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights. Exploitation of the vulnerability requires that a user open a specially crafted file with an affected version of Visual Studio. In an email attack scenario, an attacker could exploit the vulnerability by sending a specially crafted project, or resource file, to the user and convince the user to open the file. The security update addresses the vulnerability by correcting how Visual Studio checks the source code of a file.

Visual Studio

Visual Studio

The original report as published on the Microsoft Security Response Center, by Soroush Dalili of NCC Group. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, Visual Studio did not properly validate the source code of a file for an unbuilt project before executing it.

Impact

An attacker could run arbitrary code in the context of the current user; if the user has administrative rights, the attacker could take control of the system, install programs, view, change, or delete data, or create new accounts with full user rights.

What the attacker needed

User opens a specially crafted file; affected version of Visual Studio

The fix

The security update addresses the vulnerability by correcting how Visual Studio checks the source code of a file.

How it was found

  1. An attacker creates a specially crafted project or resource file.
  2. The attacker sends the file to the user via email or another method.
  3. The attacker convinces the user to open the file with an affected version of Visual Studio.
  4. The malicious code runs in the context of the current user.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Visual Studio is a program for writing code. It failed to check where a project file came from before running it. So if someone sent you a malicious project file and you opened it, that file could run harmful code on your computer with your permissions.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Soroush Dalili

View all

6 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.