CVE-2026-133075

Authorization Bypass
Affects
Moodle, IOMAD
in
Moodle
No items found.
Versions
>=4.3.0 <4.5.16, >=5.0.0 <5.1.9

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Moodle is an open source learning management system written in PHP. Schools, universities, and companies use it to run online courses. IOMAD is a multi-tenant distribution of Moodle that lets one installation serve several companies or organizations; it is built on Moodle core and shares the affected code. The Quiz activity (mod_quiz) can include random questions, where each quiz slot stores a filter condition that selects the question bank categories and tags the question is drawn from. The mod_quiz_update_filter_condition web service updates that stored filter.

An Authorization Bypass vulnerability (CVE-2026-133075) has been identified in the quiz random question filter web service of Moodle and IOMAD, which allows a teacher who can manage one quiz to change the random question settings of slots in quizzes they do not have permission to manage. Moodle tracks this issue as MSA-26-0062 (MDL-89452).

Per MITRE CWE-639: The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.

This issue affects Moodle versions 4.3.0 through 4.5.15 and versions 5.0.0 through 5.1.8, including End-of-Life release lines such as Moodle 4.3 and 5.0. Moodle 5.2 and later are not affected. IOMAD releases built on these Moodle versions contain the same code and are affected as well.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the moodle/moodle package in Moodle versions 4.3.0 through 4.5.15 and versions 5.0.0 through 5.1.8, including End-of-Life release lines such as Moodle 4.3 and 5.0. Moodle 5.2 and later are not affected. IOMAD releases built on these Moodle versions contain the same code and are affected as well. The CVE record's CNA assigns it a CVSS 3.1 base score of 4.3 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N). Moodle rates it Serious.

The web service takes a course module ID, a slot ID and the new filter condition. It checks that the caller can manage the quiz identified by the course module ID, then writes the filter condition to the record for the slot ID:

// Validate context.
$thiscontext = \context_module::instance($cmid);
self::validate_context($thiscontext);
require_capability('mod/quiz:manage', $thiscontext);

// Update filter condition.
$setparams = [
    'itemid' => $slotid,
    'questionarea' => 'slot',
    'component' => 'mod_quiz',
];
$DB->set_field('question_set_references', 'filtercondition', $filtercondition, $setparams);

Nothing ties the slot ID to the quiz that was checked. The update matches on the slot ID alone, so a user with mod/quiz:manage on any quiz can pass that quiz's course module ID together with a slot ID from a different quiz, and the random question filter of the other quiz is overwritten. This can change which questions students in another course receive.

The caller needs the mod/quiz:manage capability on at least one quiz, which editing teachers have by default. Students and guests cannot call the service. Moodle 5.2 and later are not listed as affected.

The fix confirms that the slot belongs to the quiz that was checked, and requires permission to use questions from the category named in the new filter:

// Validate the slot belongs to the quiz identified by cmid. create_for_cmid() throws if cmid is not a quiz.
$quizobj = \mod_quiz\quiz_settings::create_for_cmid($cmid);
$DB->get_record('quiz_slots', ['id' => $slotid, 'quizid' => $quizobj->get_quizid()], 'id', MUST_EXIST);
// Require permission to use questions from the target category's context.
$catcontext = \context::instance_by_id($categorycontextid);
require_capability('moodle/question:useall', $catcontext);

Mitigation

Moodle publishes security fixes only for its supported release lines. Moodle 5.0 and the release lines before 4.5, including Moodle 4.3 and the IOMAD releases built on it, are End-of-Life and will not receive any public updates to address this issue.

Users of the affected components should apply one of the following mitigations:

  • Upgrade to Moodle 4.5.16, 5.1.9, or later, or to an IOMAD release built on one of those versions.
  • Leverage a commercial support partner like HeroDevs (NES for Moodle, NES for IOMAD) for post-EOL security support.

Credits

  • Vincent Schneider (finder, remediation)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-133075
PROJECT Affected
Moodle, IOMAD
Versions Affected
>=4.3.0 <4.5.16, >=5.0.0 <5.1.9
NES Versions Affected
Published date
November 19, 2026
≈ Fix date
December 2, 2026
Category
Authorization Bypass
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Moodle
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.