Miggo Logo

CVE-2018-1137:
Moodle Portfolio script allows instantiation of class chosen by user

8.1

CVSS Score
3.0

Basic Information

EPSS Score
0.64927%
Published
5/14/2022
Updated
4/23/2024
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
moodle/moodlecomposer>= 3.1, < 3.1.123.1.12
moodle/moodlecomposer>= 3.2, < 3.2.93.2.9
moodle/moodlecomposer>= 3.3, < 3.3.63.3.6
moodle/moodlecomposer>= 3.4, < 3.4.33.4.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper input validation in portfolio handling code. Moodle's portfolio system allowed user-controlled 'portfolio' parameters to directly determine which class to instantiate. The functions in portfolio/export.php that handle these requests would:

  1. Accept user-supplied class names via URL parameters
  2. Instantiate them without verifying if they're valid portfolio classes
  3. Enable attackers to instantiate arbitrary classes (including non-portfolio classes)

This matches the CWE-20 pattern and explains both the DDoS potential (through resource-intensive class instantiation) and the arbitrary class execution risk. The file paths and function names are consistent with Moodle's portfolio architecture and vulnerability description, though exact implementation details are inferred from security advisory patterns.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*n issu* w*s *is*ov*r** in Moo*l* *.x. *y su*stitutin* URLs in port*olios, us*rs **n inst*nti*t* *ny *l*ss. T*is **n *lso ** *xploit** *y us*rs w*o *r* lo**** in *s *u*sts to *r**t* * **oS *tt**k.

Reasoning

T** vuln*r**ility st*ms *rom improp*r input v*li**tion in port*olio **n*lin* *o**. Moo*l*'s port*olio syst*m *llow** us*r-*ontroll** 'port*olio' p*r*m*t*rs to *ir**tly **t*rmin* w*i** *l*ss to inst*nti*t*. T** *un*tions in port*olio/*xport.p*p t**t *