CVE-2026-54177: Malicious File Upload
Summary
HasUploadFields (used via CrudTrait on Backpack-managed models) and the withFiles() uploader preserve the client-supplied file extension without validation. On installations using a public disk with php artisan storage:link, this allows an authenticated administrator to upload a file with a server-executable extension that the web server will pass to the PHP interpreter - if no MIME or other type of upload validation is present.
Details
The uploadFileToDisk and uploadMultipleFilesToDisk methods hash the filename stem but write the client-supplied extension to disk verbatim — no allowlist, blocklist, or MIME check is applied inside the trait itself.
The newer withFiles() path (via FileNameGenerator) resolves the extension from the file's MIME type rather than the client filename, but also does not block server-executable types.
Applications that follow the Backpack quickstart without adding explicit mimes: or mimetypes: validation rules in their form requests are affected.
Impact
An authenticated administrator with access to an upload-enabled CRUD panel, on a site using the public disk with web-accessible storage and no MIME type validation, can upload a server-executable file and achieve remote code execution.
Conditions required for exploitation:
- Authenticated admin access to a Backpack CRUD panel - An upload field with no mimes: / mimetypes: validation rule - The public disk in use (standard pattern for web-visible uploads) - php artisan storage:link in place - A web server + PHP-FPM stack (default on most hosts)
Fix
A denylist for server-executable extensions has been added to both HasUploadFields and FileNameGenerator. Image-typed fields now additionally enforce an allowlist. This is defence-in-depth — it does not replace application-level validation.
Recommended developer action
Review all upload fields and add explicit mimes: or mimetypes: validation in your form requests or field definitions. Refer to the Backpack field documentation for examples.
---
Reported by Vishal Shukla (@shukla304) via sechub.dev.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/backpack/crudto a version that resolves this vulnerability.Fixed in 7.0.38 - Upgrade
Upgrade
composer/backpack/crudto a version that resolves this vulnerability.Fixed in 6.8.14 - Configuration
Review every upload-enabled CRUD panel field and add explicit `mimes:` or `mimetypes:` validation rules in the relevant form request or field definition; this prevents upload of server-executable extensions.
Backpack CRUD (HasUploadFields) mimes: / mimetypes: validation rules on upload fields = explicit allowlist of allowed MIME types/extensions (add mimes: or mimetypes: rules in form requests or field definitions) - Compensating control
Use defence-in-depth: do application-level validation for uploaded files (add explicit `mimes:`/`mimetypes:` rules); do not rely on Backpack’s uploader behavior alone.
Event History
Frequently Asked Questions
Which deployments are exposed to practical code execution risk?
Exposure requires an upload-enabled Backpack CRUD panel, an authenticated administrator able to upload files, use of the public disk with web-accessible storage such as php artisan storage:link, and no MIME or other file-type validation in the form request.
Does restricting access to administrators prevent exploitation?
No. The described attacker is an authenticated administrator with access to an upload-enabled CRUD panel. Exploitation does not require user interaction, but it does require the administrator-level upload capability.
What should be reviewed if patching cannot happen immediately?
Review upload form requests for explicit mimes: or mimetypes: validation rules, and ensure server-executable file types cannot be uploaded. Also review whether uploaded files are written to a web-accessible public disk.
How can we determine whether existing uploads may be dangerous?
Inspect files stored through HasUploadFields, CrudTrait, or withFiles() on the public disk for server-executable extensions, particularly where storage is web-accessible. The affected upload paths do not themselves enforce a type allowlist or blocklist.
What version should be evaluated for the vendor update?
The provided references include the Backpack CRUD 6.8.14 release and pull request 5993. Review that release and the advisory to determine the applicable update for your deployment.