Miggo Logo

CVE-2021-36399: Moodle Cross-site Scripting vulnerability

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.70573%
Published
3/7/2023
Updated
3/13/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
moodle/moodlecomposer>= 3.11.0-beta, < 3.11.13.11.1
moodle/moodlecomposer>= 3.10.0-beta, < 3.10.53.10.5
moodle/moodlecomposer< 3.9.83.9.8

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper sanitization of ID numbers in quiz override screens. Moodle's quiz override functionality handles user/group overrides, and the ID number (user-supplied field) was displayed without adequate escaping. The 'quiz_override_row' function would be responsible for generating table rows in override interfaces, making it the most likely location where raw ID numbers were rendered. The vulnerability type (stored XSS) and affected component (quiz overrides) strongly correlate with this rendering function. While exact code isn't available, Moodle's architecture patterns and the vulnerability description indicate this as the primary candidate.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

In Moo*l*, I* num**rs *ispl*y** in t** quiz ov*rri** s*r**ns r*quir** ***ition*l s*nitizin* to pr*v*nt * stor** XSS risk.

Reasoning

T** vuln*r**ility st*ms *rom improp*r s*nitiz*tion o* I* num**rs in quiz ov*rri** s*r**ns. Moo*l*'s quiz ov*rri** *un*tion*lity **n*l*s us*r/*roup ov*rri**s, *n* t** I* num**r (us*r-suppli** *i*l*) w*s *ispl*y** wit*out ***qu*t* *s**pin*. T** 'quiz_o