The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-0332

CVE-2022-0332: Moodle SQL Injection Vulnerability

CVE-2022-0332 is an SQL injection flaw in Moodle's h5p activity web service that affects versions 3.11 to 3.11.4. Attackers can exploit this to access unauthorized data. This article covers technical details, impact, and mitigation.

Published: February 17, 2026

CVE-2022-0332 Overview

A SQL injection vulnerability was discovered in Moodle, the popular open-source learning management system. The flaw exists in versions 3.11 to 3.11.4 within the H5P activity web service responsible for fetching user attempt data. This vulnerability allows remote attackers to execute arbitrary SQL commands against the underlying database without authentication, potentially leading to complete database compromise, data exfiltration, and unauthorized access to sensitive educational records.

Critical Impact

Unauthenticated remote attackers can exploit this SQL injection vulnerability to extract sensitive data, modify database contents, or potentially achieve remote code execution on the underlying server.

Affected Products

  • Moodle versions 3.11 to 3.11.4

Discovery Timeline

  • 2022-01-25 - CVE-2022-0332 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-0332

Vulnerability Analysis

This vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command) allows attackers to inject malicious SQL statements through the H5P activity web service. The H5P module in Moodle provides interactive content capabilities, and its web service endpoint for retrieving user attempt data fails to properly sanitize input parameters before incorporating them into database queries.

The vulnerability is particularly dangerous because it requires no authentication to exploit. An attacker can craft malicious requests to the vulnerable web service endpoint, injecting SQL payloads that bypass input validation and execute directly against the Moodle database. This could result in unauthorized access to student records, grades, personal information, and administrative credentials.

Root Cause

The root cause of this vulnerability lies in insufficient input validation and parameterization within the H5P activity web service. User-supplied data used to fetch attempt information is directly concatenated into SQL queries rather than being properly escaped or handled through prepared statements with bound parameters.

Attack Vector

The attack vector is network-based, requiring no user interaction and no privileges. An attacker can send crafted HTTP requests to the vulnerable H5P web service endpoint, embedding SQL injection payloads within the parameters used to query user attempt data.

The exploitation process involves identifying the vulnerable web service endpoint, crafting malicious SQL payloads designed to extract or manipulate database contents, and sending these payloads through standard HTTP requests. Successful exploitation can lead to disclosure of sensitive information including user credentials, student data, and potentially administrative access to the entire Moodle installation. For detailed technical information, refer to the Moodle Security Advisory.

Detection Methods for CVE-2022-0332

Indicators of Compromise

  • Unusual database query patterns or errors in Moodle logs, particularly related to the H5P module
  • Unexpected access patterns to the H5P activity web service endpoints
  • Database audit logs showing suspicious SELECT, UNION, or data extraction queries
  • Abnormal response times or payload sizes from H5P-related API endpoints

Detection Strategies

  • Monitor web application firewall (WAF) logs for SQL injection patterns targeting Moodle endpoints
  • Implement database activity monitoring to detect anomalous query patterns
  • Review Moodle access logs for unusual requests to /lib/ajax/service.php or H5P-related services
  • Deploy SentinelOne Singularity to detect post-exploitation activities and lateral movement

Monitoring Recommendations

  • Enable detailed logging for the Moodle H5P module and web services
  • Configure alerts for database errors indicating potential SQL injection attempts
  • Implement network-level monitoring for suspicious traffic patterns to Moodle servers
  • Review authentication logs for unauthorized access following potential exploitation

How to Mitigate CVE-2022-0332

Immediate Actions Required

  • Upgrade Moodle to version 3.11.5 or later immediately
  • Review database logs for evidence of exploitation
  • Audit user accounts and privileges for unauthorized changes
  • Consider temporarily disabling the H5P module if immediate patching is not possible

Patch Information

Moodle has released security patches addressing this vulnerability. Administrators should upgrade to Moodle 3.11.5 or later, which includes proper input sanitization for the H5P activity web service. The official security advisory is available at the Moodle Forum Discussion. Additional details can be found in the Red Hat Bug Report #2043661.

Workarounds

  • Disable the H5P activity module if not required for educational operations
  • Implement a web application firewall (WAF) with SQL injection detection rules
  • Restrict network access to Moodle web services to trusted IP ranges
  • Enable database query logging to detect exploitation attempts
bash
# Disable H5P module temporarily via Moodle CLI
php admin/cli/uninstall_plugins.php --plugins=mod_h5pactivity --run

# Or restrict access via Apache configuration
<Location "/lib/ajax/service.php">
    Require ip 192.168.1.0/24
</Location>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechMoodle

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability3.44%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Technical References
  • Red Hat Bug Report #2043661
  • Vendor Resources
  • Moodle Forum Discussion #431099
  • Related CVEs
  • CVE-2025-26533: Moodle SQL Injection Vulnerability

  • CVE-2022-0983: Moodle SQL Injection Vulnerability

  • CVE-2021-36393: Moodle SQL Injection Vulnerability

  • CVE-2026-30884: Moodle CustomCert Info Disclosure Flaw
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English