Drupal core Remote Code Execution Vulnerability

drupal/core Updated 02 Oct 2025

Summary

15/05/2024
CRITICAL
Yes i
Critical
Not published

GHSA-6mgp-v5cm-ghg5: Drupal core Remote Code Execution. Affects drupal/core across 3 version ranges.

>= 7.0, < 7.60 >= 8.0.0, < 8.5.8 >= 8.6.0, < 8.6.2

Fixed in 7.60, 8.5.8 or 8.6.2, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Drupal core is a content management system (CMS) that allows users to create and manage websites. It provides a wide range of features and functionality for building and maintaining websites, including user authentication, content creation and editing, and website customization. However, a vulnerability has been discovered in Drupal core that could allow remote code execution.

Vulnerability Detail

The vulnerability in Drupal core exists in the DefaultMailSystem::mail() function, which is responsible for sending emails. This function does not properly sanitize certain variables used as shell arguments, which can be exploited by an attacker to execute arbitrary code on the server. This could lead to a complete compromise of the affected Drupal installation, allowing the attacker to gain unauthorized access, steal sensitive information, or perform other malicious actions.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 7.0, < 7.60 7.60
    composer require drupal/core:7.60
  • >= 8.0.0, < 8.5.8 8.5.8
    composer require drupal/core:8.5.8
  • >= 8.6.0, < 8.6.2 8.6.2
    composer require drupal/core:8.6.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If updating Drupal core is not immediately possible, a temporary workaround is to disable the use of the DefaultMailSystem class and switch to an alternative mail system implementation. This can be done by modifying the Drupal configuration to use a different mail system module, such as the SMTP module. Here is an example of how to configure Drupal to use the SMTP module:

  1. Install the SMTP module using Composer:
composer require drupal/smtp
  1. Enable the SMTP module:
drush en smtp
  1. Configure the SMTP module with the appropriate SMTP server settings in the Drupal administration interface.

By switching to an alternative mail system, the vulnerability in DefaultMailSystem::mail() can be mitigated until the Drupal core update can be applied.

Conclusion

The Drupal core Remote Code Execution vulnerability is a critical security issue that could allow an attacker to execute arbitrary code on a vulnerable Drupal installation. It is important to promptly update Drupal core to a version that includes the fix or apply the recommended workaround to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for drupal/core →

Share this vulnerability

FAQ

Drupal core is the foundational software that powers Drupal websites. It provides the basic functionality and features for creating and managing websites.

Remote code execution is a security vulnerability that allows an attacker to execute arbitrary code on a remote server. This can lead to unauthorized access, data theft, or other malicious activities.

You can use the Vulert Playground at Vulert Scanner to check if your Drupal installation is affected by this vulnerability. Simply upload your composer.lock file and Vulert will analyze it for any open-source vulnerabilities, including this one.

At the time of this advisory, there are no known public exploits for this vulnerability. However, it is important to apply the necessary updates to Drupal core as soon as possible to mitigate the risk.

You can find more information about this vulnerability, including the technical details and the fixed versions of Drupal core, in the advisory on the GitHub Advisory Database: [link to advisory]

Related vulnerabilities

Recent vulnerabilities recorded for drupal/core.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 7.0, < 7.60 7.60
    composer require drupal/core:7.60
  • >= 8.0.0, < 8.5.8 8.5.8
    composer require drupal/core:8.5.8
  • >= 8.6.0, < 8.6.2 8.6.2
    composer require drupal/core:8.6.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback