a2ui-project / a2ui-project/a2ui

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

Offen
#2,296 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
P2 status: first-line-handled
Vorherrschende Sprache
TypeScript
Sterne
16.4k
Forks
1.3k
Ø Merge
3 T. 15 Std.
Gemergte PRs (30 T.)
134

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
frontend, security
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.