plugins
google-labs-code/stitch-skills/plugins
- Type
- MCP server
- Scanned
- Nov 13, 2026
- Version
- 0337446dadde
- Files read
- 79
This collection of agent plugins connects coding assistants to Google Stitch to generate UI designs, extract design systems and static HTML from existing web apps, upload assets, and convert screens into React, React Native, or Remotion video code. Its biggest risks are that the HTML extraction scripts can silently embed arbitrary local files or internal cross-origin iframe content from untrusted projects into uploaded snapshots, and the upload skill reads global agent configuration secrets into the AI context while allowing an unvalidated upload server URL.
What it can reach
- Files
- Reads and writes project source files, static HTML snapshots, screenshots, and .stitch metadata, and reads global agent configuration files (~/.claude.json, ~/.gemini/settings.json) to locate API keys.
- Shell commands
- Grants Bash access across build, design, and loop skills to run Node, TypeScript, Python, and shell scripts as well as npm, npx, and curl commands.
- Network
- Downloads generated HTML and screenshots from Google Cloud Storage, fetches remote images and stylesheets referenced in pages, and uploads local HTML, markdown, and image files to the Google Stitch API and MCP servers.
- Secrets
- Extracts the user's X-Goog-Api-Key from local MCP configuration files and sends it in HTTP headers when uploading files to Stitch.
- Browser
- Launches headless Chrome via Puppeteer to capture rendered web pages and optionally controls Chrome DevTools MCP for visual verification.
Findings
-
HighArbitrary local file disclosure via path traversal in static HTML post-processor
plugins/stitch-design/skills/extract-static-html/scripts/post_process.ts:225
When post_process.ts inlines local resources referenced in src, poster, data, or CSS url() attributes, resolveLocalFile checks the raw attribute path directly on the host filesystem before checking --base-dir, does not block ../ traversal or symlinks escaping --base-dir, and allows any file extension (defaulting to application/octet-stream up to 5 MB). Processing HTML or CSS from an untrusted repository can silently base64-encode sensitive local files such as SSH keys, .env files, or ~/.claude.json into the output HTML file, which the code-to-design workflow then uploads to Stitch or the user shares.
Fix: Require --base-dir, resolve candidate paths with fs.realpathSync, reject any path outside fs.realpathSync(baseDir), and restrict inlining to allowlisted image extensions.
-
HighCross-origin iframe Same-Origin Policy bypass in Puppeteer page snapshotter
plugins/stitch-design/skills/extract-static-html/scripts/snapshot.ts:795
When snapshotting a page that contains iframes, snapshot.ts uses Puppeteer's privileged Chrome DevTools Protocol frame.evaluate() loop to extract document.body.innerHTML from every child frame without verifying that the frame matches the target page's origin or blocking internal network and file:// URLs. An untrusted page or embedded widget containing an iframe pointing to localhost services, cloud metadata endpoints (such as 169.254.169.254), or local files (when snapshotting a file:// page) will have that protected content copied into the saved HTML snapshot and uploaded during code-to-design.
Fix: Before extracting a child frame via CDP, verify that its resolved origin matches the target --url origin, and block requests to private/loopback IP ranges and file:// URLs.
-
HighGlobal MCP config secrets loaded into AI context and sent to unvalidated upload URL
plugins/stitch-design/skills/upload-to-stitch/SKILL.md:37
The upload-to-stitch skill instructs the AI agent to read global configuration files (~/.claude.json and ~/.gemini/settings.json) directly into the LLM context—exposing all other MCP server tokens and secrets stored there—and pass the Stitch key on the command line (--api-key), where it is visible in the local process list. It also tells the agent to check workspace-relative .gemini/antigravity/mcp_config.json for an optional httpUrl (--api-url), and upload_to_stitch.py sends the X-Goog-Api-Key header and file payload to --api-url without checking that the host is stitch.googleapis.com or uses HTTPS, nor is the destination URL shown in the user confirmation prompt.
Fix: Have upload_to_stitch.py read the Stitch API key directly in-process from a dedicated environment variable or user home config file instead of exposing ~/.claude.json to the LLM and CLI arguments, ignore workspace-relative config files for credentials or endpoints, and restrict --api-url to https://stitch.googleapis.com.
-
MediumIncomplete SSRF protection in static JSX-to-HTML image fetcher
plugins/stitch-design/skills/extract-static-html/scripts/extract_inline_html.ts:260
extract_inline_html.ts includes isSafeUrl() to prevent attacker-controlled image, video poster, and CSS url() links in JSX/CSS files from probing internal networks, but it only checks literal 'localhost', '[::1]', and dotted-quad IPv4 strings without resolving DNS. An untrusted JSX or CSS file can bypass this filter using IPv4-mapped IPv6 addresses (such as http://[::ffff:127.0.0.1] or http://[::ffff:169.254.169.254]), unspecified/private IPv6 ([::], fc00::/7, fe80::/10), trailing-dot localhost., or DNS names that resolve to private IPs (such as nip.io), embedding internal HTTP responses as base64 data URIs in the generated HTML.
Fix: Resolve hostnames via dns.lookup before connecting (and on every redirect), pin the resolved IP on the socket, and block all loopback, link-local, unique-local, unspecified, and IPv4-mapped private IPv6 and IPv4 ranges.
-
MediumHeadless Chrome launched unconditionally with OS sandbox disabled
plugins/stitch-design/skills/extract-static-html/scripts/snapshot.ts:288
snapshot.ts hardcodes '--no-sandbox' and '--disable-setuid-sandbox' when launching Puppeteer. Disabling Chromium's OS sandbox removes process isolation on the user's machine if a snapshotted webpage, untrusted local app, or third-party script/font triggers a browser renderer vulnerability.
Fix: Enable the Chromium sandbox by default and only allow '--no-sandbox' when explicitly requested via an opt-in flag for restricted container environments.
-
LowOver-broad Bash and web_fetch permissions granted to read-only source analysis skill
plugins/stitch-design/skills/extract-design-md/SKILL.md:14
The extract-design-md skill states that it reads source files only with no build or runtime dependencies, and explicitly instructs the agent to read code comments and git commit messages from target repositories, yet its frontmatter grants unrestricted 'Bash' and 'web_fetch' in allowed-tools. In agent hosts that auto-approve allowed-tools for the active skill, prompt injection hidden in repository comments can execute shell commands without needing Bash for legitimate design extraction.
Fix: Remove 'Bash' and 'web_fetch' from extract-design-md allowed-tools, and scope Bash permissions in other skills to their specific helper scripts.
-
LowUnpinned third-party packages downloaded and executed via npx at runtime
plugins/stitch-design/skills/extract-static-html/SKILL.md:61
Several skills instruct the agent to execute unpinned packages from npm at runtime without a package.json or lockfile—such as 'npx tsx' in extract-static-html, 'npx shadcn@latest' in shadcn-ui, 'npm create video@latest' in remotion, and 'npx serve' in stitch-loop—exposing installs to upstream package compromise or unexpected breaking behavior.
Fix: Declare required CLI tools with pinned versions and lockfiles inside the skill directories, or invoke locally installed project binaries.
