CVE-2026-142397: XSS
This module enables you to test and debug outgoing emails and prevent mails from being send.
In certain cases the module does not sufficiently sanitize emails which can lead to a cross-site scripting (XSS) vulnerability.
This vulnerability is mitigated by the fact that in order for it to be exploitable, configuration option Send mail to dashboard must be enabled.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/drupal/mail_safetyto a version that resolves this vulnerability.Fixed in 2.1.1 - Upgrade
Upgrade
composer/drupal/mail_safetyto a version that resolves this vulnerability.Fixed in 2.2.1
Event History
Frequently Asked Questions
Who is exposed to this issue?
Deployments using composer/drupal/mail_safety are exposed only when the Send mail to dashboard configuration option is enabled.
What must be true for exploitation to be possible?
An attacker must be able to trigger one of the cases where the module insufficiently sanitizes email content, and Send mail to dashboard must be enabled.
What can be done if an update cannot be applied immediately?
Disable the Send mail to dashboard configuration option to mitigate the documented exploitation condition.
How can I determine whether my installation is affected?
Check whether composer/drupal/mail_safety is installed and whether its Send mail to dashboard option is enabled.