Skip to content

security(finicity): JSON-encode user-controlled values in WebView script#2292

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/application-security-review-4a1e
Draft

security(finicity): JSON-encode user-controlled values in WebView script#2292
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/application-security-review-4a1e

Conversation

@cursor

@cursor cursor Bot commented Jun 19, 2026

Copy link
Copy Markdown

Vulnerability summary

Finicity Connect's web renderer interpolated user-influenced uri, overlay, position, and widgetId values directly into generated JavaScript. Attacker-controlled bindings could break out of string literals and execute arbitrary code inside the Finicity WebView.

Affected location

  • modules/ensemble/lib/widget/fintech/finicityconnect/web/finicityconnectstate.dart
  • New helper: modules/ensemble/lib/widget/fintech/finicity_connect_script.dart

Security impact

High — An external attacker who can influence Finicity widget configuration can inject JavaScript in the WebView context and forge Finicity callback messages, triggering downstream YAML actions such as onSuccess with attacker-controlled event data.

Attack path

  1. Attacker controls input bound to uri, overlay, or position (via deeplink args, API response, or other user input).
  2. Finicity web renderer embeds the value in a JS string literal without escaping.
  3. Payload breaks out of the literal (e.g. "); alert(1);//) and runs in the WebView.
  4. Attacker can call handleMessage(...) to trigger financial flow callbacks.

Fix approach

  • Extract script generation into buildFinicityConnectInstantiateScript().
  • Embed all externally influenced string values via jsonEncode().

Tests

  • Added modules/ensemble/test/finicity_connect_script_test.dart
Open in Web View Automation 

Finicity Connect web renderer interpolated uri, overlay, and position
directly into generated JavaScript. Attacker-influenced bindings could break
out of string literals and execute arbitrary code in the WebView.

Co-authored-by: Sharjeel Yunus <sharjeelyunus@users.noreply.github.com>
@cursor cursor Bot force-pushed the cursor/application-security-review-4a1e branch 2 times, most recently from 62023d2 to d2518d9 Compare June 19, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant