mod/forum/unsubscribeall.php in Moodle 2.1.x before 2.1.7 and 2.2.x before 2.2.4 does not consider whether a forum is optional, which allows remote authenticated users to bypass forum-subscription requirements by leveraging the student role and unsubscribing from all forums.
https://exchange.xforce.ibmcloud.com/vulnerabilities/76958
https://euvd.enisa.europa.eu/vulnerability/EUVD-2012-3363
http://www.securityfocus.com/bid/54481
http://secunia.com/advisories/49890