{"id":"CVE-2022-40313","aliases":["BIT-moodle-2022-40313","EUVD-2022-7119","GHSA-jqgr-gh62-jf53","UBUNTU-CVE-2022-40313"],"status":"published","title":"Moodle Stored Cross-site Scripting and page denial of service","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.","severity":{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.00716,"percentile":0.54018,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2022-09-30T16:34:00Z","modified":"2026-10-28T02:30:57Z","fixes":[{"ecosystem":"Packagist","package":"moodle/moodle","fixed_in":["3.9.17","3.11.10","4.0.4"],"sources":["ghsa","osv"]},{"ecosystem":"Bitnami","package":"moodle","fixed_in":["3.9.17","3.11.10","4.0.4"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.9"},{"fixed":"3.9.17"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.11"},{"fixed":"3.11.10"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0"},{"fixed":"4.0.4"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"moodle","ranges":[{"type":"SEMVER","events":[{"introduced":"3.9.0"},{"fixed":"3.9.17"},{"introduced":"3.11.0"},{"fixed":"3.11.10"},{"introduced":"4.0.0"},{"fixed":"4.0.4"}]}]},{"source":"osv","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.9"},{"fixed":"3.9.17"}]}],"versions":["v3.9.0","v3.9.0-beta","v3.9.0-rc1","v3.9.0-rc2","v3.9.0-rc3","v3.9.1","v3.9.10","v3.9.11","v3.9.12","v3.9.13","v3.9.14","v3.9.15","v3.9.16","v3.9.2","v3.9.3","v3.9.4","v3.9.5","v3.9.6","v3.9.7","v3.9.8","v3.9.9"]},{"source":"osv","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.11"},{"fixed":"3.11.10"}]}],"versions":["v3.11.0","v3.11.0-beta","v3.11.0-rc1","v3.11.0-rc2","v3.11.1","v3.11.2","v3.11.3","v3.11.4","v3.11.5","v3.11.6","v3.11.7","v3.11.8","v3.11.9"]},{"source":"osv","ecosystem":"Packagist","package":"moodle/moodle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0"},{"fixed":"4.0.4"}]}],"versions":["v4.0.0","v4.0.0-beta","v4.0.0-rc1","v4.0.0-rc2","v4.0.0-rc3","v4.0.0-rc4","v4.0.1","v4.0.2","v4.0.3"]},{"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":"fedoraproject","product":"extra_packages_for_enterprise_linux"},{"vendor":"fedoraproject","product":"fedora"},{"vendor":"moodle","product":"moodle"}],"references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2128146","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Third Party Advisory","advisory","report","web"]},{"url":"https://moodle.org/mod/forum/discuss.php?d=438392","tags":["x_refsource_MISC","x_transferred","Patch","Vendor Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40313","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-jqgr-gh62-jf53"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/40xxx/CVE-2022-40313.json","tags":["advisory"]},{"url":"https://github.com/moodle/moodle","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2022-40313","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-40313","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2022-40313","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.","status":"published","published":"2022-09-30T16:34:00Z","modified":"2025-05-20T18:20:46.944Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high","assessor":"adp"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:34:30.842561Z"}],"euvd":[{"id":"EUVD-2022-7119","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.","status":"published","published":"2022-09-30T16:34:00Z","modified":"2025-05-20T18:20:46Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high"}],"updated_at":"2026-11-02T20:32:42.960442Z"}],"ghsa":[{"id":"GHSA-jqgr-gh62-jf53","title":"Moodle Stored Cross-site Scripting and page denial of service","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an Cross-site Scripting risk or a page failing to load.","status":"published","published":"2022-10-01T00:00:20Z","modified":"2024-04-23T23:35:48Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:44.867253Z"}],"nvd":[{"id":"CVE-2022-40313","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.","status":"published","published":"2022-09-30T17:15:13.357Z","modified":"2026-06-17T05:01:17.847Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high","assessor":"primary"},{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:07:29.026521Z"}],"osv":[{"id":"CVE-2022-40313","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.","status":"published","published":"2022-09-30T16:34:00Z","modified":"2026-10-28T02:30:57.179180857Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high"}],"updated_at":"2026-11-02T15:44:26.860704Z"},{"id":"GHSA-jqgr-gh62-jf53","title":"Moodle Stored Cross-site Scripting and page denial of service","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an Cross-site Scripting risk or a page failing to load.","status":"published","published":"2022-10-01T00:00:20Z","modified":"2024-04-23T23:58:40.931558Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:50.687609Z"},{"id":"UBUNTU-CVE-2022-40313","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.","status":"published","published":"2022-09-30T17:15:00Z","modified":"2026-09-23T18:45:45.590656656Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high"},{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","level":"high"}],"updated_at":"2026-11-02T16:53:55.502114Z"},{"id":"BIT-moodle-2022-40313","description":"Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.","status":"published","published":"2024-03-06T11:02:59.01Z","modified":"2026-09-08T08:48:15.038732946Z","updated_at":"2026-11-02T15:28:33.469426Z"}]}}
