1. Insert a widget on the sidebar using the Text Block.

2. Get the widget ID by inspecting it using the browser developer tool.

3. Insert the following shortcode (change the ID accordingly):

[do_widget id="block-9" class='" onmouseover="alert(1)"']

4. Go to the page where the widget is inserted and hover it, the alert triggers.