ADVISORIES

Drupal Security Advisory

DRUPAL-CONTRIB-2025-094

Details

This module enables you to integrate Google Tag Manager (GTM) into your Drupal site by allowing administrators to configure and embed GTM container snippets.

The module doesn't sufficiently sanitize the GTM container ID under the scenario where a user with the *Administer gtm* permission enters malicious input into the *GTM-ID* field. This value is directly inserted into a <script> tag, making the site vulnerable to Cross-site Scripting (XSS) attacks.

This vulnerability is mitigated by the fact that an attacker must have a role with the permission *Administer gtm*, and the input field is limited to 20 characters.

Affected packages

EcosystemPackageAffected versions
Packagist:https://packages.drupal.org/8drupal/gtm
All versions before 1.10.0 (fixed in 1.10.0)

References