CVE-2022-50943

MEDIUM

Moodle LMS 4.0 Cross-Site Scripting via course search.php

Title source: cna
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2022-50943. PoCs published by Saud Alenazi.

AI-analyzed exploit summary This exploit demonstrates a stored XSS vulnerability in Moodle LMS 4.0 via the search functionality. The payload is injected into the search field, triggering JavaScript execution when rendered.

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.

Exploits (1)

exploitdb WORKING POC
by Saud Alenazi · textwebappsphp
https://www.exploit-db.com/exploits/51115

This exploit demonstrates a stored XSS vulnerability in Moodle LMS 4.0 via the search functionality. The payload is injected into the search field, triggering JavaScript execution when rendered.

Classification
Working Poc 90%
Attack Type
Xss
Complexity
Trivial
Reliability
Reliable
Target: Moodle LMS 4.0
No auth needed
Prerequisites: access to the search.php endpoint
devstral-2 · analyzed May 10, 2026 Full analysis →

References (4)

Core 4
Core References
Exploit exploit
ExploitDB-51115
https://www.exploit-db.com/exploits/51115
Product product
Official Product Homepage
https://moodle.org/
Product product
Product Reference
https://git.in.moodle.com/moodle
Third Party Advisory third-party-advisory
VulnCheck Advisory: Moodle LMS 4.0 Cross-Site Scripting via course search.php
https://www.vulncheck.com/advisories/moodle-lms-cross-site-scripting-via-course-search-php

Scores

CVSS v3 6.1
EPSS 0.0011
EPSS Percentile 28.8%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact partial

Details

CWE
CWE-79
Status published
Products (1)
Moodle/Moodle LMS 4.0
Published May 10, 2026
Tracked Since May 10, 2026