CVE-2026-50282: Craftcms/cms Remote Code Execution Vulnerability
HIGHCVE-2026-50282 is a HIGH remote code execution vulnerability (CWE-862: Missing Authorization) affecting Craftcms/cms libraries in the Packagist ecosystem. The issue involves craft cms vulnerable to unauthorized deletion of destination folders during forced moves. Remediation is available by upgrading affected packages to version 5.9.21, 4.17.14.
CVE-2026-50282 at a Glance
How to Fix CVE-2026-50282
To remediate this vulnerability, upgrade all affected Craftcms/cms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade craftcms/cms to 5.9.21
Upgrade craftcms/cms to 4.17.14
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for craftcms/cms
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-50282, inspect your project dependencies for Craftcms/cms:
inspect dependencies for craftcms/cms
Analyze the terminal output to locate any version of Craftcms/cms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.9.21), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Craftcms/cms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-50282 Affected Craftcms/cms Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
craftcms/cms
|
Packagist |
≥ 5.0.0-RC1
< 5.9.21
|
5.9.21
|
|
craftcms/cms
|
Packagist |
≥ 4.0.0-RC1
< 4.17.14
|
4.17.14
|
References
Frequently Asked Questions
What is CVE-2026-50282?
Which Craftcms/cms versions are affected?
What version fixes CVE-2026-50282?
Is craftcms/cms affected?
What CWE is associated with CVE-2026-50282?
How can I check Packagist dependencies for CVE-2026-50282?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3w32-23wj-rxg3",
"modified" : "2026-07-02T20:03:58Z",
"published" : "2026-07-02T20:03:58Z",
"aliases" : [ "CVE-2026-50282" ],
"summary" : "Craft CMS Vulnerable to Unauthorized Deletion of Destination Folders During Forced Moves",
"details" : "We have identified an authorization issue in Craft CMS where a forced folder move can delete a conflicting destination folder without destination delete permission.\n\n### Description\n\nCraft CMS’s `craft\\\\controllers\\\\AssetsController::actionMoveFolder()` supports moving an asset folder into a destination parent folder. If a folder with the same name already exists at the destination, the action can be called with `force=true` to overwrite the destination.\n\nThe permission checks for this action allow:\n\n- `deleteAssets:<sourceVolumeUid>` for the folder being moved \n- `createFolders:<destVolumeUid>` for the destination parent folder \n- `saveAssets:<destVolumeUid>` for the destination parent folder\n\nThe action does not require `deleteAssets` on the destination volume or destination conflict folder. When `force=true` and a name conflict exists, the code deletes the destination folder to resolve the conflict.\n\n```php\n$this->requireVolumePermissionByFolder('deleteAssets', $folderToMove);\n$this->requireVolumePermissionByFolder('createFolders', $destinationFolder);\n$this->requireVolumePermissionByFolder('saveAssets', $destinationFolder);\n```\n\n[*src/controllers/AssetsController.php:L751-L753*](https://github.com/craftcms/cms/blob/5.x/src/controllers/AssetsController.php#L751-L753)\n\nIndexed destination conflicts are deleted via the Assets service:\n\n```php\n$assets->deleteFoldersByIds($existingFolder->id);\n```\n\n[*src/controllers/AssetsController.php:L798-L798*](https://github.com/craftcms/cms/blob/5.x/src/controllers/AssetsController.php#L798-L798)\n\nUnindexed destination conflicts are deleted directly in the volume filesystem:\n\n```php\n$targetVolume->deleteDirectory(rtrim($destinationFolder->path, '/') . '/' . $folderToMove->name);\n```\n\n[*src/controllers/AssetsController.php:L815*](https://github.com/craftcms/cms/blob/5.x/src/controllers/AssetsController.php#L815)\n\n### Impact\n\nA user who cannot delete assets in a destination volume can still delete a destination folder and its contents by triggering a forced move into a conflicting name. This can cause asset loss, broken references in entries and fields that point to deleted assets, and operational disruption.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "craftcms/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0-RC1"
}, {
"fixed" : "5.9.21"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "craftcms/cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0-RC1"
}, {
"fixed" : "4.17.14"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/security/advisories/GHSA-3w32-23wj-rxg3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-50282"
}, {
"type" : "WEB",
"url" : "https://github.com/craftcms/cms/commit/2c2579c7f1030872423f268d0c8b48377101961d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/craftcms/cms"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-862" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-02T20:03:58Z",
"nvd_published_at" : "2026-07-02T17:17:01Z"
}
}