Craft CMS versions >= 5.0.0-RC1 and < 5.10.11 contain a missing authorization vulnerability in AssetsController::actionReplaceFile. The flaw arises when a request supplies sourceAssetId and targetFilename but omits assetId, causing the target asset to be resolved by folder and filename after permission checks have already executed. This means the replacePeerFiles permission is never enforced. An authenticated low-privilege author with only the replaceFiles permission on a shared folder can exploit this to overwrite the content of a peer's asset file with attacker-controlled bytes. The vulnerability allows unauthorized file content manipulation within shared folders. It was fixed in Craft CMS version 5.10.11.