CVE-2022-45151 Moodle stored-XSS vulnerability in some "social" user profile fields

Medium 5.4 Published Updated

Attackers can inject malicious scripts into user profile fields, allowing code execution in victims' browsers and potential account takeover.

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

What is CVE-2022-45151?

CVE-2022-45151 is a medium-severity cross-site scripting vulnerability in Fedoraproject Fedora, published on 23 Nov 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

The stored-XSS vulnerability was discovered in Moodle which exists due to insufficient sanitization of user-supplied data in several "social" user profile fields. An attacker could inject and execute arbitrary HTML and script code in user's browser in context of vulnerable website.

Weakness: CWE-79

Which versions are affected by CVE-2022-45151?

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

PackageAffectedFixed in
moodle/moodle PackagistFrom 3.113.11.11
moodle/moodle PackagistFrom 3.113.11.11
moodle/moodle PackagistFrom 4.04.0.5
moodle/moodle PackagistFrom 4.04.0.5
moodle BitnamiFrom 3.11.03.11.11, 4.0.5

Products include Fedoraproject Fedora, Moodle Moodle.

How do I fix CVE-2022-45151?

Upgrade moodle/moodle to a fixed version for your release line: 3.11.11 or 4.0.5.

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-2022-45151 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as BIT-moodle-2022-45151, GHSA-xv72-6pgh-cjj8, UBUNTU-CVE-2022-45151.

Is CVE-2022-45151 in your software?

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

Check your SBOMs for free