Skip to content

DataPrivacyFramework permission mutators lack authorization checks #75

Description

@SashaMIT

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions