There is an oversight in updateDAOMembership(string, TierConfig[]) which does not accordingly update the dao.maxMembers.
Code snippet shows that dao.maxMembers is only updated when maxMembers is greater than dao.maxMembers. When maxMembers is LOWER than dao.maxMembers - then the dao.maxMembers state variable does NOT update.
More members than can exist in a DAO than is stored at dao.maxMembers under the condition the amount of members is lowered at some point. We see it is not used on contracts for verification - but on backend hence the MEDIUM severity tag.
Manual review
Update dao.maxMembers in cases where the addition of members does not add up to the previous state variable value. Write the code snippet as follows:
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.