Drupal security updates, in plain English · Module

Media Directories

6,455 sites report using it · on drupal.org · 1 security update explained here

This module organises files and images into folders to make them easier to find and manage.

Below is every security update for Media Directories that this site has covered, newest first. Each one says who could exploit it, whether it applies to your site, how urgent it is, and what to tell your developer. If your site uses this module and you are not sure which version, that is the first question to ask whoever looks after it.

Media Directories

Moderately critical · 6,455 sites report using it · 4 security fixes · Week of 2 December 2026

4 security fixes in one update. Media Directories fixed 4 separate security bugs at once: 2 cross site scripting, 1 access bypass, 1 cross site request forgery. One update covers all of them. The most serious, SA-CONTRIB-2026-351, is explained here and the full list is at the end of the card.

A person who can create or edit files could make their files link to private content they do not have the right to see. This would let them view hidden files belonging to other content on the site and potentially alter some data.

  • Who could do thisOnly someone with a login on your site.
  • Does it apply to youA site is affected if a person has the access right to use the folder browser and the access right to create or edit files.
  • Has it been used in attacksNo sign of it.
  • How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.

Tell your developerUpdate Media Directories to 3.0.1.

For developers: what the fix changed

This release carries 4 security fixes. The summary below is for SA-CONTRIB-2026-351, the most serious of them.

The fix introduces MediaValidationTrait and TextFormatAccessTrait to validate media entities and restrict writable properties in MediaService and MediaTranslationService. It also updates ApiController to handle validation exceptions.

Also in this release The release also adds CSRF token requirements to action routes and fixes a potential XSS issue by rendering directory names as text.

3.0.0 to 3.0.1 4 commits, 16 files including 4 tests.

  • modules/media_directories_ai/media_directories_ai.routing.yml +3 −0
  • modules/media_directories_browser/media_directories_browser.routing.yml +12 −0
  • modules/media_directories_browser/src/Controller/ApiController.php +10 −0 fix
  • modules/media_directories_browser/src/Service/MediaService.php +67 −23 fix
  • modules/media_directories_browser/src/Service/MediaTranslationService.php +32 −12 fix
  • modules/media_directories_browser/src/Service/MediaValidationTrait.php +112 −0 fix
  • modules/media_directories_browser/src/Service/TextFormatAccessTrait.php +76 −0 fix
  • modules/media_directories_ui/js/media_directories_ui.browser.js +50 −0
  • modules/media_directories_ui/js/media_directories_ui.tree.js +41 −24
  • modules/media_directories_ui/media_directories_ui.libraries.yml +1 −0
  • modules/media_directories_ui/media_directories_ui.routing.yml +8 −0
  • modules/media_directories_ui/src/Plugin/EntityBrowser/Widget/DirectoryBrowser.php +5 −1

Full diff, 3.0.0 to 3.0.1

The comparison is against the release immediately before the fix. If your site is on an older release, more will have changed.

All 4 security bugs this update fixes, worst first. Each link is the drupal.org notice for that one.

Not sure what your site is running?

Send me your Drupal site's address.

I'll tell you what I can see from outside, what the Drupal 10 end of life on 9 December means for it, and what it would cost to have me keep it patched. There's no charge for that and no obligation. peter@peterbrady.co.uk


Get in touch

Tell me who you are, what your organisation does, and what you need. That might be a Drupal site that needs looking after, an upgrade to get done before December, or an agency that needs Drupal cover.

If I can help, I'll say so and suggest a call. If I can't, I'll tell you straight away rather than waste your time.

peter@peterbrady.co.uk

For context: I work mainly with UK membership bodies, charities and research organisations, and with the agencies that look after their websites. Not recruiters.

Or start smaller and connect with me on LinkedIn. That's where I post what I find digging around in charity and grants data, and where the free tools turn up first.