SA-CONTRIB-2026-341: Critical severity composer/drupal/mail_safety vulnerability

Published Dec 2, 2026
·
Updated

This module enables you to test and debug outgoing emails, as well as prevent emails from being sent. In certain cases, the module doesn't securely pass data to PHP's unserialize() function, which could result in remote code execution (RCE) via PHP object injection. This vulnerability is mitigated by the fact that in order for it to be exploitable, a separate vulnerability must be present to allow an attacker to store malicious data.

Credit

Brian Willows (hsjbrianwillows)

Affected Software

1 affected componentFixes available
composer/drupal/mail_safety<2.2.1, <2.1.1
2.2.12.1.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/drupal/mail_safety to a version that resolves this vulnerability.

    Fixed in 2.2.1Fixed in 2.1.1

Event History

Dec 2, 2026
Advisory Published
via Drupal·12:00 AM
Data Sourced
via Drupal·12:00 AM
DescriptionSeverityAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

What additional condition is required for exploitation?

An attacker must be able to use a separate vulnerability to store malicious data. The unsafe handling of that stored data can then lead to PHP object injection and remote code execution.

2

Who is most exposed to this issue?

Deployments using composer/drupal/mail_safety are exposed when another vulnerability allows an attacker to persist malicious data that reaches the affected unserialize() handling.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203