Description
The File Download module provides a custom field formatter that allows users to download file and image entities directly. It also provides an optional sub-module to count and display file downloads in Views (similar to how the core statistics module tracks content views).
The module does not properly sanitize filenames, allowing stored cross-site scripting (XSS) attacks. An attacker with file upload permissions could upload a file with a malicious filename, which would then execute in the browser of any user viewing the field.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | drupal/file_download | < 2.0.2 | 2.0.2 | DRUPAL-CONTRIB-2026-362 |