# CVE-2022-40314: Moodle remote code execution

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.24%, higher than 83% of CVEs (2026-12-02)
- Published: 2022-09-30T16:29:22.000Z
- Modified: 2026-09-08T08:48:15.025Z
- Also known as: GHSA-2hmm-q272-xmhf, BIT-MOODLE-2022-40314
- Weaknesses: CWE-94, CWE-502
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: fedora

## Description

A remote code execution risk when restoring backup files originating from Moodle 1.9 was identified.

(As written by CVE List.)

## Affected

- moodle: 4.0 to 4.0.3, 3.11 to 3.11.9, 3.9 to 3.9.16 and earlier unsupported versions
- moodle/moodle (Packagist): before 3.9.17; from 3.11 before 3.11.10; from 4.0 before 4.0.4
- moodle moodle: from 3.9 before 3.9.17; from 3.11 before 3.11.10; from 4.0 before 4.0.4
- moodle (Bitnami): from 3.9.0 before 3.9.17; from 3.11.0 before 3.11.10; from 4.0.0 before 4.0.4

## Every score

- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=2128147> (advisory, issue-tracking, third-party-advisory, web)
- <https://moodle.org/mod/forum/discuss.php?d=438393> (advisory, patch, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-40314> (advisory, web)
- <https://github.com/moodle/moodle> (package)
- <http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-75405> (web)

## Sources

- CVE List: [CVE-2022-40314](https://www.cve.org/CVERecord?id=CVE-2022-40314), CVE Terms of Use, modified 2025-05-20
- GitHub Advisory Database: [GHSA-2hmm-q272-xmhf](https://github.com/advisories/GHSA-2hmm-q272-xmhf), CC-BY-4.0, modified 2024-04-23
- NVD: [CVE-2022-40314](https://nvd.nist.gov/vuln/detail/CVE-2022-40314), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-MOODLE-2022-40314](https://osv.dev/vulnerability/BIT-MOODLE-2022-40314), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-40314 · Whole record: https://cve.day/CVE-2022-40314.json · Rebuilt by cve.day 2026-11-25T22:58:15.389Z
