{"id":"CVE-2018-1133","aliases":["EUVD-2022-5790","GHSA-xh2j-q4mc-v522","UBUNTU-CVE-2018-1133"],"status":"published","title":"Moodle calculated question type allows remote code execution by Question authors","description":"An issue was discovered in Moodle 3.x. A Teacher creating a Calculated question can intentionally cause remote code execution on the server, aka eval injection.","severity":{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.30811,"percentile":0.98262,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-94"],"published":"2018-05-25T12:00:00Z","modified":"2026-10-24T10:30:43Z","exploits":[{"source":"exploitdb","id":"EDB-46551","title":"Moodle 3.4.1 - Remote Code Execution","type":"webapps","platform":"php","date":"2019-03-15","url":"https://www.exploit-db.com/exploits/46551"},{"source":"pocgithub","id":"Feidao-fei/MOODLE-3.X-Remote-Code-Execution","title":"Feidao-fei/MOODLE-3.X-Remote-Code-Execution","date":"2020-12-26","url":"https://github.com/Feidao-fei/MOODLE-3.X-Remote-Code-Execution"},{"source":"pocgithub","id":"That-Guy-Steve/CVE-2018-1133-Exploit","title":"That-Guy-Steve/CVE-2018-1133-Exploit","date":"2023-12-20","url":"https://github.com/That-Guy-Steve/CVE-2018-1133-Exploit"},{"source":"pocgithub","id":"darrynten/MoodleExploit","title":"darrynten/MoodleExploit","date":"2019-03-15","url":"https://github.com/darrynten/MoodleExploit"}],"fixes":[{"ecosystem":"Packagist","package":"moodle/moodle","fixed_in":["3.1.12","3.2.9","3.3.6","3.4.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.1"},{"fixed":"3.1.12"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2"},{"fixed":"3.2.9"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.3"},{"fixed":"3.3.6"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.4"},{"fixed":"3.4.3"}]}]},{"source":"osv","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.1"},{"fixed":"3.1.12"}]}],"versions":["v3.1.0","v3.1.0-beta","v3.1.0-rc1","v3.1.0-rc2","v3.1.1","v3.1.10","v3.1.11","v3.1.2","v3.1.3","v3.1.4","v3.1.5","v3.1.6","v3.1.7","v3.1.8","v3.1.9"]},{"source":"osv","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2"},{"fixed":"3.2.9"}]}],"versions":["v3.2.0","v3.2.0-beta","v3.2.0-rc1","v3.2.0-rc2","v3.2.0-rc3","v3.2.0-rc4","v3.2.0-rc5","v3.2.1","v3.2.2","v3.2.3","v3.2.4","v3.2.5","v3.2.6","v3.2.7","v3.2.8"]},{"source":"osv","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.3"},{"fixed":"3.3.6"}]}],"versions":["v3.3.0","v3.3.0-beta","v3.3.0-rc1","v3.3.0-rc2","v3.3.0-rc3","v3.3.1","v3.3.2","v3.3.3","v3.3.4","v3.3.5"]},{"source":"osv","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.4"},{"fixed":"3.4.3"}]}],"versions":["v3.4.0","v3.4.0-beta","v3.4.0-rc1","v3.4.0-rc2","v3.4.0-rc3","v3.4.1","v3.4.2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7.9+dfsg-1","2.7.10+dfsg-1","2.7.11+dfsg-1","2.7.11+dfsg-2","2.7.12+dfsg-1","3.0.3+dfsg-0ubuntu1","3.0.3+dfsg-0ubuntu1+esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.3+dfsg-0ubuntu1","3.0.3+dfsg-0ubuntu1+esm1"]}],"products":[{"vendor":"moodle","product":"moodle"}],"references":[{"url":"https://moodle.org/mod/forum/discuss.php?d=371199","tags":["x_refsource_CONFIRM","x_transferred","Patch","Vendor Advisory","fix","web","report"]},{"url":"https://www.exploit-db.com/exploits/46551/","tags":["exploit","x_refsource_EXPLOIT-DB","x_transferred","Exploit","Third Party Advisory","VDB Entry","evidence"]},{"url":"http://www.securityfocus.com/bid/104307","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-1133","tags":["advisory"]},{"url":"https://www.exploit-db.com/exploits/46551","tags":["web"]},{"url":"https://github.com/advisories/GHSA-xh2j-q4mc-v522"},{"url":"https://github.com/moodle/moodle","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2018-1133","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-1133","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2018-1133","description":"An issue was discovered in Moodle 3.x. A Teacher creating a Calculated question can intentionally cause remote code execution on the server, aka eval injection.","status":"published","published":"2018-05-25T12:00:00Z","modified":"2024-08-05T03:51:48.719Z","updated_at":"2026-11-02T14:35:08.701206Z"}],"euvd":[{"id":"EUVD-2022-5790","description":"An issue was discovered in Moodle 3.x. A Teacher creating a Calculated question can intentionally cause remote code execution on the server, aka eval injection.","status":"published","published":"2018-05-25T12:00:00Z","modified":"2024-08-05T03:51:48Z","updated_at":"2026-11-03T02:40:16.309405Z"}],"ghsa":[{"id":"GHSA-xh2j-q4mc-v522","title":"Moodle calculated question type allows remote code execution by Question authors","description":"An issue was discovered in Moodle 3.x. A Teacher creating a Calculated question can intentionally cause remote code execution on the server, aka eval injection.","status":"published","published":"2022-05-13T01:18:54Z","modified":"2024-05-03T05:02:20Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:37:48.08826Z"}],"nvd":[{"id":"CVE-2018-1133","description":"An issue was discovered in Moodle 3.x. A Teacher creating a Calculated question can intentionally cause remote code execution on the server, aka eval injection.","status":"published","published":"2018-05-25T12:29:00.23Z","modified":"2026-06-17T01:50:33.543Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":6.5,"vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:04:27.507872Z"}],"osv":[{"id":"CVE-2018-1133","description":"An issue was discovered in Moodle 3.x. A Teacher creating a Calculated question can intentionally cause remote code execution on the server, aka eval injection.","status":"published","published":"2018-05-25T12:29:00.23Z","modified":"2026-10-24T10:30:43.601316742Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:07.934182Z"},{"id":"GHSA-xh2j-q4mc-v522","title":"Moodle calculated question type allows remote code execution by Question authors","description":"An issue was discovered in Moodle 3.x. A Teacher creating a Calculated question can intentionally cause remote code execution on the server, aka eval injection.","status":"published","published":"2022-05-13T01:18:54Z","modified":"2024-04-23T23:58:48.58321Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:46:59.835583Z"},{"id":"UBUNTU-CVE-2018-1133","description":"An issue was discovered in Moodle 3.x. A Teacher creating a Calculated question can intentionally cause remote code execution on the server, aka eval injection.","status":"published","published":"2018-05-25T12:29:00Z","modified":"2026-09-23T18:45:54.402933539Z","cvss":[{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:16.544091Z"}]}}
