Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove wildcard from Postmessage #159

Open
HunnySajid opened this issue Apr 4, 2024 · 1 comment
Open

Remove wildcard from Postmessage #159

HunnySajid opened this issue Apr 4, 2024 · 1 comment

Comments

@HunnySajid
Copy link
Collaborator

Currently we are using wildcard '*' while communicating with postMessage. It is not correct as it broadcasts messages to all.
We need to fix it so that communication can only be between out content script and webpage.

Relevant links:
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#using_window.postmessage_in_extensions_non-standard

@HunnySajid
Copy link
Collaborator Author

Here I have broadcasted a postMessage with select-identifier from webpage. I setup another extension that listened to this and alerted.
As postMessage is using wildcard, the select-identifier messages was broadcasted to every window. It could be exploited.

Video: https://www.loom.com/share/755f78a875f340a4a818da3c602e1f73

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

No branches or pull requests

1 participant