CVE-2022-35650 Moodle Arbitrary file read when importing lesson questions

High 7.5 Published Updated

Remote attackers with teacher or admin privileges can exploit insufficient path checks during lesson question imports to read arbitrary files.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-35650?

CVE-2022-35650 is a high-severity path traversal vulnerability in Fedoraproject Fedora, published on 25 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The vulnerability was found in Moodle, occurs due to input validation error when importing lesson questions. This insufficient path checks results in arbitrary file read risk. This vulnerability allows a remote attacker to perform directory traversal attacks. The capability to access this feature is only available to teachers, managers and admins by default.

Weakness: CWE-20, CWE-22

Which versions are affected by CVE-2022-35650?

7 open source packages ship an affected version, including moodle/moodle and moodle. It affects 2 products.

PackageAffectedFixed in
moodle/moodle PackagistFrom 3.113.11.8
moodle/moodle PackagistFrom 3.113.11.8
moodle/moodle PackagistFrom 3.93.9.15
moodle/moodle PackagistFrom 3.93.9.15
moodle/moodle PackagistFrom 4.04.0.2
moodle/moodle PackagistFrom 4.04.0.2
1 more packages
moodle BitnamiFrom 3.9.03.9.15, 3.11.8, 4.0.2

Products include Fedoraproject Fedora, Moodle Moodle.

How do I fix CVE-2022-35650?

Upgrade moodle/moodle to a fixed version for your release line: 3.11.8, 3.9.15 or 4.0.2.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2022-35650 being exploited?

There is no known exploitation of CVE-2022-35650 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as BIT-moodle-2022-35650, GHSA-pgm5-cr62-prxq, UBUNTU-CVE-2022-35650.

Is CVE-2022-35650 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free