Remediation Steps
Follow the steps below to remediate this finding on WordPress.
Audit custom JavaScript files in your theme and plugins for unsafe DOM writes.
Use wp_localize_script() to safely pass server-side data to scripts instead of embedding raw data in HTML.
Escape values with JavaScript's encodeURIComponent() before placing them in URLs.
Use DOMPurify for any client-side HTML rendering.