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-0335

CVE-2022-0335: Moodle CSRF Vulnerability

CVE-2022-0335 is a cross-site request forgery flaw in Moodle's badge alignment deletion feature that lacks proper token validation. This article covers the technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-0335 Overview

A Cross-Site Request Forgery (CSRF) vulnerability was discovered in Moodle's "delete badge alignment" functionality. The flaw exists because this feature does not include the necessary token check to prevent unauthorized cross-site requests. An attacker could exploit this vulnerability by crafting a malicious web page that, when visited by an authenticated Moodle user, would trigger unauthorized badge alignment deletions without the user's knowledge or consent.

Critical Impact

This CSRF vulnerability allows attackers to perform unauthorized actions on behalf of authenticated Moodle users, potentially manipulating badge alignments and compromising the integrity of the learning management system's credentialing features.

Affected Products

  • Moodle versions 3.11 to 3.11.4
  • Moodle versions 3.10 to 3.10.8
  • Moodle versions 3.9 to 3.9.11 and earlier unsupported versions

Discovery Timeline

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

Technical Details for CVE-2022-0335

Vulnerability Analysis

This vulnerability is classified as CWE-352 (Cross-Site Request Forgery). The core issue lies in the missing anti-CSRF token validation within the badge alignment deletion functionality. When a user performs the delete badge alignment action, the application fails to verify that the request originated from a legitimate user session with a valid CSRF token.

In a properly secured implementation, state-changing operations like deletions should require a unique, unpredictable token that is tied to the user's session. This token must be validated server-side before processing the request. The absence of this validation in the affected Moodle versions creates an attack surface where malicious actors can forge requests.

Root Cause

The root cause of CVE-2022-0335 is the absence of CSRF token verification in the badge alignment deletion endpoint. Moodle's badge system allows administrators and users to manage badge alignments (connections between badges and external frameworks or competencies). The delete functionality accepts requests without validating that they include a session-specific CSRF token, allowing any authenticated request to be processed regardless of its origin.

Attack Vector

The attack requires user interaction - specifically, the victim must be authenticated to a vulnerable Moodle instance and must visit a malicious web page controlled by the attacker. The attack flow involves:

  1. The attacker identifies a target Moodle installation running a vulnerable version
  2. The attacker creates a malicious web page containing a hidden form or JavaScript that submits a request to the Moodle delete badge alignment endpoint
  3. When an authenticated Moodle user visits the malicious page, their browser automatically sends the forged request along with their valid session cookies
  4. The Moodle server processes the request as legitimate since it cannot distinguish between the forged request and a genuine user action

The vulnerability does not require any privileges on the attacker's part, only that they can induce a victim to visit their malicious page. For detailed technical information, refer to the Moodle Security Advisory.

Detection Methods for CVE-2022-0335

Indicators of Compromise

  • Unexpected or unauthorized deletions of badge alignments in the Moodle database
  • Unusual referrer headers in web server logs showing external domains triggering badge alignment deletions
  • User reports of badge alignment modifications they did not perform
  • Audit log entries showing badge alignment deletions without corresponding legitimate user activity

Detection Strategies

  • Monitor Moodle audit logs for badge alignment deletion events and correlate with user activity patterns
  • Implement web application firewall (WAF) rules to detect potential CSRF attack patterns targeting badge endpoints
  • Review web server access logs for suspicious referrer headers on state-changing endpoints
  • Deploy SentinelOne Singularity platform for endpoint monitoring to detect malicious web page access patterns

Monitoring Recommendations

  • Enable verbose logging for the Moodle badges module to capture all badge-related operations
  • Configure alerts for bulk or rapid badge alignment deletions that may indicate automated exploitation
  • Monitor for anomalous user session behavior where actions occur without corresponding navigation patterns
  • Implement real-time log analysis to identify CSRF exploitation attempts across the learning management system

How to Mitigate CVE-2022-0335

Immediate Actions Required

  • Upgrade Moodle to version 3.11.5 or later, 3.10.9 or later, or 3.9.12 or later immediately
  • Review Moodle audit logs to identify any potential exploitation prior to patching
  • Conduct an assessment of badge alignment data integrity to detect any unauthorized modifications
  • Educate users about the risks of clicking unknown links while authenticated to Moodle

Patch Information

Moodle has released security updates to address this vulnerability. Organizations should upgrade to the following patched versions:

  • Moodle 3.11.5 or later for the 3.11.x branch
  • Moodle 3.10.9 or later for the 3.10.x branch
  • Moodle 3.9.12 or later for the 3.9.x branch

For detailed patch information and upgrade instructions, refer to the Moodle Security Forum Discussion and the Red Hat Bug Report.

Workarounds

  • Implement additional WAF rules to validate referrer headers on sensitive Moodle endpoints as a temporary measure
  • Restrict access to the badge management functionality to trusted internal networks until patching is complete
  • Enable SameSite cookie attributes to Strict or Lax in Moodle's configuration to provide partial CSRF protection
  • Consider temporarily disabling the badge alignment feature if it is not critical to operations until the patch can be applied
bash
# Check current Moodle version
cd /path/to/moodle
php admin/cli/cfg.php --name=release

# Verify CSRF protection configuration in Moodle config.php
grep -i "sesskey" config.php

# Review badge-related log entries for suspicious activity
grep -i "badge" /path/to/moodle/moodledata/temp/logs/*.log

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

  • Vulnerability Details
  • TypeCSRF

  • Vendor/TechMoodle

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.17%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-352
  • Technical References
  • Red Hat Bug Report #2043666
  • Vendor Resources
  • Moodle Forum Discussion #431103
  • Related CVEs
  • CVE-2026-30884: Moodle CustomCert Info Disclosure Flaw

  • CVE-2026-26045: Moodle Backup Restore RCE Vulnerability

  • CVE-2026-26046: Moodle TeX Filter RCE Vulnerability

  • CVE-2026-26047: Moodle TeX Editor DOS Vulnerability
Default Legacy - Prefooter | 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