CVE-2026-123655
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. Moodle includes H5P support (core_h5p) for interactive content. When an H5P package is deployed, Moodle unpacks its content files and stores them, together with a repackaged export, in file areas of the system context. These files are served to browsers by core_h5p_pluginfile().
An Improper Access Control vulnerability (CVE-2026-123655) has been identified in the serving of H5P content files of Moodle and IOMAD, which allows users, including users who are not logged in, to view H5P content they do not have permission to access. Moodle tracks this issue as MSA-26-0044 (MDL-89547).
Per MITRE CWE-862: The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
This issue affects Moodle versions 3.8.0 through 4.5.14, versions 5.0.0 through 5.0.10, versions 5.1.0 through 5.1.7, and versions 5.2.0 through 5.2.3, 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
- Product: Moodle, IOMAD
- Affected packages: moodle/moodle (core_h5p)
- Affected versions: >=3.8.0 <4.5.15, >=5.0.0 <5.0.11, >=5.1.0 <5.1.8, >=5.2.0 <5.2.4
- GitHub repository: https://github.com/moodle/moodle (Moodle), https://github.com/iomad/iomad (IOMAD)
- Published packages: https://packagist.org/packages/moodle/moodle
- Package manager: Composer
- Fixed in:
- OSS Moodle 4.5.15, 5.0.11, 5.1.8, 5.2.4
- NES for Moodle v4.3.15
- NES for IOMAD v4.3.6
Vulnerability Info
This High-severity vulnerability is found in the moodle/moodle package in Moodle versions 3.8.0 through 4.5.14, versions 5.0.0 through 5.0.10, versions 5.1.0 through 5.1.7, and versions 5.2.0 through 5.2.3, 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 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N). Moodle rates it Serious.
An H5P package lives in the context where it was added, such as an activity or the content bank, and that context controls who may see it. The unpacked content and the export are stored separately in the system context. When one of those files was requested, the handler only confirmed the context level and then served the file:
case \core_h5p\file_storage::CONTENT_FILEAREA:
if ($context->contextlevel != CONTEXT_SYSTEM) {
return false; // Invalid context because the content files are loaded always in the context system.
}
$itemid = array_shift($args);
break;
case \core_h5p\file_storage::CACHED_ASSETS_FILEAREA:
case \core_h5p\file_storage::EXPORT_FILEAREA:
case \core_h5p\file_storage::CSS_FILEAREA:
$itemid = 0;
break;No check linked the requested content back to the original package. Anyone who knew or guessed the URL of a content or export file could fetch it, without being logged in and without access to the course or activity it came from. The advisory notes this includes content in the system context and files of hidden or unavailable course modules. A related exemption for activities whose description is shown on the course page was applied to all file areas when it should only cover the intro.
No account is required. Sites that do not use H5P content have nothing to expose. The issue discloses content only; it does not allow H5P content to be changed.
The fix checks access to content files against the original package, requires login and refuses guests for packages in the system context, and limits the description exemption to the intro file area:
// Content files are stored outside the original package's context.
if (!\core_h5p\api::can_access_content((int) $itemid)) {
return false;
}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.15, 5.0.11, 5.1.8, 5.2.4, 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
- Jari Vilkman (finder)
- Raquel Ortega (remediation)