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

CVE-2022-35649: Moodle RCE Vulnerability via GhostScript

CVE-2022-35649 is a remote code execution vulnerability in Moodle caused by improper input validation in PostScript parsing. Attackers can exploit sites using GhostScript older than 9.50 to fully compromise systems.

Published: February 11, 2026

CVE-2022-35649 Overview

A critical remote code execution vulnerability was discovered in Moodle, the widely-used open-source learning management system. The vulnerability occurs due to improper input validation when parsing PostScript code, where an omitted execution parameter creates a security gap. This flaw specifically affects Moodle installations running GhostScript versions older than 9.50, allowing unauthenticated attackers to execute arbitrary code on vulnerable systems.

Critical Impact

Successful exploitation of this vulnerability may result in complete compromise of the vulnerable Moodle system, enabling attackers to gain full control over educational infrastructure, access sensitive student and faculty data, and potentially pivot to other systems within the network.

Affected Products

  • Moodle (multiple versions)
  • Fedora 35
  • Fedora 36

Discovery Timeline

  • 2022-07-25 - CVE-2022-35649 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-35649

Vulnerability Analysis

This vulnerability stems from improper input validation (CWE-20) that leads to code injection (CWE-94). The flaw exists in Moodle's handling of PostScript code processing, where security restrictions that should prevent arbitrary code execution are not properly enforced. The vulnerability is particularly dangerous because it can be exploited remotely without authentication, requiring no user interaction to trigger.

When Moodle processes certain file types that require GhostScript for rendering, the application fails to include necessary execution parameters that would restrict GhostScript's capabilities. This oversight allows attackers to craft malicious PostScript content that executes arbitrary system commands when processed by vulnerable GhostScript installations.

Root Cause

The root cause is an omitted execution parameter in Moodle's integration with GhostScript. When processing PostScript or related file formats, Moodle invokes GhostScript without proper sandboxing parameters, specifically missing the -dSAFER flag or equivalent security restrictions. GhostScript versions prior to 9.50 do not enable these restrictions by default, creating an exploitable condition when processing attacker-controlled PostScript content.

Attack Vector

The attack vector is network-based and does not require authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Uploading a malicious file containing crafted PostScript code to the Moodle platform through any file upload functionality
  2. When Moodle attempts to process or generate previews of the uploaded file, it invokes GhostScript
  3. The malicious PostScript code executes with the privileges of the web server process
  4. The attacker gains remote code execution capabilities on the underlying system

The vulnerability is particularly concerning in educational environments where file uploads are common, such as assignment submissions, course materials, or profile images.

Detection Methods for CVE-2022-35649

Indicators of Compromise

  • Unusual GhostScript process spawning with unexpected child processes
  • Web server processes executing shell commands or creating reverse shells
  • Suspicious file uploads containing PostScript headers or embedded commands
  • Unexpected network connections originating from the Moodle server

Detection Strategies

  • Monitor GhostScript process execution patterns and command-line arguments for missing security flags
  • Implement file upload scanning to detect malicious PostScript content before processing
  • Review web server logs for unusual file processing requests targeting image or document conversion
  • Deploy network intrusion detection rules to identify exploitation attempts and post-exploitation activity

Monitoring Recommendations

  • Enable detailed logging for file upload and processing activities within Moodle
  • Configure alerts for GhostScript invocations that spawn unexpected child processes
  • Monitor outbound network connections from the Moodle server for potential command-and-control traffic
  • Implement file integrity monitoring on critical Moodle directories and configuration files

How to Mitigate CVE-2022-35649

Immediate Actions Required

  • Upgrade GhostScript to version 9.50 or later, which includes enhanced security defaults
  • Apply the latest Moodle security patches addressing MDL-75044
  • Review and restrict file upload capabilities to minimize attack surface
  • Implement web application firewall rules to filter potentially malicious PostScript content

Patch Information

Moodle has released patches addressing this vulnerability. The fix is tracked under Moodle Commit Reference MDL-75044. Administrators should update to the latest patched versions of their respective Moodle release branches. For Fedora users, updated packages have been announced through the Fedora Package Announcements. Additional details are available in the Moodle Forum Discussion.

Workarounds

  • Upgrade GhostScript to version 9.50 or newer, which enables security restrictions by default
  • Disable file processing features that invoke GhostScript until patches can be applied
  • Restrict file upload types to exclude formats that require GhostScript processing (PS, EPS, PDF)
  • Isolate the Moodle server from critical internal network resources to limit potential impact
bash
# Verify GhostScript version and upgrade if necessary
gs --version
# Should output 9.50 or higher for secure default configuration

# Check if GhostScript SAFER mode is enabled by default
gs -dNODISPLAY -c '.currentpermissions pstack quit'

# Update GhostScript on Debian/Ubuntu systems
sudo apt-get update && sudo apt-get install ghostscript

# Update GhostScript on RHEL/CentOS/Fedora systems
sudo dnf update ghostscript

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMoodle

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability7.27%

  • 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-94

  • CWE-20
  • Technical References
  • Red Hat Bug Report #2106273

  • Fedora Package Announcement

  • Fedora Package Announcement
  • Vendor Resources
  • Moodle Commit Reference MDL-75044

  • Moodle Forum Discussion
  • Related CVEs
  • CVE-2026-26045: Moodle Backup Restore RCE Vulnerability

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

  • CVE-2025-67851: Moodle Formula Injection Vulnerability

  • CVE-2025-67847: Moodle Restore Interface RCE Vulnerability
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