Skip to content

security(lottie): validate postMessage origin on web HTML renderer#2283

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

security(lottie): validate postMessage origin on web HTML renderer#2283
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/application-security-review-7068

Conversation

@cursor

@cursor cursor Bot commented Jun 15, 2026

Copy link
Copy Markdown

Vulnerability summary

The Lottie web HTML renderer registered a global window.onMessage listener without validating event.origin, and used wildcard ("*") postMessage targets. A cross-origin browsing context with a window reference could spoof animation callbacks and trigger YAML-defined Ensemble actions.

Affected location

modules/ensemble/lib/widget/lottie/web/lottiestate.dart

Security impact

  • Attacker: Malicious embedded page or any origin that can postMessage the host window
  • Input: Spoofed JSON callback payloads (data, id, tag)
  • Path: Global listener → ScreenController().executeAction() on wired callbacks
  • Severity: Medium

Fix

  • Restrict postMessage to app origin; validate inbound event.origin
  • Add lottie_post_message.dart helpers and regression tests
Open in Web View Automation 

The Lottie web HTML renderer listened for window messages without checking
event.origin and used wildcard postMessage targets. A cross-origin page with
a window reference could spoof onComplete/onForward callbacks and trigger
YAML-defined actions.

Restrict iframe and host traffic to the app origin and add regression tests.

Co-authored-by: Sharjeel Yunus <sharjeelyunus@users.noreply.github.com>
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