CVE-2022-40313Moodle
High 7.1 No auth needed
Follow: this CVE · Moodle · Moodle We alert you by email or Slack (account required).
- Priority
- 58
- CVSS 3.1
- 7.1
- EPSS
- 0.8% probability of exploitation in 30 days · percentile 51
- Auth required
- No
- Published
- Sep 30, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
What happens
Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.
What to do
- Apply the vendor's security update for Moodle.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | moodle/moodle |
≥ 3.9 < 3.9.17 |
3.9.17 |
composer require "moodle/moodle:^3.9.17" |
| Packagist | moodle/moodle |
≥ 3.11 < 3.11.10 |
3.11.10 |
composer require "moodle/moodle:^3.11.10" |
| Packagist | moodle/moodle |
≥ 4.0 < 4.0.4 |
4.0.4 |
composer require "moodle/moodle:^4.0.4" |
Per OSV / GitHub Advisories (GHSA-jqgr-gh62-jf53). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| moodle | moodle | ≥ 3.9.0 < 3.9.17 |
| moodle | moodle | ≥ 3.11.0 < 3.11.10 |
| moodle | moodle | ≥ 4.0.0 < 4.0.4 |
| fedoraproject | extra_packages_for_enterprise_linux | 8.0 |
| fedoraproject | fedora | 35 |
| fedoraproject | fedora | 36 |
Official sources
References
Links published by the sources. Open them with care.
- bugzilla.redhat.com Issue Tracking Third Party Advisory
- moodle.org Patch Vendor Advisory