CVE-2025-31682 Google Tag - Moderately critical - Cross Site Scripting - SA-CONTRIB-2025-011

Medium 4.8 Published Updated

An attacker can inject malicious scripts into pages via the Google Tag module, potentially compromising user sessions or site integrity.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-31682?

CVE-2025-31682 is a medium-severity cross-site scripting vulnerability in Drupal Google Tag, published on 31 Mar 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

Official description

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Drupal Google Tag allows Cross-Site Scripting (XSS).This issue affects Google Tag: from 0.0.0 before 1.8.0, from 2.0.0 before 2.0.8.

Weakness: CWE-79

Which versions are affected by CVE-2025-31682?

4 open source packages ship an affected version, including drupal/google_tag. It affects 1 product.

PackageAffectedFixed in
drupal/google_tag PackagistAll versions1.8.0
drupal/google_tag PackagistAll versions1.8.0
drupal/google_tag PackagistFrom 2.0.02.0.8
drupal/google_tag PackagistFrom 2.0.02.0.8
Linux distribution packages (1)
drupal/google_tag Packagist:https://packages.drupal.org/8All versions1.8.0, 2.0.8

Products include Google Tag Project Google Tag.

How do I fix CVE-2025-31682?

Upgrade drupal/google_tag to a fixed version for your release line: 1.8.0 or 2.0.8.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-31682 being exploited?

There is no known exploitation of CVE-2025-31682 in the wild and no public exploit code.

Sources

Also known as DRUPAL-CONTRIB-2025-011, GHSA-36vv-q5jv-94cj.

Is CVE-2025-31682 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free