SA-CONTRIB-2026-367: XSS
The Search and Replace Scanner module provides a way for content administrators to search for specific strings across all (enabled) content and, optionally, replace the strings with something else. The module doesn't sufficiently sanitize for cross-site scripting (XSS) in the return results. This vulnerability is mitigated by the fact that an attacker must have a role with the permission "Perform search only" with a content item that contains inappropriate HTML in the title.
Credit
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/drupal/scannerto a version that resolves this vulnerability.Fixed in 2.0.3
Event History
Frequently Asked Questions
Who can exploit this vulnerability?
An attacker must have a role with the "Perform search only" permission and must be able to use a content item whose title contains inappropriate HTML.
Are all users of the module exposed?
The issue is mitigated by the required permission and malicious HTML in a content title. Users without the "Perform search only" permission are not described as being able to trigger it.
Where does the XSS appear?
The insufficient sanitization occurs in the scanner's returned search results.