Craft CMS versions >= 5.0.0-RC1 and < 5.10.11 contain a missing authorization vulnerability in AssetsController::actionReplaceFile. The flaw allows an authenticated low-privilege author to bypass the replacePeerFiles permission check by omitting the assetId parameter from a request. When sourceAssetId and targetFilename are supplied without assetId, the target asset is resolved by folder and filename after permission checks have already executed, meaning the replacePeerFiles permission is never enforced. This enables an attacker with only the replaceFiles permission on a shared folder to overwrite a peer's asset file with attacker-controlled bytes. The vulnerability is an authorization logic flaw stemming from the order of operations in the permission enforcement flow. It requires authentication but only low-privilege access. The issue has been patched in Craft CMS version 5.10.11.