{"id":"GHSA-8xjm-wqrp-2f25","summary":"Laravel Backpack CRUD: Arbitrary file deletion via attacker-controlled clear_\u003cattr\u003e[] in HasUploadFields::uploadMultipleFilesToDisk","details":"## Summary\n\n`HasUploadFields::uploadMultipleFilesToDisk` (in `src/app/Models/Traits/HasUploadFields.php`) reads file paths from the `clear_\u003cattribute\u003e[]` request input and deletes them from the configured storage disk **without verifying that the paths belong to the current model record**.\n\nAn authenticated user with Update access on any CRUD that wires `uploadMultipleFilesToDisk` as a model mutator (the pattern documented in the v5.x `upload_multiple` field guide) can supply arbitrary disk-relative paths in `clear_\u003cattr\u003e[]` to delete files that were never associated with the record they are editing.\n\nThe safe pattern already exists in the codebase: `src/app/Library/Uploaders/MultipleFiles.php` intersects the requested deletions against the files currently stored in the database column before calling `Storage::disk()-\u003edelete()`. The trait method lacks that intersection.\n\n## Affected code\n\n- `src/app/Models/Traits/HasUploadFields.php` — `uploadMultipleFilesToDisk` (primary sink)\n- `src/app/Models/Traits/CrudTrait.php` — mixes `HasUploadFields` into all Backpack-managed models\n\nThe vulnerability is present in all 5.x, 6.x \u003c 6.8.12, and 7.x \u003c 7.0.35 releases.\n\n## Impact\n\nAn attacker with low-privilege Backpack admin access (e.g. a content editor) can delete any file under the configured disk root: other records' attachments, shared assets, or files placed on the same disk for operational purposes. No confidentiality impact (files cannot be read, only deleted).\n\n**CWE-285** (Authorization Bypass) / **CWE-639** (IDOR on file deletion)  \nCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H = **8.1 High**\n\n## Fix\n\nIntersect `$files_to_clear` against the filenames currently persisted on the model before calling `delete()`, mirroring the logic already present in `MultipleFiles::uploadFiles`. Fixed in **6.8.12** and **7.0.35**.\n\nDeployments still using the `uploadMultipleFilesToDisk` mutator pattern from the v5.x docs should migrate to the Uploader API (`MultipleFiles::class` via `config/backpack/crud.php`), which applies the safe intersection automatically.\n\n## Credits\n\nReported by Vishal Shukla ([@shukla304](https://github.com/shukla304)).","aliases":["CVE-2026-54178"],"modified":"2026-09-15T06:34:50.849352077Z","published":"2026-08-20T18:38:39Z","database_specific":{"github_reviewed_at":"2026-08-20T18:38:39Z","nvd_published_at":null,"cwe_ids":["CWE-22","CWE-285","CWE-639"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/Laravel-Backpack/CRUD/security/advisories/GHSA-8xjm-wqrp-2f25"},{"type":"PACKAGE","url":"https://github.com/Laravel-Backpack/CRUD"},{"type":"WEB","url":"https://github.com/Laravel-Backpack/CRUD/releases/tag/6.8.12"},{"type":"WEB","url":"https://github.com/Laravel-Backpack/CRUD/releases/tag/7.0.35"}],"affected":[{"package":{"name":"backpack/crud","ecosystem":"Packagist","purl":"pkg:composer/backpack/crud"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.0"}]}],"versions":["5.0.0","5.0.1","5.0.10","5.0.11","5.0.12","5.0.13","5.0.14","5.0.15","5.0.16","5.0.17","5.0.18","5.0.19","5.0.2","5.0.20","5.0.21","5.0.3","5.0.4","5.0.5","5.0.6","5.0.7","5.0.8","5.0.9","5.1.0","5.1.1","5.1.2","5.1.3","5.1.4","5.2.0","5.2.1","5.2.2","5.3.0","5.3.1","5.3.10","5.3.11","5.3.12","5.3.13","5.3.2","5.3.3","5.3.4","5.3.5","5.3.6","5.3.7","5.3.8","5.3.9","5.4.0","5.4.1","5.4.10","5.4.11","5.4.12","5.4.13","5.4.14","5.4.15","5.4.16","5.4.2","5.4.3","5.4.4","5.4.5","5.4.6","5.4.7","5.4.8","5.4.9","5.5.0","5.5.1","5.5.2","5.5.3","5.5.4","5.5.5","5.5.6","5.5.7","5.5.8","5.6.0","5.6.1","5.6.2","6.0.0","6.0.1","6.0.2","6.0.3","6.0.4","6.0.5","6.0.6","6.0.7","6.1.0","6.1.1","6.1.10","6.1.11","6.1.12","6.1.13","6.1.14","6.1.15","6.1.16","6.1.2","6.1.3","6.1.4","6.1.5","6.1.6","6.1.7","6.1.8","6.1.9","6.2.0","6.2.1","6.2.2","6.2.3","6.2.4","6.3.0","6.3.1","6.3.2","6.4.0","6.4.1","6.4.2","6.5.0","6.5.1","6.5.2","6.5.3","6.5.4","6.5.5","6.6.0","6.6.1","6.6.2","6.6.3","6.6.4","6.6.5","6.6.6","6.7.0","6.7.1","6.7.10","6.7.11","6.7.12","6.7.13","6.7.14","6.7.15","6.7.16","6.7.17","6.7.18","6.7.19","6.7.2","6.7.20","6.7.21","6.7.22","6.7.23","6.7.24","6.7.25","6.7.26","6.7.27","6.7.28","6.7.29","6.7.3","6.7.30","6.7.31","6.7.32","6.7.33","6.7.34","6.7.35","6.7.36","6.7.37","6.7.38","6.7.39","6.7.4","6.7.40","6.7.41","6.7.42","6.7.43","6.7.44","6.7.45","6.7.46","6.7.47","6.7.48","6.7.49","6.7.5","6.7.50","6.7.51","6.7.52","6.7.53","6.7.54","6.7.55","6.7.56","6.7.6","6.7.7","6.7.8","6.7.9","6.8.0","6.8.1","6.8.10","6.8.11","6.8.12","6.8.13","6.8.14","6.8.15","6.8.16","6.8.2","6.8.3","6.8.4","6.8.5","6.8.6","6.8.7","6.8.8","6.8.9","7.0.0","7.0.0-alpha.1","7.0.0-alpha.2","7.0.0-alpha.3","7.0.0-alpha.4","7.0.0-alpha.5","7.0.0-alpha.6","7.0.0-alpha.7","7.0.0-alpha.8","7.0.0-alpha.9","7.0.0-beta.1","7.0.0-beta.10","7.0.0-beta.11","7.0.0-beta.12","7.0.0-beta.13","7.0.0-beta.14","7.0.0-beta.15","7.0.0-beta.16","7.0.0-beta.17","7.0.0-beta.18","7.0.0-beta.2","7.0.0-beta.3","7.0.0-beta.4","7.0.0-beta.5","7.0.0-beta.6","7.0.0-beta.7","7.0.0-beta.8","7.0.0-beta.9","7.0.1","7.0.10","7.0.11","7.0.12","7.0.13","7.0.14","7.0.15","7.0.16","7.0.17","7.0.18","7.0.19","7.0.2","7.0.20","7.0.21","7.0.22","7.0.23","7.0.24","7.0.25","7.0.26","7.0.27","7.0.28","7.0.29","7.0.3","7.0.30","7.0.31","7.0.32","7.0.33","7.0.34","7.0.35","7.0.36","7.0.37","7.0.38","7.0.39","7.0.4","7.0.40","7.0.41","7.0.42","7.0.43","7.0.44","7.0.45","7.0.46","7.0.47","7.0.48","7.0.49","7.0.5","7.0.50","7.0.6","7.0.7","7.0.8","7.0.9","7.1.0","7.1.1","7.1.10","7.1.11","7.1.12","7.1.13","7.1.14","7.1.15","7.1.16","7.1.2","7.1.3","7.1.4","7.1.5","7.1.6","7.1.7","7.1.8","7.1.9"],"database_specific":{"last_known_affected_version_range":"\u003c 6.0.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-8xjm-wqrp-2f25/GHSA-8xjm-wqrp-2f25.json"}},{"package":{"name":"backpack/crud","ecosystem":"Packagist","purl":"pkg:composer/backpack/crud"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.8.12"}]}],"versions":["6.0.0","6.0.1","6.0.2","6.0.3","6.0.4","6.0.5","6.0.6","6.0.7","6.1.0","6.1.1","6.1.10","6.1.11","6.1.12","6.1.13","6.1.14","6.1.15","6.1.16","6.1.2","6.1.3","6.1.4","6.1.5","6.1.6","6.1.7","6.1.8","6.1.9","6.2.0","6.2.1","6.2.2","6.2.3","6.2.4","6.3.0","6.3.1","6.3.2","6.4.0","6.4.1","6.4.2","6.5.0","6.5.1","6.5.2","6.5.3","6.5.4","6.5.5","6.6.0","6.6.1","6.6.2","6.6.3","6.6.4","6.6.5","6.6.6","6.7.0","6.7.1","6.7.10","6.7.11","6.7.12","6.7.13","6.7.14","6.7.15","6.7.16","6.7.17","6.7.18","6.7.19","6.7.2","6.7.20","6.7.21","6.7.22","6.7.23","6.7.24","6.7.25","6.7.26","6.7.27","6.7.28","6.7.29","6.7.3","6.7.30","6.7.31","6.7.32","6.7.33","6.7.34","6.7.35","6.7.36","6.7.37","6.7.38","6.7.39","6.7.4","6.7.40","6.7.41","6.7.42","6.7.43","6.7.44","6.7.45","6.7.46","6.7.47","6.7.48","6.7.49","6.7.5","6.7.50","6.7.51","6.7.52","6.7.53","6.7.54","6.7.55","6.7.56","6.7.6","6.7.7","6.7.8","6.7.9","6.8.0","6.8.1","6.8.10","6.8.11","6.8.2","6.8.3","6.8.4","6.8.5","6.8.6","6.8.7","6.8.8","6.8.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-8xjm-wqrp-2f25/GHSA-8xjm-wqrp-2f25.json"}},{"package":{"name":"backpack/crud","ecosystem":"Packagist","purl":"pkg:composer/backpack/crud"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.0.0"},{"fixed":"7.0.35"}]}],"versions":["7.0.0","7.0.1","7.0.10","7.0.11","7.0.12","7.0.13","7.0.14","7.0.15","7.0.16","7.0.17","7.0.18","7.0.19","7.0.2","7.0.20","7.0.21","7.0.22","7.0.23","7.0.24","7.0.25","7.0.26","7.0.27","7.0.28","7.0.29","7.0.3","7.0.30","7.0.31","7.0.32","7.0.33","7.0.34","7.0.4","7.0.5","7.0.6","7.0.7","7.0.8","7.0.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-8xjm-wqrp-2f25/GHSA-8xjm-wqrp-2f25.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"}]}