security: iframe sandbox allows same-origin access to parent page
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Calme
- Stack technique
- typescript
Piste de recherche
Start at apps/app/src/components/generative-ui/widget-renderer.tsx:523 and inspect how the iframe sandbox and postMessage bridge are configured. Test what breaks when allow-same-origin is removed, including any CDN or fetch behavior mentioned in the issue. Done means the sandbox uses only the permissions required by the renderer, the bridge still works, and the intentional security tradeoff is documented if the permission must remain.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Description
Severity: P0 — Security
In apps/app/src/components/generative-ui/widget-renderer.tsx:523, the iframe sandbox attribute is:
sandbox="allow-scripts allow-same-origin"
The combination of allow-scripts + allow-same-origin allows the iframe to access window.parent and all parent DOM/cookies. While the CSP mitigates remote script loading, agent-generated HTML with inline scripts has full same-origin access to the host page.
Failure mode
XSS via agent-generated content — malicious or hallucinated HTML could read/modify parent page state, steal cookies, or call CopilotKit APIs.
Suggested fix
Remove allow-same-origin from the sandbox. The iframe only needs allow-scripts. The postMessage bridge already works cross-origin. If allow-same-origin is truly required (e.g., for CDN fetches), tighten CSP connect-src and document the tradeoff.
Open question
Is allow-same-origin intentional? What breaks if it's removed?
From self-review finding F01
- Langage dominant
- TypeScript
- Étoiles
- 3.9k
- Forks
- 414
- Merge moyen
- 4 h
- PR mergées (30 j)
- 6
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de CopilotKit/OpenIntelligentUI
-
Script dedup key truncation may cause collisionsPeut-être pris @saschabuehrle l’a pris il y a 216 jours. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
CopilotKit/OpenIntelligentUI#37 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
CopilotKit/OpenIntelligentUI#29 ·
Les mainteneurs répondent en général sous 1 jour
-
Self-host with Docker Compose and optional server-held keysPeut-être pris @kannan983 l’a pris il y a 16 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 18/100
CopilotKit/OpenIntelligentUI#98 ·
Les mainteneurs répondent en général sous 1 jour
-
Support OpenAI-compatible gateways (OpenRouter) via vendor/model namesPeut-être pris @kannan983 l’a pris il y a 16 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 25/100
CopilotKit/OpenIntelligentUI#97 ·
Les mainteneurs répondent en général sous 1 jour
-
UIOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 8/100
CopilotKit/OpenIntelligentUI#96 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de CopilotKit/OpenIntelligentUI
Issues similaires
-
bug needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
apex-dev-tools/apex-log-parser#199 ·
Les mainteneurs répondent en général sous 1 jour
-
area/frontend/library-panels automated-triage type/bug type/ux
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
PostHog/posthog.com#21607 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
ajv-validator/ajv#2689 ·
-
[Bug]: IME confirmation Enter can submit the SSH port-forward dialogPeut-être pris @seijikohara l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour