Webform - Moderately critical - Access bypass - SA-CONTRIB-2021-004

Project: WebformDate: 2021-March-03Security risk: Moderately critical 12∕25 AC:Basic/A:None/CI:None/II:None/E:Exploit/TD:DefaultVulnerability: Access bypassDescription: The Webform module for Drupal 8/9 includes a default Contact webform, which sends a notification email to the site owner and a confirmation email to the email address supplied via the form.
The confirmation email can be used as an open mail relay to send an email to any email address.
This vulnerability is mitigated by the fact that the site owner's email address is also receiving a notification email, which should alert the site owner to the exploitation. If the site owner's mailbox is not monitored, the open mail relay can be more easily exploited.
With the Webform module's latest release, the default Contact's confirmation email will only be sent to an authenticated user's email address. Anonymous users will no longer receive a confirmation email.
If anonymous users need to receive a confirmation email, we recommend you add SPAM protection to the form and update the email handler.Solution: Install the latest version:

If you are using a previous release of the Webform module you can immediately do one of several options.

  1. Delete the default Contact form. (/form/contact)
  2. Delete the default Contact form's confirmation email handler.(/admin/structure/webform/manage/contact/handlers)
  3. Update the default Contact form's confirmation email to only email the current user's email address using the [current-user:mail] token. (/admin/structure/webform/manage/contact/handlers/email_confirmation/edit)
  4. Add SPAM protection to the default Contact form.

Reported By: 

Fixed By: 

Coordinated By: 

Path to article https://www.drupal.org/sa-contrib-2021-004