microsoft / microsoft/WinAppVSCE

Manifest editor exposes arbitrary local file existence through checkImagePath

Open
#167 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

language-server
Dominant language
TypeScript
Stars
13
Forks
3
Avg merge
6d 1h
Merged PRs (30d)
11

Description

Describe the bug

The manifest editor extension host handles untrusted webview checkImagePath messages by calling fs.existsSync on absolute paths and paths resolved outside the manifest/workspace roots. Its imagePathStatus response reveals whether an arbitrary local path exists.

This was surfaced while resolving #71. The file-copy sink is now separately gated by an opaque token and native user confirmation; this issue is limited to the remaining existence oracle and is intentionally out of scope for #71.

To Reproduce
  1. Open an AppxManifest file in the custom manifest editor.
  2. From a compromised or malicious webview script, post repeated checkImagePath messages containing absolute local paths.
  3. Observe imagePathStatus: external for existing paths and notFound otherwise.
Expected behavior

Webview-originated path checks should be restricted to trusted package/workspace roots. External paths should only be inspected after explicit native user selection or another extension-host-controlled authorization step.

Screenshots

N/A

OS Version and details

Windows 11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the manifest editor extension-host handler for checkImagePath and trace how paths become the imagePathStatus response. Verify the reproduction with absolute paths, then restrict webview-originated checks to trusted package or workspace roots; external paths should require explicit native selection or extension-host authorization.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.