CVE-2022-30599: SQL Injection Vulnerability in Moodle

moodle Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Critical
Not published

CVE-2022-30599: A flaw was found in moodle where an SQL injection risk was identified in Badges code relating to configuring criteria. Affects moodle across 4 version ranges.

>= 3.9.0, < 3.9.14 >= 3.10.0, < 3.10.11 >= 3.11.0, < 3.11.7 >= 4.0.0, < 4.0.1

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

Also tracked for

The same CVE-2022-30599 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Moodle is an open-source learning management system (LMS) used for creating and delivering online courses. It provides a platform for educators to create interactive learning environments and engage with students. Moodle is widely adopted in educational institutions and organizations worldwide. However, a vulnerability has been identified in Moodle's Badges code, specifically in the configuration of criteria. This vulnerability allows for SQL injection attacks, which can lead to unauthorized access, data manipulation, and potential compromise of the Moodle instance.

Vulnerability Detail

The SQL injection vulnerability in Moodle's Badges code arises from improper input sanitization and validation. Attackers can exploit this vulnerability by crafting malicious SQL queries that are executed by the application's database. By injecting malicious SQL code, an attacker can bypass authentication, escalate privileges, and extract or modify sensitive data. This vulnerability poses a significant risk to the confidentiality, integrity, and availability of the Moodle instance.

How To Fix

Fixed versions by release line

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

  • >= 3.9.0, < 3.9.14 3.9.14
  • >= 3.10.0, < 3.10.11 3.10.11
  • >= 3.11.0, < 3.11.7 3.11.7
  • >= 4.0.0, < 4.0.1 4.0.1

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, it is advised to disable the Badges feature in Moodle until the system can be upgraded to the patched version. Disabling the Badges functionality will prevent potential exploitation of the SQL injection vulnerability. To disable Badges, navigate to the Moodle administration panel, locate the Badges settings, and disable the feature. Once the system is upgraded, the Badges functionality can be re-enabled.

Conclusion

The SQL injection vulnerability in Moodle's Badges code poses a significant risk to the security and integrity of Moodle instances. It is crucial to upgrade to the latest patched version of Moodle to mitigate this vulnerability. Disabling the Badges feature can serve as a temporary workaround until the upgrade is performed. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for moodle →

Share this vulnerability

FAQ

Moodle is an open-source learning management system (LMS) used for creating and delivering online courses. It provides a platform for educators to create interactive learning environments and engage with students.

The SQL injection vulnerability in Moodle's Badges code can lead to unauthorized access, data manipulation, and potential compromise of the Moodle instance. Attackers can exploit this vulnerability to bypass authentication, escalate privileges, and extract or modify sensitive data.

To fix this vulnerability, it is recommended to upgrade to the latest patched version of Moodle. The Moodle development team has released patched versions (3.9.14, 3.10.11, and 3.11.7) that address the SQL injection vulnerability.

Yes, as a temporary workaround, you can disable the Badges feature in Moodle until the system can be upgraded to the patched version. Disabling Badges prevents potential exploitation of the SQL injection vulnerability.

For more information about this vulnerability, you can refer to the official Moodle documentation, security advisories, or contact the Moodle support team.

Related vulnerabilities

Recent vulnerabilities recorded for moodle.

How To Fix

Fixed versions by release line

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

  • >= 3.9.0, < 3.9.14 3.9.14
  • >= 3.10.0, < 3.10.11 3.10.11
  • >= 3.11.0, < 3.11.7 3.11.7
  • >= 4.0.0, < 4.0.1 4.0.1

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