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.
After this fix, filesaveupload() now trims leading and trailing dots from filenames.
{ "nvd_published_at": null, "cwe_ids": [ "CWE-434" ], "severity": "MODERATE", "github_reviewed": true, "github_reviewed_at": "2024-05-15T20:55:22Z" }