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.
Are you affected?
Enter the version of the package you're using.
Affected packages
0Fixed in: 1.10.0Upgrade drupal/gtm to 1.10.0 or newer (ecosystem packagist:https://packages.drupal.org/8).