Moodle XML import of ddwtos could lead to intentional remote code execution
Impact
moodle before versions 3.5.2, 3.4.5, 3.3.8, 3.1.14 is vulnerable to an XML import of ddwtos could lead to intentional remote code execution. When importing legacy 'drag and drop into text' (ddwtos) type quiz questions, it was possible to inject and execute PHP code from within the imported questions, either intentionally or by importing questions from an untrusted source.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 3.5.0 before 3.5.2Ecosystem versions | 3.5.2 |
| From 3.4.0 before 3.4.5Ecosystem versions | 3.4.5 |
| From 3.2.0 before 3.3.8Ecosystem versions | 3.3.8 |
| Earlier releases before 3.1.14Ecosystem versions | 3.1.14 |
Version evidence: OSV · GHSA-c3pr-h96w-2jjg
View original version evidence (162 explicit versions)
Original source description
moodle before versions 3.5.2, 3.4.5, 3.3.8, 3.1.14 is vulnerable to an XML import of ddwtos could lead to intentional remote code execution. When importing legacy 'drag and drop into text' (ddwtos) type quiz questions, it was possible to inject and execute PHP code from within the imported questions, either intentionally or by importing questions from an untrusted source.
References
- Security advisory nvd.nist.gov/vuln/detail/CVE-2018-14630
- Patch github.com/moodle/moodle/commit/09cbca8566a388e8f0a1a0cfd86cd0667088ed2c
- Patch github.com/moodle/moodle/commit/be092b730910ad97fff0511e177a097ec1cc4b1c
- Patch github.com/moodle/moodle/commit/cb8aefa658cf7ad8f002a480343afb2dea94cc08
- Patch github.com/moodle/moodle/commit/cfc4393aa689c277a27b9a040ff7dcbdac4e41dd
- Patch github.com/moodle/moodle/commit/da1eeea0ff3d292b7669e478abc114872dd9cc8f
- Source reference bugzilla.redhat.com/show_bug.cgi
- Source reference github.com/moodle/moodle
- Source reference moodle.org/mod/forum/discuss.php
- Source reference seclists.org/fulldisclosure/2018/Sep/28
- Security advisory web.archive.org/web/20200227111301/https://www.securityfocus.com/bid/105354
- Security advisory www.sec-consult.com/en/blog/advisories/remote-code-execution-php-unserialize-moodle-open-source-learning-platform-cve-2018-14630
- Source reference git.moodle.org/gw