# CVE-2022-50943: Moodle LMS 4.0 Cross-Site Scripting via course search.php

- Priority: **Routine**
- Reason: Not severe (CVSS 5.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-05-10 · Modified: 2026-07-15
- Aliases: UBUNTU-CVE-2022-50943
- Record: https://cvemate.com/vulnerability/CVE-2022-50943 · JSON: https://cvemate.com/vulnerability/CVE-2022-50943/json

## Description

```text
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.
```

## Signals

- CVSS: 6.1 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 1.105%, percentile 66.886%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (exploit-database)

## Affected

- ubuntu moodle (Ubuntu): All versions (No fix recorded)
- moodle moodle: ≤ 4.0.0
- moodle moodle lms: 4.0

## References

- <https://www.exploit-db.com/exploits/51115>
- <https://moodle.org/>
- <https://git.in.moodle.com/moodle>
- <https://www.vulncheck.com/advisories/moodle-lms-cross-site-scripting-via-course-search-php>
- <https://ubuntu.com/security/CVE-2022-50943>
- <https://www.cve.org/CVERecord?id=CVE-2022-50943>

---

Data as of 2026-12-05T03:15:03.917Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
