Drupal Anonymous Open Redirect in drupal/drupal

drupal/drupal Updated 02 Oct 2025

Summary

15/05/2024
MODERATE
Yes i
Moderate
5.8

GHSA-x6v2-xmrq-574j: Drupal Anonymous Open Redirect. Affects drupal/drupal across 2 version ranges.

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

Fixed in 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Drupal is a popular open-source content management system (CMS) written in PHP. It is widely used for building websites and web applications. The drupal/drupal package is the core package of Drupal that provides the fundamental functionality and features of the CMS. This vulnerability affects versions 8.0.0 to 8.5.8 and versions 8.6.0 to 8.6.2 of the drupal/drupal package. The vulnerability allows malicious users to construct URLs with a manipulated 'destination' query string parameter, leading to potential social engineering attacks.

Vulnerability Detail

The Drupal Anonymous Open Redirect vulnerability arises from the usage of the 'destination' query string parameter in URLs by Drupal core and contributed modules. This parameter is commonly used to redirect users to a new destination after completing an action on the current page. However, under certain circumstances, attackers can exploit this parameter to craft URLs that trick users into being redirected to a third-party website. This exposes users to potential social engineering attacks, where they may be deceived into divulging sensitive information or performing unintended actions.

How To Fix

Fixed versions by release line

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

  • >= 8.0.0, < 8.5.8 8.5.8
    composer require drupal/drupal:8.5.8
  • >= 8.6.0, < 8.6.2 8.6.2
    composer require drupal/drupal: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

As a temporary workaround, developers can manually validate and sanitize the 'destination' query string parameter in their code. This can be done by checking the URL against a whitelist of allowed destinations or by using a regular expression to ensure the URL follows the expected format. Here is an example of how to sanitize the 'destination' parameter in PHP:

$destination = $_GET['destination'];

if (preg_match('/^/[a-zA-Z0-9/]+$/', $destination)) {
    // Valid destination, proceed with redirection
    header('Location: ' . $destination);
    exit;
} else {
    // Invalid destination, handle error
    echo 'Invalid destination';
}

Conclusion

The Drupal Anonymous Open Redirect vulnerability in the drupal/drupal package allows attackers to manipulate the 'destination' query string parameter and redirect users to malicious websites. Upgrading to the latest version of the package is recommended to fix the vulnerability. In the meantime, developers can implement a temporary workaround by manually validating and sanitizing the 'destination' parameter in their code. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for drupal/drupal →

Share this vulnerability

FAQ

Drupal is an open-source content management system (CMS) written in PHP. It is used for building websites and web applications.

The drupal/drupal package is the core package of Drupal that provides the fundamental functionality and features of the CMS.

The 'destination' query string parameter is used in Drupal URLs to redirect users to a new destination after completing an action on the current page.

Attackers can exploit this vulnerability by manipulating the 'destination' query string parameter in URLs to trick users into being redirected to a third-party website.

The vulnerability exposes users to potential social engineering attacks, where they may be deceived into divulging sensitive information or performing unintended actions.

Related vulnerabilities

Recent vulnerabilities recorded for drupal/drupal.

How To Fix

Fixed versions by release line

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

  • >= 8.0.0, < 8.5.8 8.5.8
    composer require drupal/drupal:8.5.8
  • >= 8.6.0, < 8.6.2 8.6.2
    composer require drupal/drupal: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