Summary
An information disclosure vulnerability exists in VS Code 1.141.0 and earlier versions where remote webview resource paths were not consistently normalized before being checked against the webview's allowed resource roots. Specially crafted resource paths could bypass these containment checks and allow a webview to read files outside its permitted directories on the remote host.
Details
An attacker would need to cause a webview to issue specially crafted resource requests while the user is connected to a remote workspace.
Patches
The fix is available starting with VS Code 1.141.1. The fix (b0240f4) normalizes remote resource requests and allowed roots using the remote operating system's path rules, then loads the same normalized path that passed the containment check. Remote resource requests are denied when the remote operating system cannot be determined.
Workarounds
Avoid opening untrusted content in webviews while connected to a remote workspace until you can update to a patched version.
References
Summary
An information disclosure vulnerability exists in VS Code 1.141.0 and earlier versions where remote webview resource paths were not consistently normalized before being checked against the webview's allowed resource roots. Specially crafted resource paths could bypass these containment checks and allow a webview to read files outside its permitted directories on the remote host.
Details
An attacker would need to cause a webview to issue specially crafted resource requests while the user is connected to a remote workspace.
Patches
The fix is available starting with VS Code 1.141.1. The fix (b0240f4) normalizes remote resource requests and allowed roots using the remote operating system's path rules, then loads the same normalized path that passed the containment check. Remote resource requests are denied when the remote operating system cannot be determined.
Workarounds
Avoid opening untrusted content in webviews while connected to a remote workspace until you can update to a patched version.
References