#708·genoffice

html: preview inspector uses postMessage star with source-only check

Author: aniruddhaadak80Created Sep 22, 2026Updated Sep 22, 2026

Problem

PreviewFrame posts with '*' and validates inbound only by event.source; navigated-link frames in the preview can exfiltrate doc content and AI ops.

Evidence

  • apps/html/src/renderer/preview/PreviewFrame.tsx:17,40-51

Suggested fix

Validate event.origin null (opaque origin) + message shape allowlist; post to explicit origin, drop posts once navigated away.

Acceptance

  • Navigated evil frame inbound ignored; outbound never uses star.