The MembershipFactory is inheriting from AccessControl and has 2 roles: DEFAULT_ADMIN_ROLE and EXTERNAL_CALLER. However the EXTERNAL_CALLER role is not used correctly.
The DEFAULT_ADMIN_ROLE is used for granting/revoking roles, and calling the following functions: setCurrencyManager, setBaseURI and updateMembershipImplementation. The EXTERNAL_CALLER is supposed to call only callExternalContract. The problem is that updateDAOMembership function has onlyRole(EXTERNAL_CALLER) modifier. This is admin function and is not supposed to be called by other roles.
https://github.com/Cyfrin/2024-11-one-world/blob/main/contracts/dao/MembershipFactory.sol#L100-L134
Medium, because initially both roles are given to msg.sender, but can change in future and also this is giving access to unrestricted address to call admin function.
Manual Review
Change the modifier from onlyRole(EXTERNAL_CALLER) to onlyRole(DEFAULT_ADMIN_ROLE). By making this change the EXTERNAL_CALLER can still call this function by calling callExternalContract().
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.