by Michael Hawkins.
Badges being awarded with a role performed the correct capability check, but did not verify the user had the required role to meet the award criterion.
Severity/Risk: Minor
Versions affected: 5.1, 5.0 to 5.0.3, 4.5 to 4.5.7, 4.4 to 4.4.11, 4.1 to 4.1.21 and earlier unsupported versions
Versions fixed: 5.1.1, 5.0.4, 4.5.8, 4.4.12 and 4.1.22
Reported by: Stefan Hanauska
CVE identifier: CVE-2025-67856
Changes (main): http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-86507
Tracker issue: MDL-86507 Badges with a role criterion could be awarded to users who do not hold the role