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

Security issure with HTML5: Overly Permissive Message Posting Policy (PostMessage Broadcast Vulnerability) in vuelayers #260

Closed
jerry1108 opened this issue Dec 1, 2019 · 4 comments · Fixed by CodeForBaltimore/codeforbaltimore.org#20
Assignees

Comments

@jerry1108
Copy link

jerry1108 commented Dec 1, 2019

dear @ghettovoice :
I have developed GIS Web application by using vuelayers (@Version 0.11.5-beta.3) and recently the application has been scanned by third party security-testing tools in our customer production environment. One of security vulnerabilities is HTML5: Overly Permissive Message Posting Policy (PostMessage Broadcast Vulnerability) that is found in row 57995 in vuelayes.js:
_global.postMessage(id + '', '*');

The suggestion of the report is avoiding to use * as postMessage's parameter (targetOrigin).
Can I modify * to something else? ex: our application domain name? or...?
How do I fix this vulnerability?
Hope you can give me a hint or suggestion. Thank you.

@become-iron
Copy link
Contributor

become-iron commented Dec 3, 2019

This problem could relate to core-js@2 which is being used by vuelayers: https://github.com/zloirock/core-js/blob/v2/modules/_task.js#L59-L65. And it seems that core-js@3 makes thing in other way: https://github.com/zloirock/core-js/blob/v3/packages/core-js/internals/task.js#L77-L81. So building of vuelayers with core-js@3 may help you, I think?

@ghettovoice ghettovoice self-assigned this Dec 4, 2019
@ghettovoice
Copy link
Owner

Hello @jerry1108 ,
I guess you are using UMD version of the lib, so as temporary workaround you can replace '*' with some domain. With the next release I think I can switch vuelayers to use @babel/runtime-corejs3,so the issue should gone.

Or before the release, as @become-iron suggested, fork and build with @babel/runtime-corejs3 yourself.

Thanks for report!

@jerry1108
Copy link
Author

@become-iron , @ghettovoice :
thank you very much.

ghettovoice added a commit that referenced this issue Jan 10, 2020
@ghettovoice
Copy link
Owner

Done in v0.11.21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants