CVE-2025-31682: Drupal Google Tag Cross-Site Scripting (XSS) Vulnerability

drupal/google_tag Updated 02 Oct 2025

Summary

01/04/2025
Yes i
Moderate
4.8

CVE-2025-31682: Drupal Google Tag Cross-Site Scripting (XSS) vulnerability. Affects drupal/google_tag across 2 version ranges.

< 1.8.0 >= 2.0.0, < 2.0.8

Fixed in 1.8.0 or 2.0.8, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2025-31682 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Drupal Google Tag is a module that integrates Google Tag Manager into Drupal websites, allowing users to manage JavaScript and HTML tags used for tracking and analytics. This module is widely used due to its flexibility and ease of integration with various tracking services. However, it has been found to be vulnerable to a Cross-Site Scripting (XSS) attack, which can compromise the security of websites using this module.

Vulnerability Detail

The vulnerability arises from improper neutralization of user input during web page generation, specifically in the Drupal Google Tag module. This flaw allows attackers to inject malicious scripts into web pages viewed by other users. If successfully exploited, this could lead to unauthorized actions being performed on behalf of users, data theft, or redirection to malicious sites. The affected versions are from 0.0.0 before 1.8.0 and from 2.0.0 before 2.0.8.

How To Fix

Fixed versions by release line

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

  • < 1.8.0 1.8.0
    composer require drupal/google_tag:1.8.0
  • >= 2.0.0, < 2.0.8 2.0.8
    composer require drupal/google_tag:2.0.8

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

Workaround

If you are unable to update immediately, consider disabling the Drupal Google Tag module until a patch can be applied. This will prevent the exploitation of the XSS vulnerability until you can ensure your site is secure.

Conclusion

The Drupal Google Tag module has a critical XSS vulnerability that affects multiple versions. It is essential to update to the latest patched versions to protect your site from potential attacks. If immediate updates are not feasible, consider disabling the module as a temporary workaround.

See every vulnerability recorded for drupal/google_tag →

Share this vulnerability

FAQ

XSS is a security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users, potentially compromising user data and site integrity.

You can check if your application is affected by this vulnerability using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to use the Vulert playground without signup.

Failing to address this vulnerability can lead to data breaches, unauthorized actions on behalf of users, and damage to your site's reputation.

Yes, you can disable the Drupal Google Tag module as a temporary measure to mitigate the risk until you can apply the necessary updates.

Detailed information about this vulnerability can be found in the official advisory on GitHub or through security-focused platforms that track open-source vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for drupal/google_tag.

How To Fix

Fixed versions by release line

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

  • < 1.8.0 1.8.0
    composer require drupal/google_tag:1.8.0
  • >= 2.0.0, < 2.0.8 2.0.8
    composer require drupal/google_tag:2.0.8

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