ADVISORIES

Drupal Security Advisory

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.

Affected packages

EcosystemPackageAffected versions
Packagist:https://packages.drupal.org/8drupal/block_attributes
All versions before 1.1.0 (fixed in 1.1.0)
From 2.0.0 before 2.0.1 (fixed in 2.0.1)

References