Tooling Published here Reported by GitHub on

A Google Labs agent skill was folding cross-origin iframes into the page it snapshotted

A security fix landed in google-labs-code/stitch-skills on November 28, in the extract-static-html skill that turns a running web app into a self-contained HTML snapshot. The script read each child frame's innerHTML with Puppeteer's frame.evaluate, which is not subject to the Same-Origin Policy, then wrote that markup into the parent frame's live DOM while the parent page's own JavaScript was still running, since script tags are stripped near the end. The PR's repro registers a MutationObserver on the parent and reads a canary served by another origin. Frames are now inlined only when their origin matches the parent's, with --allow-cross-origin-frames as an opt-out.

Why it matters

Headless browsers do not enforce the Same-Origin Policy the way a tab does, and an agent skill that drives one inherits that. Everything the browser protects you from β€” a third-party widget's contents, an embedded dashboard from another host, anything at any nesting depth β€” became readable by the page being snapshotted. If you have written any screenshot, scrape or snapshot tool for an agent on top of Puppeteer or Playwright, this is your bug too, and it sits less in your code than in the gap between what the automation API allows and what a browser allows.

What to do

Update the stitch-design plugin if you use extract-static-html, and leave --allow-cross-origin-frames off unless every frame on the page is yours. In your own browser automation, compute each frame's origin before you read it and fail closed on opaque origins, the way the new frame_policy module does. Then verify it: serve a canary on a second port, iframe it, and confirm the string never reaches the parent's output.

Tags: Google Security Agents Developer Tools

More from November 30, 2026

All AI news