SAP / luigi

Micro frontend framework
https://luigi-project.io
Apache License 2.0
825 stars 170 forks source link

Microfrontends do not check origin of postMessage API events #41

Closed kwiatekus closed 5 years ago

kwiatekus commented 5 years ago

Description

A top level window (Console UI) is holding several nested iframes (microfrontends). Communication between components is built on top of postMessage API. In regards to postMessage API, communication is only possible between microfrontends and parent frame. Custom routing logic is implemented to provide further capabilities as required.

Risk

Message receivers, including parent frame, could accidentally process events received via postMessage API from untrusted origins. That compromises integrity. Message senders could accidentally post events to untrusted origins. This compromises confidentiality. Risk accepted on 03/Jul/18 by @gopikannappan

Suggested Mitigation

This should also take care of roundtrip messages - when a microfrontend asks to provide something from Luigi Core and Luigi Core answers, the answer should go back to the same iframe and should target the same domain.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.