CVE-2021-47857 Moodle 3.10.3 - 'label' Persistent Cross Site Scripting

Medium 5.1 Published Updated

Attackers can inject malicious scripts into Moodle calendar event subtitles, leading to arbitrary code execution when users view the event.

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
None listed

What is CVE-2021-47857?

CVE-2021-47857 is a medium-severity cross-site scripting vulnerability in Moodle Moodle, published on 21 Jan 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Moodle 3.10.3 contains a persistent cross-site scripting vulnerability in the calendar event subtitle field that allows attackers to inject malicious scripts. Attackers can craft a calendar event with malicious JavaScript in the subtitle track label to execute arbitrary code when users view the event.

Weakness: CWE-79

Which versions are affected by CVE-2021-47857?

1 open source package ship an affected version, including moodle. It affects 1 product.

PackageAffectedFixed in
moodle BitnamiFrom 3.10.3 to 3.10.3None

Products include Moodle Moodle.

How do I fix CVE-2021-47857?

No fix has been published for CVE-2021-47857 yet. Limit exposure of the affected software until one is available.

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-2021-47857 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-47857 exists.

All Moodle Moodle vulnerabilities

Sources

Also known as BIT-moodle-2021-47857, GHSA-px56-6vfj-h8xp.

Is CVE-2021-47857 in your software?

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

Check your SBOMs for free