CVE-2026-142403: XSS
This module organizes media entities into a directory structure. It provides a media browser for selecting, uploading, and managing media.
The Media Directories UI submodule doesn't sufficiently escape directory names in its directory tree. A user who can create or rename directories can inject markup. This can lead to a cross-site scripting (XSS) attack that runs for other users who open the directory tree, including administrators.
This vulnerability is mitigated by the fact that an attacker must have a role with permission to create or edit terms in the directory vocabulary.
On the 3.0.x branch, only the deprecated Media Directories UI submodule is affected.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/drupal/media_directoriesto a version that resolves this vulnerability.Fixed in 3.0.1
Event History
Frequently Asked Questions
What level of access does an attacker need?
The attacker must have a role permitted to create or edit terms in the directory vocabulary, allowing them to create or rename a directory with injected markup.
Which users are at risk from a successful exploit?
Any user who opens the directory tree can be affected, including administrators. The injected markup executes in the context of users viewing that tree.
Are all 3.0.x installations affected?
On the 3.0.x branch, the issue affects only the deprecated Media Directories UI submodule. The provided information does not identify other affected branches or configurations.
What can be done while patching is unavailable?
Restrict the permission to create or edit terms in the directory vocabulary to trusted users, since that permission is required to introduce the malicious directory name.