CVE-2018-1136: Moodle Cross-site Scripting

moodle/moodle Updated 02 Oct 2025

Summary

13/05/2022
Yes i
Moderate
4.3

CVE-2018-1136: Moodle Cross-site Scripting. Affects moodle/moodle across 4 version ranges.

>= 3.1, < 3.1.12 >= 3.2, < 3.2.9 >= 3.3, < 3.3.6 >= 3.4, < 3.4.3

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Moodle is an open-source learning management system used by educational institutions to create and deliver online courses. It provides a platform for educators to create interactive learning environments and engage with students. Moodle allows users to customize their personal dashboard by adding HTML blocks. However, a security vulnerability in Moodle versions 3.x allows authenticated users to add HTML blocks containing scripts to their Dashboard. While personal dashboards are normally visible only to the user, this vulnerability enables users to move such blocks to other pages where they can be viewed by other users.

Vulnerability Detail

The vulnerability in Moodle 3.x allows authenticated users to inject malicious scripts into HTML blocks on their personal dashboard. These scripts can then be moved to other pages where they are visible to other users. This cross-site scripting (XSS) vulnerability can be exploited to perform various attacks, such as stealing sensitive information, session hijacking, or delivering malware to unsuspecting users. The vulnerability has a CVSS score of 4.3, indicating a moderate severity level.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 3.1, < 3.1.12 3.1.12
    composer require moodle/moodle:3.1.12
  • >= 3.2, < 3.2.9 3.2.9
    composer require moodle/moodle:3.2.9
  • >= 3.3, < 3.3.6 3.3.6
    composer require moodle/moodle:3.3.6
  • >= 3.4, < 3.4.3 3.4.3
    composer require moodle/moodle:3.4.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, administrators can disable the ability for users to add HTML blocks to their personal dashboard. This can be done by modifying the Moodle configuration settings to restrict the use of HTML blocks or by implementing custom code to sanitize and validate the content of HTML blocks before allowing them to be displayed.

Conclusion

The vulnerability in Moodle 3.x allows authenticated users to inject malicious scripts into HTML blocks and move them to other pages. To mitigate this vulnerability, it is crucial to upgrade to the patched versions or implement a workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for moodle/moodle →

Share this vulnerability

FAQ

Moodle is an open-source learning management system used by educational institutions to create and deliver online courses.

Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users.

This vulnerability allows authenticated users to inject malicious scripts into HTML blocks on their personal dashboard, which can then be moved to other pages where they are visible to other users.

The consequences of this vulnerability include the potential theft of sensitive information, session hijacking, and the delivery of malware to unsuspecting users.

To protect your Moodle installation, it is recommended to upgrade to the patched versions (3.1.12, 3.2.9, 3.3.6, or 3.4.3) or implement a workaround that restricts the use of HTML blocks or sanitizes their content.

Related vulnerabilities

Recent vulnerabilities recorded for moodle/moodle.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 3.1, < 3.1.12 3.1.12
    composer require moodle/moodle:3.1.12
  • >= 3.2, < 3.2.9 3.2.9
    composer require moodle/moodle:3.2.9
  • >= 3.3, < 3.3.6 3.3.6
    composer require moodle/moodle:3.3.6
  • >= 3.4, < 3.4.3 3.4.3
    composer require moodle/moodle:3.4.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback