The vulnerability exists because user-controlled input is rendered in multiple React components using dangerouslySetInnerHTML without proper sanitization. This allows a low-privilege authenticated user, with permissions to edit forms or integrations, to inject arbitrary HTML and JavaScript. The injected code is then stored and executed in the browser of an administrator viewing the form builder or integration pages.
The patch addresses this by introducing the dompurify library to sanitize all user-provided strings before they are passed to dangerouslySetInnerHTML. The analysis of the commit b9adad6cdf1eba5400aae8b1ae39bd7d4d33af5e clearly shows the addition of sanitize() calls across numerous components where this unsafe rendering occurs. The identified vulnerable functions are React components that were directly using dangerouslySetInnerHTML on props that could be controlled by a user, such as form field labels, integration icons, and WYSIWYG content. Another identified vulnerability pattern was the use of jQuery's .html() method, which was replaced by the safer .text() method.