DRUPAL-CONTRIB-2025-090
Details
This module allows you to define custom attributes for a block. You can specify an attribute name to be added to the block in a predefined format.
The module does not sufficiently validate the provided attributes, which makes it possible to insert JavaScript event attributes such as `onmouseover`, `onkeyup`, etc. These attributes can execute JavaScript code when the page is rendered, leading to cross-site scripting (XSS) vulnerabilities.
This vulnerability is partially mitigated by the requirement to manually add the specific attributes and corresponding JavaScript code to the form after the attribute has been created.
Are you affected?
Enter the version of the package you're using.
Affected packages
0Fixed in: 1.1.0Upgrade drupal/block_attributes to 1.1.0 or newer (ecosystem packagist:https://packages.drupal.org/8).