a2ui-project / a2ui-project/a2ui

[BUG]: Dynamic function properties (including `openUrl`) evaluate at bind time without a user gesture

Aperta
#2,296 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
P2 status: first-line-handled
Lingua principale
TypeScript
Stelle
16.4k
Fork
1.3k
Merge medio
3g 15h
PR unite (30g)
134

Descrizione

# 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
frontend, security
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.