Summary
DataPrivacyFramework is the access-control store consulted by DataPrivacyFrameworkMpc (including op_decrypt) via onlyAllowedUserOperation. The constructor seeds the deployer with an "admin" permission, but every permission mutator is public/external with no gate:
setPermission
setAddressDefaultPermission
setOperationDefaultPermission
addAllowedOperation / removeAllowedOperation
addRestrictedOperation / removeRestrictedOperation
Any address can therefore grant itself gated MPC operations (including decrypt) or erase an integrator's policy.
Proposed fix
Gate mutators with onlyAdmin requiring isOperationAllowed(msg.sender, "admin"), bootstrap constructor via an internal _setPermission, and mark mutators virtual for integrator overrides. Note: this is a potentially breaking change for anyone who relied on open mutators.
Happy to open a PR with regression tests (non-admin reverts).
Summary
DataPrivacyFrameworkis the access-control store consulted byDataPrivacyFrameworkMpc(includingop_decrypt) viaonlyAllowedUserOperation. The constructor seeds the deployer with an"admin"permission, but every permission mutator is public/external with no gate:setPermissionsetAddressDefaultPermissionsetOperationDefaultPermissionaddAllowedOperation/removeAllowedOperationaddRestrictedOperation/removeRestrictedOperationAny address can therefore grant itself gated MPC operations (including decrypt) or erase an integrator's policy.
Proposed fix
Gate mutators with
onlyAdminrequiringisOperationAllowed(msg.sender, "admin"), bootstrap constructor via an internal_setPermission, and mark mutatorsvirtualfor integrator overrides. Note: this is a potentially breaking change for anyone who relied on open mutators.Happy to open a PR with regression tests (non-admin reverts).