Skip to content

fix(wallet): require secure-site origin on W3mFrame postMessage - #5743

Open
SashaMIT wants to merge 1 commit into
reown-com:mainfrom
SashaMIT:fix/w3mframe-require-secure-site-origin
Open

fix(wallet): require secure-site origin on W3mFrame postMessage#5743
SashaMIT wants to merge 1 commit into
reown-com:mainfrom
SashaMIT:fix/w3mframe-require-secure-site-origin

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • Host-side W3mFrame frame-event handlers accepted any @w3m-frame/* message with no event.origin check.
  • Sibling social/connector helpers already require SECURE_SITE_ORIGIN.
  • Require SECURE_SITE_SDK_ORIGIN on registerFrameEventHandler / onFrameEvent, and target postAppEvent to that origin instead of *.

Test plan

  • Manual: email/social login via AppKit still completes
  • Manual: forged postMessage from a same-page iframe with @w3m-frame/GET_USER_SUCCESS is ignored

Made with Cursor

Host-side frame event handlers accepted any @w3m-frame/* message with
no event.origin check, so a same-page iframe could spoof login/RPC
responses. Require SECURE_SITE_SDK_ORIGIN and target postMessage to it.

Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
@changeset-bot

changeset-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4ce8058

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

@SashaMIT is attempting to deploy a commit to the Reown Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! We ask that you please read and sign our CTA Document before we can accept your contribution. You can sign the CTA simply by posting a Pull Request Comment with the following text:


I have read the CTA Document and I hereby sign the CTA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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