CVE-2021-47857 Moodle 3.10.3 - 'label' Persistent Cross Site Scripting
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.
| Package | Affected | Fixed in |
|---|---|---|
moodle Bitnami | From 3.10.3 to 3.10.3 | None |
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.
Other vulnerabilities in Moodle Moodle
- CVE-2006-4935 File upload in n/a
- CVE-2006-4936 Moodle does not properly validate module instance id
- CVE-2004-2233 Unknown "front page vulnerability with Moodle servers" for Moodle before 1.3.2 has unknown impact and attack vectors.
- CVE-2004-2235 Cross-site scripting in n/a
- CVE-2004-2236 Other in n/a
Sources
Also known as BIT-moodle-2021-47857, GHSA-px56-6vfj-h8xp.