Miggo Logo

CVE-2022-30596: Cross-site Scripting in moodle

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.77998%
Published
5/19/2022
Updated
9/12/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>= 4.0, < 4.0.14.0.1
moodle/moodlecomposer>= 3.11, < 3.11.73.11.7
moodle/moodlecomposer>= 3.10, < 3.10.113.10.11
moodle/moodlecomposer>= 3.9, < 3.9.143.9.14

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The GitHub patch shows the vulnerability was fixed by adding the s() sanitization function to $summary->user->$extrafield in mod/assign/classes/output/renderer.php. The absence of output escaping in the original code (CWE-79) made this function vulnerable. The commit message explicitly references escaping identity fields in the 'allocate marker form', and the affected code path handles user identity data display during marker allocation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

* *l*w w*s *oun* in moo*l* w**r* I* num**rs *ispl*y** w**n *ulk *llo**tin* m*rk*rs to *ssi*nm*nts r*quir** ***ition*l s*nitizin* to pr*v*nt * stor** XSS risk.

Reasoning

T** *it*u* p*t** s*ows t** vuln*r**ility w*s *ix** *y ***in* t** `s()` s*nitiz*tion *un*tion to $summ*ry->us*r->$*xtr**i*l* in `mo*/*ssi*n/*l*ss*s/output/r*n**r*r.p*p`. T** **s*n** o* output *s**pin* in t** ori*in*l *o** (*W*-**) m*** t*is *un*tion v