SA-CONTRIB-2026-348: CSRF
This module organizes media entities into a directory structure. It provides a media browser for selecting, uploading, and managing media. The module doesn't sufficiently protect several of its routes against cross-site request forgery (CSRF). An attacker could trick a user with the relevant permissions into performing actions without their knowledge.
Credit
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
Who could be affected by a CSRF attack against these routes?
Users who have the permissions needed to perform actions through the module's media browser are the relevant targets. An attacker would need to trick one of those users into making a request without their knowledge.
What actions are exposed?
The affected routes are used by the module's media browser, which supports selecting, uploading, and managing media. The provided information does not identify the specific routes or individual actions lacking CSRF protection.