GHSA-7gwj-7fhm-vw4w: Drupal core unrestricted file upload
Drupal 8 core's filesaveupload() function does not strip the leading and trailing dot ('.') from filenames, like Drupal 7 did. Users with the ability to upload files with any extension in conjunction with contributed modules may be able to use this to upload system files such as .htaccess in order to bypass protections afforded by Drupal's default .htaccess file.
Published May 15, 2024
Affected packages
drupal/core
- Ecosystem
- Composer (PHP)
- Affected
- >= 8.0.0, < 8.7.11
- Fixed in
- 8.7.11
- Check
composer show drupal/core
drupal/core
- Ecosystem
- Composer (PHP)
- Affected
- >= 8.8.0, < 8.8.1
- Fixed in
- 8.8.1
- Check
composer show drupal/core
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Drupal 8 core's file_save_upload() function does not strip the leading and trailing dot ('.') from filenames, like Drupal 7 did.
Users with the ability to upload files with any extension in conjunction with contributed modules may be able to use this to upload system files such as .htaccess in order to bypass protections afforded by Drupal's default .htaccess file.
After this fix, file_save_upload() now trims leading and trailing dots from filenames.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-6365
Drupal core is Vulnerable to Cross-Site Scripting
medium6.1May 20, 2026CVE-2026-6366
Drupal core allows Object Injection
medium6.6May 20, 2026CVE-2026-6367
Drupal core allows Cross-Site Scripting (XSS)
medium6.1May 20, 2026CVE-2026-9082
Drupal Core has a SQL Injection issue
critical9.8ExploitedMay 20, 2026CVE-2025-13080
Drupal core allows Forceful Browsing
low2.7Nov 18, 2025CVE-2025-13081
Drupal core allows Object Injection
medium5.9Nov 18, 2025
