Details
The attacker's own CSRF token and own zone serial satisfy every form-level check, so nothing about the request looks abnormal to the app.
Suggested fix
Stop trusting the zid in the request. In RecordManager::editRecord() (and the EditRecordController path), look the zone up from the record id on the server side and use that for both the ownership check and the hostname normalization — the same thing deleteRecord() already does:
$details = $recordRepository->getRecordDetailsFromRecordId($record['rid']);
if ($details === null) {
// record doesn't exist – reject
return false;
}
$realZid = $details['zid'];
// use $realZid for verifyUserIsOwnerZoneId() and for zone-name normalization
Reject the edit if the record doesn't exist, and never let the client decide which zone a record "belongs" to.
Disclosure
Credit: Found by Saif Salah (https://saifsalah.github.io/)
Found during a security review of Poweradmin.