CVE-2022-35650: Moodle - Arbitrary File Read via Lesson Questions Import

moodle Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2022-35650: The vulnerability was found in Moodle, occurs due to input validation error when importing lesson questions. Affects moodle across 3 version ranges.

>= 3.9.0, < 3.9.15 >= 3.11.0, < 3.11.8 >= 4.0.0, < 4.0.2

Fixed in 3.9.15, 3.11.8 or 4.0.2, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-35650 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Moodle is an open-source learning management system widely used for online education. It provides a platform for teachers, managers, and administrators to create and manage courses, quizzes, and other educational materials. Moodle allows importing lesson questions to enhance the learning experience. However, a vulnerability has been discovered in Moodle that allows remote attackers to perform directory traversal attacks, leading to arbitrary file read. This vulnerability affects Moodle versions 3.9.0 to 3.9.15, 3.11.0 to 3.11.8, and 4.0.0 to 4.0.2.

Vulnerability Detail

The vulnerability in Moodle arises from an input validation error when importing lesson questions. Insufficient path checks during this process enable an attacker to traverse directories and read arbitrary files on the server. This could potentially expose sensitive information or allow unauthorized access to system files. The capability to access this feature is only available to teachers, managers, and administrators by default.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 3.9.0, < 3.9.15 3.9.15
  • >= 3.11.0, < 3.11.8 3.11.8
  • >= 4.0.0, < 4.0.2 4.0.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, administrators can restrict access to the lesson questions import feature for teachers, managers, and administrators until the system is updated to a patched version. This can be achieved by modifying the user roles and permissions within the Moodle administration settings.

Conclusion

The vulnerability in Moodle allows remote attackers to perform directory traversal attacks and read arbitrary files on the server. It is crucial to update Moodle to the latest patched version (3.9.15, 3.11.8, or 4.0.2) to mitigate this risk. Administrators can also apply a temporary workaround by restricting access to the affected feature. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for moodle →

Share this vulnerability

FAQ

Moodle is an open-source learning management system used for online education. It provides a platform for creating and managing courses, quizzes, and other educational materials.

This vulnerability affects Moodle versions 3.9.0 to 3.9.15, 3.11.0 to 3.11.8, and 4.0.0 to 4.0.2. Users of these versions who have access to the lesson questions import feature are potentially affected.

The vulnerability allows remote attackers to perform directory traversal attacks, leading to arbitrary file read. This could expose sensitive information or allow unauthorized access to system files.

Yes, the vulnerability can be fixed by updating Moodle to the latest patched version. The Moodle development team has released versions 3.9.15, 3.11.8, and 4.0.2 to address this issue.

Yes, administrators can temporarily restrict access to the lesson questions import feature for teachers, managers, and administrators until the system is updated. This can be done by modifying user roles and permissions within the Moodle administration settings.

Related vulnerabilities

Recent vulnerabilities recorded for moodle.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 3.9.0, < 3.9.15 3.9.15
  • >= 3.11.0, < 3.11.8 3.11.8
  • >= 4.0.0, < 4.0.2 4.0.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback