# CVE-2026-50283: Craft CMS: Unauthorized Deletion of Source Assets During File Replacement

- Severity: Medium 5.3 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 19% of CVEs (2026-12-01)
- Published: 2026-07-01T22:20:01.949Z
- Modified: 2026-10-25T21:10:00.770Z
- Also known as: GHSA-qh45-9g5p-m2v4
- Weaknesses: CWE-639, CWE-862
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Craft CMS is a content management system (CMS). Versions 5.0.0-RC1 through 5.9.20, and 4.0.0-RC1 through 4.17.13 contain an authorization issue in the AssetsController::actionReplaceFile that can delete a source asset without source delete permission by supplying both assetId and sourceAssetId. AssetsController::actionReplaceFile() supports replacing a target asset file using another existing asset as the source. The action loads: assetId -> $assetToReplace and sourceAssetId -> $sourceAsset, 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. When both assets are present, Craft copies the source file into the target and then deletes the source asset. There is no deletion check for for the source asset. An authenticated user who can replace files in one volume can delete assets in another volume where they do not have delete permission, as long as they can obtain a sourceAssetId, leading to broken content references and data loss. This issue has been fixed in versions 4.17.14 and 5.9.21.

(As written by CVE List.)

## Affected

- craftcms cms: >= 5.0.0-RC1, < 5.9.21; >= 4.0.0-RC1, < 4.17.14
- craftcms/cms (Packagist): from 5.0.0-RC1 before 5.9.21; from 4.0.0-RC1 before 4.17.14

## Every score

- GitHub_M: CVSS:4.0 5.3 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`

## References

- <https://github.com/craftcms/cms/security/advisories/GHSA-qh45-9g5p-m2v4> (web)
- <https://github.com/craftcms/cms/commit/2c2579c7f1030872423f268d0c8b48377101961d> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-50283> (advisory)
- <https://github.com/craftcms/cms> (package)

## Sources

- CVE List: [CVE-2026-50283](https://www.cve.org/CVERecord?id=CVE-2026-50283), CVE Terms of Use, modified 2026-07-02
- GitHub Advisory Database: [GHSA-qh45-9g5p-m2v4](https://github.com/advisories/GHSA-qh45-9g5p-m2v4), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-50283](https://nvd.nist.gov/vuln/detail/CVE-2026-50283), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-50283 · Whole record: https://cve.day/CVE-2026-50283.json · Rebuilt by cve.day 2026-11-25T22:59:26.983Z
