{"id":"CVE-2021-20187","aliases":["CVE-2021-20187","GHSA-2jrm-gww7-wch2","BIT-MOODLE-2021-20187"],"related":[],"kind":"vulnerability","state":"published","title":"Moodle Arbitrary PHP code execution by site admins via Shibboleth configuration","summary":"It was found in Moodle before version 3.10.1, 3.9.4, 3.8.7 and 3.5.16 that it was possible for site administrators to execute arbitrary PHP scripts via a PHP include used during Shibboleth authentication.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"It was found in Moodle before version 3.10.1, 3.9.4, 3.8.7 and 3.5.16 that it was possible for site administrators to execute arbitrary PHP scripts via a PHP include used during Shibboleth authentication.","source":"cvelist"},{"lang":"es","text":"Se encontró en Moodle versiones anteriores a 3.10.1, 3.9.4, 3.8.7 y 3.5.16, que era posible para los administradores del sitio ejecutar scripts PHP arbitrarios por medio de una inclusión PHP usada durante la autenticación Shibboleth","source":"nvd"}],"published":"2021-01-28T18:30:03.000Z","modified":"2026-09-08T08:48:14.748Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-94","CWE-829"],"affected":[{"ranges":[{"version":"moodle 3.10.1, moodle 3.9.4, moodle 3.8.7, moodle 3.5.16","status":"affected"}],"product":"moodle","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.5","status":"affected","fixed":"3.5.16"}],"ecosystem":"Packagist","package":"moodle/moodle","purl":"pkg:composer/moodle/moodle","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.8","status":"affected","fixed":"3.8.7"}],"ecosystem":"Packagist","package":"moodle/moodle","purl":"pkg:composer/moodle/moodle","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.9","status":"affected","fixed":"3.9.4"}],"ecosystem":"Packagist","package":"moodle/moodle","purl":"pkg:composer/moodle/moodle","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.10","status":"affected","fixed":"3.10.1"}],"ecosystem":"Packagist","package":"moodle/moodle","purl":"pkg:composer/moodle/moodle","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.5.16"},{"status":"affected","introduced":"3.8.0","fixed":"3.8.7"},{"status":"affected","introduced":"3.9.0","fixed":"3.9.4"},{"status":"affected","version":"3.10.0"}],"vendor":"moodle","product":"moodle","cpe":"cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.5.16"},{"type":"semver","introduced":"3.8.0","status":"affected","fixed":"3.8.7"},{"type":"semver","introduced":"3.9.0","status":"affected","fixed":"3.9.4"},{"type":"semver","introduced":"3.10.0","status":"affected","fixed":"3.10.1"}],"ecosystem":"Bitnami","package":"moodle","purl":"pkg:bitnami/moodle","source":"bitnami"}],"references":[{"url":"https://moodle.org/mod/forum/discuss.php?d=417171","tags":["advisory","patch","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-20187","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/moodle/moodle","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"redhat","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-20187","url":"https://www.cve.org/CVERecord?id=CVE-2021-20187","licence":"CVE Terms of Use","modified":"2024-08-03T17:30:07.535Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2jrm-gww7-wch2","url":"https://github.com/advisories/GHSA-2jrm-gww7-wch2","licence":"CC-BY-4.0","modified":"2024-04-23T23:58:35.180Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-20187","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-20187","licence":"Public domain","modified":"2026-06-17T03:33:26.390Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-MOODLE-2021-20187","url":"https://osv.dev/vulnerability/BIT-MOODLE-2021-20187","licence":"Apache-2.0","modified":"2026-09-08T08:48:14.748Z"}],"updatedAt":"2026-11-25T22:57:59.749Z","epss":{"score":0.01591,"percentile":0.76426,"date":"2026-12-02T12:00:21.000Z"}}