Skip to content
MicrosoftGHSA-x5qc-gqm7-93qp

Visual Studio Code webview resource path containment bypass

High7.4CVE-2026-81383 · Published Sep 8, 2026

## Impact An information disclosure vulnerability exists in Visual Studio Code 1.136.1 and earlier versions. A script running inside a webview could read file content outside the `localResourceRoots` declared by the extension that created the webview. For resources using a non-`file` URI scheme, such as `vscode-remote`, the containment check and the subsequent resource resolution interpreted path separators differently. An attacker-controlled webview could construct a resource path containing backslashes that passed the allowed-root containment check but later resolved outside the permitted roots. Successful exploitation could disclose file content accessible with the privileges of the affected user. ## Patches The fix is available starting with **Visual Studio Code 1.136.2**. The fix ([461bd99](https://github.com/microsoft/vscode/commit/461bd99584a70d51f079dda93353b4b880c9d56d)) normalizes backslashes in non-`file` resource paths before performing the containment check. Authorization and resource resolution therefore use consistent path-separator semantics, and requests that escape the configured `localResourceRoots` are denied. Users should update to Visual Studio Code 1.1...

GitHub advisory

Affected versions

PackageAffectedFixed in
Visual Studio Code
Product
< 1.136.21.136.2
Details and references

## Impact An information disclosure vulnerability exists in Visual Studio Code 1.136.1 and earlier versions. A script running inside a webview could read file content outside the `localResourceRoots` declared by the extension that created the webview. For resources using a non-`file` URI scheme, such as `vscode-remote`, the containment check and the subsequent resource resolution interpreted path separators differently. An attacker-controlled webview could construct a resource path containing backslashes that passed the allowed-root containment check but later resolved outside the permitted roots. Successful exploitation could disclose file content accessible with the privileges of the affected user. ## Patches The fix is available starting with **Visual Studio Code 1.136.2**. The fix ([461bd99](https://github.com/microsoft/vscode/commit/461bd99584a70d51f079dda93353b4b880c9d56d)) normalizes backslashes in non-`file` resource paths before performing the containment check. Authorization and resource resolution therefore use consistent path-separator semantics, and requests that escape the configured `localResourceRoots` are denied. Users should update to Visual Studio Code 1.136.2 or later. ## Workarounds There are no known workarounds. Users should update to Visual Studio Code 1.136.2 or later. ## References - [Visual Studio Code issue #335118](https://github.com/microsoft/vscode/issues/335118) - [Fix commit 461bd99](https://github.com/microsoft/vscode/commit/461bd99584a70d51f079dda93353b4b880c9d56d) - [MSRC entry for CVE-2026-81383](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-81383) - [Visual Studio Code webview security documentation](https://code.visualstudio.com/api/extension-guides/webview#security)

CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
Severity from
GitHub (reviewed advisory)
Weakness
CWE-706

More Microsoft advisories

All Microsoft
Advisory
Microsoft Skype for Business: spoofing
High8.3Sep 8
Microsoft Skype for Business: cross-site scripting
Medium6.5Sep 8
Microsoft Skype for Business: spoofing
High7.1Sep 8
Microsoft Skype for Business: information disclosure
Medium6.5Sep 8
Microsoft Skype for Business: integer overflow
High7.5Sep 8
Microsoft Skype for Business: out-of-bounds read
Medium6.5Sep 8

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.