a2ui-project / a2ui-project/a2ui
[BUG]: Dynamic function properties (including `openUrl`) evaluate at bind time without a user gesture
- Langage dominant
- TypeScript
- Étoiles
- 16.4k
- Forks
- 1.3k
- Merge moyen
- 3 j 15 h
- PR mergées (30 j)
- 134
Description
# Dynamic function properties (including `openUrl`) evaluate at bind time without a user gesture
Repository: https://github.com/a2ui-project/a2ui
Affected: `@a2ui/web_core` dynamic binding evaluation
CWE: CWE-601 (URL Redirection to Untrusted Site — Open Redirect)
## Summary
Any component property written as `{call: "openUrl", args: {url: ...}}` executes when the binder resolves the property (i.e., at render/bind time), not when the user interacts with the component. The fix for CVE-2026-10032 constrains the URL scheme to `http(s)` with `noopener,noreferrer`, but navigation still occurs without any user gesture.
## Affected code
- `renderers/web_core/src/v0_9/rendering/data-context.ts:188-254` — function-call branch of property resolution
- `renderers/web_core/src/v0_9/rendering/generic-binder.ts:225-241` — bind-time evaluation
## Impact
An agent can open a chosen `https://` URL (e.g., a phishing page) as soon as a surface renders. Browser pop-up blockers typically mitigate the no-gesture `window.open` path, which limits practical exploitability. Render-time re-evaluation is also the amplifier for the separate regex ReDoS report (one message, repeated evaluation per keystroke).
## Suggested remediation
Restrict functions with side effects (navigation, `returnType: 'void'` action-style functions) to ACTION contexts (user-initiated handlers); render-time property evaluation should be limited to pure functions.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Examine the property resolution logic in renderers/web_core/src/v0_9/rendering/data-context.ts lines 188-254 and the bind-time evaluation in generic-binder.ts lines 225-241. Understand how dynamic function properties are evaluated. The goal is to modify the binder to restrict side-effect functions like `openUrl` to user-initiated action contexts, preventing automatic execution at render time. Testing will involve verifying that navigation only occurs after a user gesture.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- frontend, security
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Active
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100