Medium severity · published May 10, 2026
CVE-2022-50943
Moodle LMS 4.0 Cross-Site Scripting via course search.php
6.1
CVSS
0.3%
EPSS
No
On KEV
Description
Moodle LMS 4.0 contains a cross-site scripting vulnerability that allows unauthenticated attackers to inject malicious scripts by submitting payloads through the search parameter. Attackers can inject JavaScript code via the search field in course/search.php to execute arbitrary scripts in users' browsers and steal session cookies.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 23% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
ML
Moodle LMS · Moodle
4.0 · source: vendor
MO
Moodle · Moodle
through 4.0.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-50943
CVE.org
https://www.cve.org/CVERecord?id=CVE-2022-50943
Product
https://git.in.moodle.com/moodle
Product
https://moodle.org/
Exploit
https://www.exploit-db.com/exploits/51115
Third Party Advisory
https://www.vulncheck.com/advisories/moodle-lms-cross-site-scripting-via-course-search-php
