what are the security risks that we might face if we deploy the react-script-editor web part

Steel Contributor
I am working on a new SharePoint online tenant, and one of the requirements is to have a modern web part that is similar to the popular on-premises/classic Script Editor web part.

so i found this SPfx web part @ https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor, which mimic the on-premises/classic Script Editor web part.

but i have these questions about this web part:-

  1. Is it unsafe to have this web part inside the online SharePoint sites? In our case some sites have all users are contributors, so all users can create modern pages and hence add this react-script-editor web part to the modern pages they create.

  2. If the answer to question-1 is Yes (using this web part is unsafe), then what can users do with this web part? or what are the risks we will be exposed to? For example can a user write a script inside this web part which get the users' passwords and save them to external system ??

  3. If it is unsafe to use the react-script-editor web part out of the box, then are there any steps we can take to minimize the risks that this web part can cause?


0 Replies