CVE-2022-50943 Moodle LMS 4.0 Cross-Site Scripting via course search.php
Unauthenticated attackers can inject malicious scripts via the course search parameter to steal session cookies and execute arbitrary code in user browsers.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2022-50943?
CVE-2022-50943 is a medium-severity cross-site scripting vulnerability in Moodle Moodle, published on 10 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2022-50943?
1 open source package ship an affected version, including moodle. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
moodle Bitnami | All versions to 4.0.0 | None |
Products include Moodle Moodle.
How do I fix CVE-2022-50943?
No fix has been published for CVE-2022-50943 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2022-50943 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-50943 exists.
Other vulnerabilities in Moodle Moodle
- CVE-2006-4935 File upload in n/a
- CVE-2006-4936 Moodle does not properly validate module instance id
- CVE-2004-2233 Unknown "front page vulnerability with Moodle servers" for Moodle before 1.3.2 has unknown impact and attack vectors.
- CVE-2004-2235 Cross-site scripting in n/a
- CVE-2004-2236 Other in n/a
Sources
Also known as BIT-moodle-2022-50943, GHSA-f439-48pp-hm2q, UBUNTU-CVE-2022-50943.