CVE-2026-133060

Path Traversal
Affects
Moodle, IOMAD
in
Moodle
No items found.
Versions
<4.5.16, >=5.0.0 <5.1.9, >=5.2.0 <5.2.5, >=5.3.0 <5.3.1

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. Moodle can import questions into a question bank from several file formats. The Blackboard format (qformat_blackboard_six) accepts a zip archive, unpacks it to a temporary directory, and copies images referenced by the question text into Moodle's file storage.

A Path Traversal vulnerability (CVE-2026-133060) has been identified in the Blackboard question import format of Moodle and IOMAD, which allows an authenticated user who can import questions to read arbitrary files that are readable by the web server process. Moodle tracks this issue as MSA-26-0047 (MDL-88734).

Per MITRE CWE-22: The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

This issue affects all versions of Moodle before 4.5.16, versions 5.0.0 through 5.1.8, versions 5.2.0 through 5.2.4, and version 5.3.0, including End-of-Life release lines such as Moodle 4.3 and 5.0. 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 all versions of Moodle before 4.5.16, versions 5.0.0 through 5.1.8, versions 5.2.0 through 5.2.4, and version 5.3.0, including End-of-Life release lines such as Moodle 4.3 and 5.0. 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 6.5 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

While converting question text, the importer looks for image tags and treats each src value as a path relative to the directory where the archive was unpacked. If the resulting path is readable, the file is stored as an attachment of the imported question:

foreach ($out[1] as $path) {
    $fullpath = $this->filebase . '/' . $path;

    if (is_readable($fullpath) && !in_array($path, $filepaths)) {
        $dirpath = dirname($path);
        $filename = basename($path);
        $newfilename = $this->store_file_for_text_field($data, $this->filebase, $dirpath, $filename);
        $text = preg_replace("|{$path}|", "@@PLUGINFILE@@/" . $newfilename, $text);
        $filepaths[] = $path;
    }

The path from the import file is appended to the base directory with no check that the result stays inside it. A path containing parent directory segments can resolve to any file on the server. Because the importer only tests whether the file is readable, such a file is copied into the question's files, where the importing user can then open it.

The attacker needs permission to import questions into a question bank, which editing teachers have by default in their own courses. Files that the web server account cannot read are not exposed. Configuration files and other data readable by that account can be.

The fix resolves the path and only accepts a readable regular file that lies inside the import's base directory:

$base = realpath($this->filebase);
if ($base === false || !is_dir($base)) {
    return false;
}
$fullpath = realpath($this->filebase . '/' . $path);
if ($fullpath === false || !is_file($fullpath) || !is_readable($fullpath)) {
    return false;
}
return strpos($fullpath, rtrim($base, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR) === 0;

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, 5.2.5, 5.3.1, 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

  • LoWeST (finder)
  • Adam Olley (remediation)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-133060
PROJECT Affected
Moodle, IOMAD
Versions Affected
<4.5.16, >=5.0.0 <5.1.9, >=5.2.0 <5.2.5, >=5.3.0 <5.3.1
NES Versions Affected
Published date
November 19, 2026
≈ Fix date
December 2, 2026
Category
Path Traversal
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.