/

CVE-2026-84800

Severity:

HIGH RISK

(7.1)

Missing Authorization (CWE-862) in Craft Assets API

CVE-2026-84800

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized modification of asset content

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Craft CMS contains a missing authorization check in the asset replacement workflow. An authenticated, low-privilege author who can replace files in a shared folder may overwrite a peer's asset with attacker-controlled content when the target asset is resolved after permission checks.

Affected context

The issue occurs in Craft CMS asset replacement operations involving shared folders. It becomes risky when a user has permission to replace files but does not have the permission required to replace another user's peer asset, and the target asset is identified through folder and filename resolution after authorization checks have already run.

Exploit preconditions

  • Attack surface: Authenticated Craft CMS asset-management request handling
  • Required access: A low-privilege author account with replaceFiles permission on a shared folder
  • Trigger point: Asset replacement through AssetsController::actionReplaceFile
  • Target condition: The target asset resides in the same folder as the attacker-controlled source or referenced filename
  • Why exploitation is possible: Authorization checks occur before the target asset is fully resolved, so the replacePeerFiles permission is not enforced for the selected peer asset

Why this happens

The underlying bug is an authorization-ordering and object-resolution flaw. The controller performs permission checks before resolving the target asset from the supplied folder and filename context, allowing the eventual target to differ from the object considered during authorization. This maps to CWE-862: Missing Authorization, because a sensitive file modification operation can proceed without verifying the caller's permission for the resolved resource.

Potential impact

  • An attacker could overwrite a peer's asset content
  • Website content or uploaded resources may be tampered with
  • Malicious files could be introduced into shared asset locations
  • Content integrity and user trust could be reduced
  • Downstream systems consuming the modified asset may be affected

General mitigation guidance

Mitigation generally focuses on authorizing the fully resolved target resource before any replacement occurs.

Common defensive patterns include:

  • Resolve the target asset and its ownership or sharing context before performing permission checks
  • Enforce both general file-replacement and peer-file authorization requirements
  • Bind authorization decisions to immutable resource identifiers rather than user-controlled names or paths
  • Apply server-side validation to ensure source, target, folder, and filename relationships are permitted
  • Minimize shared-folder permissions and follow least-privilege access principles
  • Maintain audit records for asset replacement operations and flag unexpected cross-user modifications

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that identify authorization checks performed before resource resolution
  • Code review checks comparing the object authorized with the object ultimately modified
  • Tests covering same-folder peer resources and users with overlapping but incomplete permissions
  • Policy enforcement requiring every resource-modifying controller action to authorize the final resource identity
  • Audit-log monitoring for asset replacements performed by users without peer-resource privileges

Automated application-security review tools may help identify missing or inconsistently applied authorization checks, but targeted authorization tests remain important.

Sources

SourceLink
github.comgithub.com/craftcms/cms/security/advisories/GHSA-329j-cx85-8r56
vulncheck.comvulncheck.com/advisories/craft-cms-5.0.0-rc1-before-5.10.11-file-overwrite-via-assets-replace-file

Frequently asked

questions

An authenticated low-privilege author may be able to exploit it when the account can replace files in a shared folder but lacks permission to replace peer files there.

Yes. The attacker needs an authenticated account capable of reaching the asset replacement request path and supplying attacker-controlled file content.

Resolve the exact target asset first, then enforce authorization against that resolved resource and its ownership or sharing permissions before allowing replacement.

Use resource-centric authorization, test every permission boundary with shared and peer-owned assets, avoid relying solely on user-controlled names or paths, and monitor sensitive content-modification events.

Find out what's already
exploitable in your codebase.