CVE-2026-142405: 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 validate the values it saves on media items. A user who can create or edit media can make their media reference files and other content they don't have access to. This lets them access files they shouldn't be able to view, including private files that belong to other content on the site.
This vulnerability is mitigated by the fact that an attacker must have a role with the Access Media Directories browser permission, as well as permission to create or edit media.
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 can exploit this issue?
An attacker needs the Access Media Directories browser permission and permission to create or edit media. Users without both of these capabilities are not described as able to exploit the issue.
What information could be exposed?
A permitted media creator or editor can cause media to reference files or other content they would not normally be allowed to access. This can expose private files belonging to other site content.
How can administrators determine whether their site has exposed users?
Review which roles have the Access Media Directories browser permission, then identify users in those roles who can also create or edit media. Those users meet the stated permission prerequisites for exploitation.