CVE-2026-102580

Improper Input Validation (4.16)
Affects
Moodle, IOMAD
in
Moodle
No items found.
Versions
>=4.0.0 <4.5.13, >=5.0.0 <5.0.9, >=5.1.0 <5.1.6, >=5.2.0 <5.2.2

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. Custom reports in the report builder (core_reportbuilder) are shared with audiences, such as members of a cohort or holders of a role. Each audience type is a PHP class, and the class name is sent by the browser when an audience is added.

An Improper Input Validation vulnerability (CVE-2026-102580) has been identified in the report builder audience handling of Moodle and IOMAD, which allows an authenticated user to cause Moodle to instantiate an arbitrary class by supplying its name as an audience type. Moodle tracks this issue as MSA-26-0033 (MDL-89078).

Per MITRE CWE-470: The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.

This issue affects Moodle versions 4.0.0 through 4.5.12, versions 5.0.0 through 5.0.8, versions 5.1.0 through 5.1.5, and versions 5.2.0 through 5.2.1, including End-of-Life release lines such as Moodle 4.3. IOMAD releases built on these Moodle versions contain the same code and are affected as well.

Details

Module Info

Vulnerability Info

This Low-severity vulnerability is found in the moodle/moodle package in Moodle versions 4.0.0 through 4.5.12, versions 5.0.0 through 5.0.8, versions 5.1.0 through 5.1.5, and versions 5.2.0 through 5.2.1, including End-of-Life release lines such as Moodle 4.3. 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 2.2 (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:L/A:N). Moodle rates it Minor.

When an audience is created, the report builder reads the class name from the request and creates an instance of that class:

// Check if audience type class still exists in the system.
if (!class_exists($classname)) {
    return null;
}

$instance = new $classname();
$instance->audience = $persistent;
return $instance;

The only validation is that the class exists. Any class that Moodle can autoload passes, whether or not it is an audience type, and its constructor runs with no arguments. This is unsafe reflection: the request selects which code is executed. The CVE record describes the result as unauthorized creation of internal program objects, which may lead to unexpected application behavior.

The CVE record scores this as requiring high privileges and high attack complexity. The practical effect depends on which classes are present and what their constructors do. No specific further impact is described by Moodle.

The fix only accepts classes that extend the audience base class, and makes the callers reject a request when no valid audience instance is returned:

// Check if audience type class still exists in the system.
if (!class_exists($classname) || !is_subclass_of($classname, self::class)) {
    return null;
}

$instance = new $classname();
$instance->audience = $persistent;
return $instance;

Mitigation

Moodle publishes security fixes only for its supported release lines. Earlier release lines, 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.13, 5.0.9, 5.1.6, 5.2.2, 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

  • Paul Holden (finder, remediation)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Low
ID
CVE-2026-102580
PROJECT Affected
Moodle, IOMAD
Versions Affected
>=4.0.0 <4.5.13, >=5.0.0 <5.0.9, >=5.1.0 <5.1.6, >=5.2.0 <5.2.2
NES Versions Affected
Published date
September 30, 2026
≈ Fix date
October 12, 2026
Category
Improper Input Validation (4.16)
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.