S3 File System CORS Upload
The module does not properly check who is allowed to manage uploaded files. Anyone could delete files they should not have access to. They might uncover hidden details or alter content.
- Who could do thisAnyone visiting the site. No login needed.
- Does it apply to youAny site using this module.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this critical. Cyber Essentials expects a fix within 14 days. Do it this week.
Tell your developerUpdate S3 File System CORS Upload to 8.x-1.3.
For developers: what the fix changed
The fix introduces an `UploadToken` service to sign upload directories and reserve file keys for the current user. It validates these tokens in `AjaxController::getKey()` and `AjaxController::saveFile()` and adds download access checks in `S3fsCorsFile::valueCallback()` to prevent users from overwriting or accessing files they do not own.
Also in this release Added filename validation for disallowed characters, fixed raw HTML in error messages, added human-readable file size units, fixed file input visibility after failed uploads, and fixed duplicated protocol in custom S3FS hostname.
.cspell-project-words.txt+1 −1config/schema/s3fs_cors.schema.yml+7 −0s3fs_cors.info.yml+1 −0s3fs_cors.js+130 −80 fixs3fs_cors.module+30 −0s3fs_cors.services.yml+4 −0 fixsrc/Controller/AjaxController.php+71 −32 fixsrc/Element/S3fsCorsFile.php+42 −6 fixsrc/Plugin/Field/FieldWidget/S3fsCorsFileWidget.php+22 −0src/Plugin/Field/FieldWidget/S3fsCorsImageWidget.php+22 −0src/UploadToken.php+79 −0 fix