Skip to content
Info disclosure Advisory Intermediate CVE-2022-41042

Visual Studio Code Information Disclosure Vulnerability (CVE-2022-41042)

Visual Studio Code did not properly enforce its Workspace Trust boundary when rendering a malicious link inside an extension. An attacker who entices a user to open such a link could break out of Workspace Trust and disclose file content.

Vasco Franco Follow

Originally disclosed on Microsoft

High 7.4 View original

FAQ

According to the CVSS metric, a successful exploitation could lead to a scope change (S:C). What does this mean for this vulnerability? In this case, a successful attack can break out of the Visual Studio Code Workspace Trust feature. See Workspace Trust for more information.

FAQ

According to the CVSS metric, user interaction is required (UI:R). What interaction would the user have to do? The user would have be enticed to open a malicious link rendered in a VSCode extension. Users should never open anything that they do not know or trust to be safe.

FAQ

What type of information could be disclosed by this vulnerability? The type of information that could be disclosed if an attacker successfully exploited this vulnerability is file content.

Visual Studio Code

Visual Studio Code

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Vasco Franco with Trail of Bits. 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

Impact

A successful attack could break out of Workspace Trust and disclose file content, but the user must first be enticed to open a malicious link.

What the attacker needed

Victim opens a malicious link in an extension

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.

Workspace Trust is a safety setting in Visual Studio Code that limits what code in an untrusted folder is allowed to do. This bug meant a crafted link shown inside an extension could get past that safety setting. If a user opened the link, files on their machine could be read by the attacker.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.