CVE-2022-40313: XSS

Published Sep 20, 2022
·
Updated

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.

Other sources

Recursive rendering of Mustache template helpers containing user input could, in some cases, result in an XSS risk or a page failing to load.

NVD

Severity/Risk: Serious Versions affected: 4.0 to 4.0.3, 3.11 to 3.11.9, 3.9 to 3.9.16 and earlier unsupported versions Versions fixed: 4.0.4, 3.11.10 and 3.9.17 Reported by: Adam Roberts, NCC Group CVE identifier: CVE-2022-40313 Changes (master): http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-68066 Tracker issue: MDL-68066 Stored XSS and page denial of service risks due to recursive rendering in Mustache template helpers

Red Hat

Affected Software

9 affected componentsFixes available
composer/moodle/moodle>=4.0<4.0.4
4.0.4
composer/moodle/moodle>=3.11<3.11.10
3.11.10
composer/moodle/moodle>=3.9<3.9.17
3.9.17
Moodle moodle>=3.9.0<3.9.17
Moodle moodle>=3.11.0<3.11.10
Moodle moodle>=4.0.0<4.0.4
Fedoraproject Extra Packages For Enterprise Linux=8.0
Fedoraproject Fedora=35
Fedoraproject Fedora=36

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/moodle/moodle to a version that resolves this vulnerability.

    Fixed in 4.0.4
  2. Upgrade

    Upgrade composer/moodle/moodle to a version that resolves this vulnerability.

    Fixed in 3.11.10
  3. Upgrade

    Upgrade composer/moodle/moodle to a version that resolves this vulnerability.

    Fixed in 3.9.17
  4. Upgrade

    Upgrade Moodle to a version that resolves this vulnerability.

    Fixed in 4.0.4
  5. Upgrade

    Upgrade Moodle to a version that resolves this vulnerability.

    Fixed in 3.11.10
  6. Upgrade

    Upgrade Moodle to a version that resolves this vulnerability.

    Fixed in 3.9.17

Event History

Sep 20, 2022
Data Sourced
via Red Hat·05:16 AM
DescriptionSeverityAffected Software
Sep 30, 2022
CVE Published
via MITRE·04:34 PM
Data Sourced
via MITRE·04:34 PM
DescriptionWeakness
Data Sourced
via NVD·05:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 1, 2022
Advisory Published
via GitHub·12:00 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-40313?

CVE-2022-40313 is a vulnerability that allows recursive rendering of Mustache template helpers containing user input, potentially resulting in an XSS risk or a page failing to load.

2

What is the severity of CVE-2022-40313?

The severity of CVE-2022-40313 is high with a severity value of 7.1.

3

Which software is affected by CVE-2022-40313?

The affected software includes Moodle versions 3.9.0 to 3.9.17, 3.11.0 to 3.11.10, and 4.0.0 to 4.0.4, as well as Fedora Project Extra Packages For Enterprise Linux 8.0, Fedora 35, and Fedora 36.

4

How can CVE-2022-40313 be fixed?

To fix CVE-2022-40313, users should update their Moodle software to a secure version and apply any necessary patches or updates provided by the vendor.

5

Where can I find more information about CVE-2022-40313?

More information about CVE-2022-40313 can be found on the Red Hat Security website, Moodle Git repository, and Bugzilla.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203