CVE-2024-38274
NoneCVSS
—
EPSS
0.4%
Published
Jun 18, 2024
CISA due date
—
Cloudanix analysis
A flaw in the way event names are shown when deleting them lets attackers trick the system into running harmful code when someone tries to remove the event.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Application
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Insufficient escaping of user-supplied calendar event titles allows arbitrary JavaScript to execute in the context of an administrator or user viewing the event deletion confirmation prompt, resulting in stored cross-site scripting.
Why it matters to the business
Attackers can hijack user sessions, steal sensitive data, or perform unauthorized actions within the learning platform, potentially disrupting teaching, exposing student records, and requiring extensive incident response.
How an attack unfolds
An attacker with permission to create calendar events crafts a malicious title containing executable script, saves the event, and waits for a privileged user to open the deletion prompt; the script then executes in that user's browser session. No named threat actors or ransomware campaigns are associated with this issue.
How to fix it
Upgrade Moodle to the commit c8c84b4af18d50224c17a4a3193e1374fec26625 or later release that properly escapes event titles before rendering the deletion prompt.
How to confirm the fix worked
Confirm the installed codebase contains commit c8c84b4af18d50224c17a4a3193e1374fec26625; attempt to create an event with a benign script in the title and verify it is escaped in the deletion dialog.
Typical attack path
- Obtain low-privileged account or guest access to create calendar events
- Create a new calendar event whose title contains a crafted script payload
- Trigger deletion workflow by a higher-privileged user who views the event
- Script executes in the victim's browser, establishing persistence or exfiltrating data
How to detect it
Review web server and application logs for unexpected script tags or event-creation requests containing HTML entities; inspect recent calendar events for titles that include script, img, or svg elements.
What your security team should do
- Apply the fixed commit immediately given the 848 days since disclosure
- Audit all calendar events created since 2024-06-18 for suspicious titles
- Enable content-security-policy headers to limit XSS blast radius
- Review user permissions for calendar event creation
The record
Insufficient escaping of calendar event titles resulted in a stored XSS risk in the event deletion prompt.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | moodle/moodle | 0 | 4.1.11 |
| Packagist | moodle/moodle | 4.2.0-beta | 4.2.8 |
| Packagist | moodle/moodle | 4.3.0-beta | 4.3.5 |
| Packagist | moodle/moodle | 4.4.0-beta | 4.4.1 |
| Bitnami | moodle | 4.1.0 | 4.1.11 |
| Ubuntu:16.04:LTS | moodle | 0 | No fix |
| Ubuntu:18.04:LTS | moodle | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | moodle | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | moodle | 0 | No fix |
| packagist | moodle/moodle | 4.2.0-beta | 4.2.8 |
| packagist | moodle/moodle | 4.3.0-beta | 4.3.5 |
| packagist | moodle/moodle | 4.4.0-beta | 4.4.1 |
Related vulnerabilities
- GHSA-ggxq-2mg9-8966 Moodle has a Remote Code Execution risk via file restore Also affects moodle/moodle
- GHSA-cg8j-5cr2-568q Moodle TeX formula editor is vulnerable to DoS through lack of execution time limits Also affects moodle/moodle
- CVE-2026-26047 A denial-of-service vulnerability was identified in Moodle’s TeX formula editor. Also affects moodle/moodle
- CVE-2026-26045 A flaw was identified in Moodle’s backup restore functionality where specially crafted… Also affects moodle/moodle
- GHSA-5cx4-w4fh-fr57 Moodle Affected by Improper Restriction of Excessive Authentication Attempts Also affects moodle/moodle
- GHSA-8jrv-wx83-w3xj Moodle Inserts Sensitive Information Into Sent Data Also affects moodle/moodle
- GHSA-hcm6-q6pc-xfhm Moodle has an authorization logic flaw Also affects moodle/moodle
- GHSA-qv78-6gpp-hm68 Moodle Open Redirect vulnerability Also affects moodle/moodle