CVE-2022-50943
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.
Does this matter?
A public exploit is published in Exploit-DB, so the technical barrier is gone even though the severity is medium and EPSS is 1.9%. Treat it as high on anything reachable from the internet.
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 4.0
- 5.1 MEDIUMCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/M
- EPSS
- 1.86% probability · 80th percentile
- Public exploits
- 1 in Exploit-DB · first 28 March 2023
- CISA KEV
- Not listed
- Weakness
- CWE-79: Cross-site scripting
- Affected
- moodle/moodle
- Source
- disclosure@vulncheck.com
In plain terms
It can be reached over a network with no login, but it needs a person to act, so it usually arrives by email or through a web page.
- Reached from
- Over a network. If the affected system can be reached from the internet, so can the flaw.
- Effort
- Nothing special has to be got round first.
- Login needed
- None. No login is needed.
- Someone else involved
- Yes. Someone has to take a deliberate step, such as opening a crafted file or dismissing a warning.
- At risk on the affected system
- Reading data: none. Changing data: none. Stopping the service: none.
- At risk beyond it
- Reading data: limited. Changing data: limited. Stopping the service: none.
Read from the CVSS 4.0 vector above. It describes the flaw itself, not how your own systems are set up.
The first public exploit in Exploit-DB is dated 28 March 2023, about 3 years before the record was published.
EPSS 1.9% since 30 November 2026; no change recorded yet. Points are recorded when the score first appears and whenever it moves by a percentage point or more.
Public exploits (1)
Entries in Exploit-DB that cite this CVE. Links go to the Exploit-DB page and to the file in the public repository; nothing is hosted here. A verified tick means the Exploit-DB team confirmed the exploit works against the stated version.
The same product
We hold 21 records for moodle/moodle. None of them is on CISA’s known-exploited list. Follow this product to hear of the next one.
Where to go from here
One vulnerability is rarely the whole question. These are free, and none of them asks for an account.
By email
Our briefing by email: what changed, what to patch and what it means for a UK organisation. Written for the people who have to act on it.
References
- https://git.in.moodle.com/moodleProduct
- https://moodle.org/Product
- https://www.exploit-db.com/exploits/51115Exploit, VDB Entry
- https://www.vulncheck.com/advisories/moodle-lms-cross-site-scripting-via-course-search-phpThird Party Advisory
Source: NVD record, EPSS from FIRST.org, KEV from CISA, exploits from Exploit-DB. Refreshed daily. Download this record as JSON.