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...
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| Visual Studio Code Product | < 1.136.2 | 1.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| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Sep 8 | Microsoft Skype for Business: spoofing | High8.3 | 6.0.9319.885+2 more |
| Sep 8 | Microsoft Skype for Business: cross-site scripting | Medium6.5 | 6.0.9319.885+2 more |
| Sep 8 | Microsoft Skype for Business: spoofing | High7.1 | 6.0.9319.885+2 more |
| Sep 8 | Microsoft Skype for Business: information disclosure | Medium6.5 | 6.0.9319.885+2 more |
| Sep 8 | Microsoft Skype for Business: integer overflow | High7.5 | 6.0.9319.885+2 more |
| Sep 8 | Microsoft Skype for Business: out-of-bounds read | Medium6.5 | 6.0.9319.885+2 more |