In a shared hosting environment that has been misconfigured to allow access to other users' content, a Moodle user who also has direct access to the web server outside of the Moodle webroot could utilise a local file include to achieve remote code execution.
https://moodle.org/mod/forum/discuss.php?d=451591
https://bugzilla.redhat.com/show_bug.cgi?id=2243452
http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-72249