AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

MicrosoftGHSA-x5qc-gqm7-93qp

Visual Studio Code webview resource path containment bypass

Microsoft

CVE-2026-81383 · Published Sep 8, 2026

High7.4
Fix: upgrade to 1.136.2 or later
GitHub advisory

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...

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