Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2022-40316: SQL injection in moodle

0
Medium
VulnerabilityCVE-2022-40316cvecve-2022-40316
Published: Fri Sep 30 2022 (09/30/2022, 16:37:12 UTC)
Source: CVE
Vendor/Project: n/a
Product: moodle

Description

The H5P activity attempts report did not filter by groups, which in separate groups mode could reveal information to non-editing teachers about attempts/users in groups they should not have access to.

AI-Powered Analysis

AILast updated: 07/04/2025, 10:26:08 UTC

Technical Analysis

CVE-2022-40316 is a medium-severity vulnerability affecting multiple versions of Moodle, specifically versions 3.9 up to 3.9.16, 3.11 up to 3.11.9, and 4.0 up to 4.0.3, as well as earlier unsupported versions. The vulnerability arises from the H5P activity attempts report feature, which fails to properly filter data by user groups when Moodle is configured in separate groups mode. This misconfiguration allows non-editing teachers to access information about attempts and users belonging to groups they should not have visibility into. Although the CVE description mentions SQL injection, the core issue is an authorization bypass (CWE-862) where group-based access controls are not enforced correctly, potentially exposing sensitive user data. The CVSS 3.1 score is 4.3 (medium), reflecting that the vulnerability requires network access and low privileges (PR:L), does not require user interaction, and impacts confidentiality only (C:L), without affecting integrity or availability. There are no known exploits in the wild, and no official patches linked in the provided data, but Moodle administrators should be aware of this issue due to the sensitive nature of educational data and user privacy concerns. The vulnerability primarily impacts confidentiality by allowing unauthorized disclosure of information about student attempts and user identities across group boundaries within Moodle courses.

Potential Impact

For European organizations, especially educational institutions and e-learning providers using Moodle, this vulnerability poses a risk to the confidentiality of student and teacher data. Unauthorized disclosure of group-specific attempts and user information could lead to privacy violations under GDPR, potentially resulting in regulatory penalties and reputational damage. The exposure of such data might also undermine trust in the institution's ability to safeguard sensitive educational records. Since Moodle is widely adopted across European universities, schools, and training centers, the impact could be significant if exploited. However, the vulnerability does not allow modification or deletion of data, nor does it affect system availability, limiting the scope of damage to information disclosure. The requirement for at least teacher-level privileges to exploit the vulnerability means that external attackers without credentials are less likely to succeed, but insider threats or compromised teacher accounts could leverage this flaw to access unauthorized data.

Mitigation Recommendations

Administrators should immediately verify their Moodle version and plan to upgrade to versions beyond 4.0.3, 3.11.9, or 3.9.16 once official patches are released. In the interim, organizations should audit and restrict teacher permissions to the minimum necessary, ensuring that only authorized personnel have editing or viewing rights in courses configured with separate groups. Implementing strict role-based access controls and monitoring teacher account activities can reduce the risk of exploitation. Additionally, reviewing group configurations and testing the H5P activity attempts report for unauthorized data exposure can help identify and mitigate risks. Applying network segmentation and multi-factor authentication for teacher accounts will further reduce the likelihood of credential compromise. Finally, organizations should stay informed through Moodle security advisories and apply patches promptly when available.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.1
Assigner Short Name
fedora
Date Reserved
2022-09-09T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682cd0f71484d88663aeae41

Added to database: 5/20/2025, 6:59:03 PM

Last enriched: 7/4/2025, 10:26:08 AM

Last updated: 2/7/2026, 5:58:08 AM

Views: 29

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats