CVE-2026-50282
PHP vulnerability analysis and mitigation

Overview

CVE-2026-50282 is an authorization bypass vulnerability in Craft CMS titled "Unauthorized Deletion of Destination Folders During Forced Moves." It affects Craft CMS versions 5.0.0-RC1 through 5.9.20 (5.x branch) and 4.0.0-RC1 through 4.17.13 (4.x branch). The vulnerability was first published by the Craft CMS security team on May 29, 2026, and added to the NVD on July 2, 2026. It carries a CVSS v4.0 base score of 4.9 (Medium) per Feedly/NVD, though the GitHub Advisory Database rates it as High (7.1) (GitHub Advisory, Craft CMS Advisory).

Technical details

The root cause is a missing authorization check (CWE-862) in craft\controllers\AssetsController::actionMoveFolder(). When moving an asset folder to a destination where a folder with the same name already exists, the action can be invoked with force=true to overwrite the conflicting destination. The permission checks only verify deleteAssets on the folder being moved, and createFolders/saveAssets on the destination parent — but critically do not require deleteAssets permission on the destination volume or the conflicting folder itself. When a name conflict is detected and force=true is set, the code deletes the destination folder either via $assets->deleteFoldersByIds($existingFolder->id) (for indexed folders) or $targetVolume->deleteDirectory(...) (for unindexed folders), bypassing the expected authorization boundary (Craft CMS Advisory, GitHub Advisory).

Impact

An authenticated user with folder move permissions but without delete permissions on a destination volume can exploit this vulnerability to permanently delete asset folders and their contents they are not authorized to remove. This can result in asset loss, broken references in entries and fields pointing to deleted assets, and operational disruption to the CMS. There is no confidentiality impact, but the integrity impact is rated High due to unauthorized data destruction (GitHub Advisory, Craft CMS Advisory).

Exploitability

No public proof-of-concept exploit code is known to exist, and there is no evidence of in-the-wild exploitation at this time (GitHub Advisory). The vulnerability requires authenticated access with at minimum folder move permissions, making unauthenticated exploitation impossible. The EPSS score is approximately 0.207% (11th percentile), indicating a low probability of exploitation in the near term. The CVE status is listed as "Deferred" and the NVD SSVC assessment confirms no known exploitation (Feedly). It is not listed in the CISA Known Exploited Vulnerabilities catalog.

Exploitation steps

  1. Authenticate: Log in to a Craft CMS instance as a user with deleteAssets permission on a source volume and createFolders/saveAssets permissions on a destination volume, but without deleteAssets permission on the destination volume.
  2. Identify target folder: Locate or create an asset folder in the destination volume whose name matches a folder the attacker controls in the source volume.
  3. Initiate forced move: Send a crafted POST request to the actionMoveFolder() endpoint (e.g., via the Craft CMS control panel or direct API call) specifying the source folder ID, the destination parent folder ID, and the parameter force=true.
  4. Trigger unauthorized deletion: Because the permission check only validates delete rights on the source folder — not the destination — the CMS proceeds to delete the conflicting destination folder (and all its contents) to resolve the naming conflict, either via deleteFoldersByIds() or deleteDirectory().
  5. Observe impact: The destination folder and its assets are permanently deleted, breaking any content references pointing to those assets (Craft CMS Advisory, GitHub Advisory).

Indicators of compromise

  • Logs: Craft CMS application logs showing actionMoveFolder() calls with force=true parameters, particularly where the acting user lacks deleteAssets permission on the destination volume; unexpected folder deletion events in the CMS audit log.
  • File System: Sudden disappearance of asset directories on the volume filesystem; missing files that were previously referenced in CMS entries or fields.
  • Application Behavior: Broken asset references or missing images/files in CMS content that previously existed; entries or fields returning 404s for previously valid asset URLs.

Mitigation and workarounds

Craft CMS has released patched versions addressing this vulnerability: 5.9.21 for the 5.x branch and 4.17.14 for the 4.x branch. Users should upgrade to these versions immediately. As a temporary workaround prior to patching, administrators should restrict folder move permissions to trusted users only, and audit existing asset folder permissions to identify any unauthorized deletions that may have already occurred. The fix is referenced in commit 2c2579c (Craft CMS Advisory, GitHub Advisory).

Community reactions

The vulnerability was reported by security researchers davidbors-snyk and cataliniovita-snyk, suggesting it was discovered through a Snyk security audit of the Craft CMS codebase (Craft CMS Advisory). No significant broader media coverage or notable community commentary beyond the standard advisory publication has been observed at this time.

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59989CRITICAL9.2
  • PHP logoPHP
  • phalcon/cphalcon
NoYesAug 21, 2026
CVE-2026-63135HIGH8.2
  • PHP logoPHP
  • yourls/yourls
NoYesAug 21, 2026
GHSA-p2ch-c2c3-4xm5MEDIUM6.1
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026
GHSA-8hgv-xc77-jmcrMEDIUM5.1
  • PHP logoPHP
  • getgrav/grav
NoYesAug 21, 2026
GHSA-hq84-x37p-j6q5MEDIUM4.5
  • PHP logoPHP
  • winter/wn-backend-module
NoYesAug 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management