The Media Directories module for Drupal organizes media entities into a directory structure and includes a media browser. The Media Directories UI submodule in the 3.0.x branch does not properly escape directory names in its directory tree, allowing users with permission to create or rename directories to inject markup. This vulnerability can lead to a cross-site scripting (XSS) attack affecting other users who view the directory tree, including administrators. The issue is fixed in version 3.0.1.