CVE-2022-50943: Moodle LMS 4.0 Cross-Site Scripting via course search.php
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.
Security readout for executives and security teams
Plain-English summary
Moodle LMS 4.0 has a cross-site scripting issue in the course search page. An unauthenticated attacker may be able to place script content in a search parameter, which can run in another user's browser if they interact with it. The main business risk is account/session compromise and user trust impact.
Executive priority
Handle this as a moderate-priority web application risk. It is not listed as KEV, but public exploit availability and unauthenticated reachability make timely validation and upgrade planning appropriate.
Technical view
The CVE describes CWE-79 reflected XSS in Moodle LMS 4.0 course/search.php through the search parameter. CVSS 3.1 is 6.1 with network access, low complexity, no privileges, required user interaction, changed scope, and low confidentiality and integrity impact. Sources do not identify a specific fixed version.
Likely exposure
Exposure is limited to Moodle LMS 4.0 instances where course/search.php is reachable, especially internet-facing portals. The provided sources do not claim other Moodle versions are affected.
Exploitation context
A public ExploitDB reference exists, so defenders should assume exploit details are public. The source bundle says KEV is false, and no cited source confirms active exploitation in the wild.
Researcher notes
Evidence supports Moodle LMS 4.0 only, with XSS through the course search parameter. Avoid broad version claims. The bundle names ExploitDB and VulnCheck, but does not include vendor patch details or proof of active exploitation.
Mitigation direction
Inventory Moodle deployments and identify any running Moodle LMS 4.0.
Check official Moodle security guidance for the fixed version or supported remediation.
Upgrade or apply Moodle-supported remediation once confirmed by official guidance.
Monitor course search requests for suspicious script-like input patterns.
Use browser and session hardening controls as defense in depth.
Validation and detection
Confirm whether any deployed Moodle instance reports version 4.0.
Verify whether course/search.php is reachable by unauthenticated users.
Review web logs for unusual search parameter values on course/search.php.
Confirm remediation by retesting with safe, non-executing XSS test strings.
Document remaining exposed instances and compensating controls.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-79: User-session and phishing behavior lookup
Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-79 · source CWE mapping
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.