Fedora Account System
Red Hat Associate
Red Hat Customer
The cluster-backup-operator copies Restore.spec.hooks.resources verbatim into the Velero Restore object's Spec.Hooks.Resources (controllers/restore.go:868-871) with no filtering or allow-list. The Velero RestoreHooks type carries PostHooks[].Exec.Command ([]string), which Velero executes inside targeted pods after restore. The validating webhook (api/v1beta1/restore_webhook.go validateRestore(), lines 80-91) only validates sync-mode invariants (SyncRestoreWithNewBackups) and never inspects Hooks, so arbitrary postHooks exec commands pass through unchecked. A namespace-admin in open-cluster-management-backup can create a Restore CR with malicious hooks that execute arbitrary commands in every matching restored pod, exfiltrating their ServiceAccount tokens. This is a pods/exec bypass — the attacker gains exec access to pods and SAs they would not normally be authorized to access. Confirmed by static triage at SHA 7f488e2e and live validation (Restore CR glasswing-find-002 created successfully). Root cause not addressed at HEAD 6248fd4.