Craft CMS: Missing peer-permission check in `AssetsController::actionDeleteFolder` allows deletion of other users' assets
High severity. Published 2 July 2026. Update craftcms/cms to the fixed version of your branch (5.9.22, 4.17.15): composer update craftcms/cms.
Which versions are affected?
| Package | Affected versions | Fixed in |
|---|---|---|
| craftcms/cms (opens in a new tab) | >= 5.0.0-RC1, < 5.9.22 | >= 4.0.0-RC1, < 4.17.15 | 5.9.22, 4.17.15 |
What should you do?
Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:
composer show craftcms/cms
composer auditAdvisory details
| Severity | High |
|---|---|
| Published | |
| Updated | |
| CVE | CVE-2026-50284 (opens in a new tab) |
| GHSA | GHSA-7h62-6v23-v8fm (opens in a new tab) |
| Weakness | CWE-862 |
What the advisory says
Summary
AssetsController::actionDeleteFolder() only requires the deleteAssets: permission for the target folder. It never enforces deletePeerAssets:, even though Assets::deleteFoldersByIds() cascades deletion to every descendant folder and every asset inside, regardless of who uploaded them. A low-privilege user who has been granted folder-management rights on a shared volume can therefore destroy assets uploaded by other users (peer assets), bypassing the per-asset peer-permission check that the sibling actionDeleteAsset endpoint correctly applies.
Source: GHSA-7h62-6v23-v8fm (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .
Other recent advisories for this package
- Craft CMS: Passkey login accepts replayed WebAuthn assertions (critical, 7 August 2026)
- Craft CMS: Authorization bypass: view-only Categories user can modify category structure via structures/move-element (opens in a new tab) (medium, 6 August 2026)
- Craft CMS: Missing authorization check allows non-admin control panel users access to user registration metrics (opens in a new tab) (medium, 6 August 2026)
- Craft CMS: Arbitrary user password reset leading to administrator account takeover (high, 6 August 2026)
- Craft CMS: Authenticated RCE through Twig sandbox escape (high, 6 August 2026)