CVE-2026-142416: XSS
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 Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/drupal/file_downloadto a version that resolves this vulnerability.Fixed in 2.0.2
Event History
Frequently Asked Questions
Who can exploit this issue?
An attacker needs permission to upload files. They can supply a file or image with a malicious filename that is later rendered by the module's custom field formatter.
Who is at risk from a malicious upload?
Any user who views the affected field in a browser may trigger the stored XSS payload. This includes users who did not upload the file themselves.
Does the download-counting sub-module need to be enabled for this to matter?
The issue is described in the custom field formatter that renders file and image entities for download. The download-counting sub-module is described as optional, but the provided information does not indicate that it is required for exploitation.
How can I identify potentially affected content?
Review file and image entities uploaded by users with file-upload permissions, especially filenames containing markup or script-like content. Such filenames are relevant when they are displayed through the module's custom field formatter.