Skip to content

Write-ups

Moodle

Every publicly disclosed report for Moodle and what kind of bugs they were.

disclosed reports
10
most reported class
XSS
bug classes found
4

Disclosed reports

Newest first. Only what Moodle chose to make public.

RCE

PreAuth RCE in Moodle Part I PHP Object Injection in Shibboleth Module

The Shibboleth logout handler deserialises session files using a regex-based parser that can be tricked into treating part of a session value as a new key, leading to PHP object injection. An unauthenticated attacker could store a crafted value in their session and trigger deserialisation of arbitrary objects, potentially leading to remote code execution.

Moodle

Account takeover

PreAuth RCE in Moodle Part II Session Hijack in Moodle's Shibboleth

The Shibboleth logout handler in Moodle, when database sessions are used, decodes every active session and leaves the last one loaded in the attacker's session, allowing an unauthenticated attacker to hijack a random user's session. By repeating the attack, an attacker could obtain an admin session and then achieve remote code execution.

Moodle

XSS

Obtaining XSS using moodle featured and minor bugs

Moodle allowed users to embed arbitrary HTML and JavaScript in their personal dashboards, which is normally only visible to themselves. By combining this with a login CSRF and a technique using duplicate session cookies with different paths, an attacker could run JavaScript in the context of another user's session, including an administrator, and upload a malicious plugin to gain shell access.

Moodle

RCE

Back To School - Exploiting A Remote Code Execution Vulnerability In Moodle

Moodle's calculated-question answer formulas were passed to PHP eval() after a weak sanitiser that only allowed a small set of maths functions and operators. The authors bypassed it by building function names as strings from NAN values and XOR, then used variable substitution to supply the call parentheses, achieving remote code execution.

Moodle

XSS

Playing Dominos with Moodle's Security (2/2)

A self-XSS in Moodle's WYSIWYG editor could be turned into a stored XSS via the autosave feature, and when OAuth authentication is enabled, an attacker could craft a link that logs a victim into the attacker's account and then executes the stored payload, leading to account takeover.

Moodle

XSS

Playing Dominos with Moodle's Security (1/2)

An unauthenticated attacker could create arbitrary folders on a Moodle server due to unsanitised input in the 'rev' parameter, leading to stored XSS in the admin panel when a folder name containing JavaScript is reflected. This XSS could then be escalated to remote code execution by installing a malicious plugin.

Moodle

SQL injection

Exploitation Summary

Moodle's badge criteria functionality allows a user with Teacher privileges to inject SQL into a badge criterion field, which is later executed unsanitised when the badge is enabled. An attacker could use this to run arbitrary SQL queries against the database.

Moodle

XSS

Vulnerability analysis

A stored cross-site scripting (XSS) vulnerability existed in Moodle's Feedback activity because user-supplied text was HTML-encoded on input but then decoded during rendering, allowing an attacker to inject malicious scripts. An authenticated student could exploit this to take over other users' accounts, including teachers and administrators, and potentially trigger a blind server-side request forgery (SSRF) to interact with internal services.

Moodle

XSS

How I found Moodle Cross site scripting

A Moodle instance reflected the redirect_uri parameter without proper filtering, so a javascript: URI placed there was reflected back in the response. An attacker could craft a link that runs script in the victim's browser in the context of the site.

Moodle