CVE-2020-25631 Moodle Cross-site Scripting (XSS)

Medium 6.1 Published Updated

An attacker can inject JavaScript into book chapter titles in Moodle, potentially leading to code execution or account takeover.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-25631?

CVE-2020-25631 is a medium-severity cross-site scripting vulnerability in Moodle Moodle, published on 8 Dec 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

A vulnerability was found in Moodle 3.9 to 3.9.1, 3.8 to 3.8.4 and 3.7 to 3.7.7 where it was possible to include JavaScript in a book's chapter title, which was not escaped on the "Add new chapter" page. This is fixed in 3.9.2, 3.8.5 and 3.7.8.

Weakness: CWE-79

Which versions are affected by CVE-2020-25631?

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

PackageAffectedFixed in
moodle/moodle PackagistFrom 3.73.7.8
moodle/moodle PackagistFrom 3.73.7.8
moodle/moodle PackagistFrom 3.83.8.5
moodle/moodle PackagistFrom 3.83.8.5
moodle/moodle PackagistFrom 3.93.9.2
moodle/moodle PackagistFrom 3.93.9.2
1 more packages
moodle BitnamiFrom 3.7.03.7.8, 3.8.5, 3.9.2

Products include Moodle Moodle.

How do I fix CVE-2020-25631?

Upgrade moodle/moodle to a fixed version for your release line: 3.7.8, 3.8.5 or 3.9.2.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2020-25631 being exploited?

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

All Moodle Moodle vulnerabilities

Sources

Also known as BIT-moodle-2020-25631, GHSA-4w4j-9533-82qg, UBUNTU-CVE-2020-25631.

Is CVE-2020-25631 in your software?

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

Check your SBOMs for free