Formbricks versions before 5.4.4 and 6 before 6.0.1 contain a stored cross-site scripting (XSS) vulnerability. This occurs because the Custom Head Scripts feature at the survey level does not enforce the intended Manage permission boundary, allowing users with readWrite permission to configure scripts. These scripts execute in the authenticated browser session of any user who opens the affected survey, enabling lower-privileged users to run arbitrary JavaScript in higher-privileged users' sessions. The issue is fixed by requiring Manage access to modify survey Custom Head Scripts.