Remediation Steps
Follow the steps below to remediate this finding on Drupal.
Audit custom module JavaScript files for unsafe DOM writes.
Use Drupal.behaviors to attach JS safely.
Pass server-side data to JavaScript via drupalSettings (set in PHP with #attached['drupalSettings']) rather than embedding raw data in HTML.
Sanitise client-side HTML rendering with DOMPurify.