CVE-2026-142404: Composer/drupal/media_directories vulnerability
This module organizes media entities into a directory structure. It provides a media browser for selecting, uploading, and managing media.
The media browser API doesn't sufficiently check access to text formats. A user who can edit media can save text in a text format they aren't allowed to use, which can lead to cross-site scripting wherever that field is displayed.
This vulnerability is mitigated by the fact that an attacker must have a role with the Access Media Directories browser permission and permission to create or edit media. A media type must also have a formatted text field.
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
Which users could exploit this issue?
A user must have the Access Media Directories browser permission and permission to create or edit media. Users without those permissions are not described as able to exploit the issue.
What site configuration is required for the issue to be relevant?
At least one media type must include a formatted text field. The risk is realized where content from that field is displayed, because unauthorized text formats may allow cross-site scripting.