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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2020-25627

CVE-2020-25627: Moodle Stored XSS Vulnerability

CVE-2020-25627 is a stored XSS vulnerability in Moodle's moodlenetprofile user profile field that allows malicious script injection. This post covers the technical details, affected versions 3.9 to 3.9.1, and mitigation.

Published: March 4, 2026

CVE-2020-25627 Overview

CVE-2020-25627 is a stored Cross-Site Scripting (XSS) vulnerability affecting the Moodle learning management system. The moodlenetprofile user profile field lacked proper sanitization, allowing attackers to inject and store malicious JavaScript code that would execute in the browsers of other users viewing the affected profile.

Critical Impact

Attackers can inject persistent malicious scripts into user profile fields, potentially compromising user sessions, stealing credentials, or performing actions on behalf of authenticated users within the Moodle platform.

Affected Products

  • Moodle version 3.9
  • Moodle version 3.9.1

Discovery Timeline

  • 2020-12-09 - CVE CVE-2020-25627 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-25627

Vulnerability Analysis

This vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation), commonly known as Cross-Site Scripting. The flaw exists in how Moodle handles user-supplied input in the moodlenetprofile field, which is used to store Moodle.net profile information.

The vulnerability requires user interaction—a victim must view a page containing the malicious profile content for the attack to succeed. When exploited, the injected script runs within the context of the victim's authenticated session, potentially allowing attackers to steal session cookies, redirect users to malicious sites, or perform unauthorized actions within the Moodle platform.

The scope is changed, meaning the vulnerability in Moodle can impact resources beyond the vulnerable component itself, such as the user's browser or other web applications accessed in the same session.

Root Cause

The root cause of this vulnerability is insufficient input sanitization in the moodlenetprofile user profile field. When users enter data into this field, Moodle failed to properly encode or filter potentially dangerous HTML and JavaScript content before storing it in the database and rendering it on profile pages.

Stored XSS vulnerabilities are particularly dangerous in learning management systems like Moodle because:

  • User profiles are frequently viewed by instructors, administrators, and other students
  • Educational platforms often have privileged users with elevated access rights
  • The persistent nature of stored XSS means the attack payload remains active until manually removed

Attack Vector

The attack vector is network-based, requiring no special privileges to exploit. An attacker would:

  1. Create or modify a Moodle user account
  2. Navigate to the profile settings containing the moodlenetprofile field
  3. Insert malicious JavaScript code into the field instead of a legitimate Moodle.net profile URL
  4. Save the profile changes

When another user views the attacker's profile page, the malicious script executes in their browser context. This could be used to:

  • Hijack user sessions by stealing authentication cookies
  • Perform actions as the victim user (such as changing grades if the victim is an instructor)
  • Redirect users to phishing pages
  • Deface content visible to the victim

The vulnerability does not require authentication to trigger (only to plant the payload), and the attack complexity is low, making this accessible to attackers with minimal technical expertise.

Detection Methods for CVE-2020-25627

Indicators of Compromise

  • Unusual JavaScript content stored in user profile moodlenetprofile fields in the Moodle database
  • Profile fields containing HTML tags such as <script>, <img onerror=, <svg onload=, or other event handlers
  • Unexpected outbound connections originating from client browsers when viewing user profiles
  • Reports from users about browser redirects or pop-ups when viewing certain profiles

Detection Strategies

  • Implement database queries to scan the moodlenetprofile field for suspicious patterns including script tags and JavaScript event handlers
  • Deploy Web Application Firewall (WAF) rules to detect and block XSS payloads in form submissions
  • Enable Content Security Policy (CSP) headers to restrict script execution and receive violation reports
  • Monitor server logs for unusual patterns in profile update requests

Monitoring Recommendations

  • Configure browser Content Security Policy violation reporting to identify potential XSS attempts
  • Implement real-time alerting for database modifications to user profile fields containing script-like content
  • Review access logs for profiles that receive unusually high view counts, which may indicate attackers testing their payload
  • Deploy endpoint detection to identify session token exfiltration attempts

How to Mitigate CVE-2020-25627

Immediate Actions Required

  • Upgrade Moodle to version 3.9.2 or later immediately
  • Audit existing user profiles for malicious content in the moodlenetprofile field
  • Review administrator and instructor accounts for signs of compromise
  • Implement Content Security Policy headers to mitigate impact of any existing stored XSS

Patch Information

Moodle has released version 3.9.2 which addresses this vulnerability by implementing proper input sanitization for the moodlenetprofile user profile field. Organizations should upgrade to this version or later as soon as possible.

For detailed patch information and the official security announcement, see the Moodle Discussion Forum.

Workarounds

  • If immediate patching is not possible, consider disabling or hiding the moodlenetprofile field through Moodle's user profile field configuration
  • Implement strict Content Security Policy headers with script-src 'self' to prevent inline script execution
  • Deploy a Web Application Firewall (WAF) with XSS filtering rules in front of the Moodle installation
  • Sanitize existing profile data by running database queries to identify and clean potentially malicious entries
bash
# Example: Database query to identify potentially malicious moodlenetprofile entries
# Run this in your Moodle database to find suspicious content
SELECT id, userid, data FROM mdl_user_info_data 
WHERE fieldid = (SELECT id FROM mdl_user_info_field WHERE shortname = 'moodlenetprofile')
AND (data LIKE '%<script%' OR data LIKE '%javascript:%' OR data LIKE '%onerror%' OR data LIKE '%onload%');

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechMoodle

  • SeverityMEDIUM

  • CVSS Score6.1

  • EPSS Probability5.35%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Vendor Resources
  • Moodle Discussion Forum
  • Related CVEs
  • CVE-2022-50943: Moodle LMS 4.0 XSS Vulnerability

  • CVE-2025-67855: Moodle Reflected XSS Vulnerability

  • CVE-2025-67849: Moodle AI Prompt XSS Vulnerability

  • CVE-2025-67850: Moodle Formula Editor XSS 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