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

CVE-2022-50943 affects 138 listed versions of Moodle in the Dawnsentry catalogue.

6.1CVSS medium
Proof of concept publicexploitation
1%EPSS (next 30 days)
10 May 2026published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Moodle

138 of 250 listed versions are affected. No fixed release is named. The newest release, 5.3.1, is not affected.

4.0.0 4.0.0-rc4 4.0.0-rc3 3.11.18 3.11.17 3.11.16 3.11.15 3.11.14 3.11.13 3.11.12 3.11.11 3.11.10 3.11.9 3.11.8 3.11.7 3.11.6 3.11.5 3.11.4 3.10.11 3.10.10 3.10.9 3.10.8 3.10.7 3.10.6 3.10.5 3.10.4 3.10.3 3.10.2 3.10.1 3.10.0 3.10 3.9.25 3.9.24 3.9.23 3.9.22 3.9.21 3.9.20 3.9.19 3.9.18 3.9.17 3.9.16 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 3.8.2 3.8.1 3.8.0 3.8 3.7.9 3.7.8 3.7.7 and 78 more

What it is

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:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N (Vulncheck)

Published by Vulncheck on 10 May 2026. Last changed 25 July 2026.

Sources

Check one version you run: look CVE-2022-50943 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.