All vulnerabilities

Servers and applications

CVE-2026-50283

Unauthorized Deletion of Source Assets During File Replacement

Severity
Medium
Published
29 May 2026
Last changed
9 Jun 2026
Added to UpHeron
3 Nov 2026
Fixed in
4.17.14, 5.9.21
Exploit chance
0.4% in the next 30 daysHigher than 30% of CVEs. EPSS by FIRST, 19 Nov 2026
Also known as
GHSA-qh45-9g5p-m2v4
Sources
Project advisories (GitHub)

Description

We have identified an authorization issue in Craft CMS AssetsController::actionReplaceFile that can delete a source asset without source delete permission by supplying both assetId and sourceAssetId.

Craft CMS’s craft\controllers\AssetsController::actionReplaceFile() supports replacing a target asset file using another existing asset as the source. The action loads:

  • $assetToReplace from assetId
  • $sourceAsset from sourceAssetId

It then enforces replace permissions using ($assetToReplace ?: $sourceAsset). When both IDs are provided, this expression resolves to the target asset so no permission check is performed against the source asset volume.

src/controllers/AssetsController.php:L433-L434

In the branch where both assets are present, Craft copies the source file into the target and then deletes the source asset. There is no check for deleteAssets: or deletePeerAssets: for the source asset before deletion.

src/controllers/AssetsController.php:L462-L463

From craftcms/cms's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
Craft CMSServers and applications · github:craftcms/cms
  • From 4.0.0-RC1 before 4.17.14
  • From 5.0.0-RC1 before 5.9.21

About Craft CMS

Build bespoke content experiences with Craft.

From its GitHub repository.
Monthly downloads (Packagist)
79,322Packagist, 15 Nov 2026
Total downloads (Packagist)
3,879,755Packagist, 15 Nov 2026
GitHub stars
3,628GitHub, 15 Nov 2026
Forks
713GitHub, 15 Nov 2026
Latest release
5.12.1GitHub, 15 Nov 2026
Released
10 Nov 2026GitHub
First published on GitHub
27 Jan 2017GitHub

Release lines

ReleaseLatestSecurity fixes
55.12.1Until 31 Dec 2031
44.18.9Ended 30 Apr 2026
33.9.15Ended 30 Apr 2024
22.9.2Ended 31 Jan 2022

From endoflife.date.

References