CVE-2025-34031: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Moodle Jmol Plugin
A path traversal vulnerability exists in the Moodle LMS Jmol plugin version 6.1 and prior via the query parameter in jsmol.php. The script directly passes user input to the file_get_contents() function without proper validation, allowing attackers to read arbitrary files from the server's filesystem by crafting a malicious query value. This vulnerability can be exploited without authentication and may expose sensitive configuration data, including database credentials. Exploitation evidence was observed by the Shadowserver Foundation on 2025-02-02 UTC.
AI Analysis
Technical Summary
CVE-2025-34031 is a path traversal vulnerability identified in the Moodle Learning Management System's Jmol plugin, specifically affecting version 6.1 and prior. The vulnerability arises from improper input validation in the jsmol.php script, where a query parameter is directly passed to the PHP function file_get_contents() without sanitization or restriction. This flaw allows an attacker to craft a malicious query string that traverses directories on the server's filesystem, enabling the reading of arbitrary files. Since the vulnerability does not require authentication or user interaction, it can be exploited remotely by any attacker with network access to the Moodle instance. The exposure of sensitive files, including configuration files and database credentials, can lead to further compromise of the system and data breaches. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N) reflects a high-severity rating of 8.7, emphasizing the ease of exploitation and the significant confidentiality impact. The Shadowserver Foundation observed exploitation attempts in October 2025, confirming active interest by threat actors. No patches or official fixes have been released at the time of this report, increasing the urgency for mitigation. The vulnerability is classified under CWE-22, which pertains to improper limitation of pathname to a restricted directory, a common and critical web application security issue. Given Moodle's widespread use in educational institutions worldwide, the vulnerability poses a substantial risk to the confidentiality and integrity of educational data and infrastructure.
Potential Impact
For European organizations, especially educational institutions, universities, and research centers that widely deploy Moodle LMS, this vulnerability presents a significant risk. Exploitation can lead to unauthorized disclosure of sensitive information such as database credentials, user data, and internal configuration files, potentially enabling further attacks like privilege escalation or data exfiltration. The breach of confidential academic records and personal data could result in regulatory penalties under GDPR, reputational damage, and operational disruptions. Since Moodle is often integrated with other academic and administrative systems, the compromise could cascade, affecting broader organizational IT infrastructure. The lack of authentication requirement and ease of exploitation increase the likelihood of attacks, potentially targeting high-profile European institutions. Additionally, the exposure of configuration files may allow attackers to pivot within networks or launch ransomware or espionage campaigns. The impact on availability is limited but confidentiality and integrity are severely affected.
Mitigation Recommendations
Given the absence of an official patch, European organizations should immediately implement compensating controls. First, restrict access to the vulnerable jsmol.php endpoint using web application firewalls (WAFs) or access control lists (ACLs) to limit requests to trusted IP ranges or authenticated users only. Implement strict input validation and sanitization at the web server or application proxy level to block path traversal patterns such as '../'. Monitor web server logs for suspicious query parameters indicative of traversal attempts. Consider disabling or removing the Jmol plugin if it is not essential to reduce the attack surface. Conduct thorough audits of Moodle installations to identify vulnerable versions and isolate affected systems. Prepare for rapid patch deployment once an official fix is released by Moodle. Additionally, enforce least privilege principles on file system permissions to minimize the impact of file disclosure. Educate system administrators about this vulnerability and encourage immediate incident response readiness. Regular backups and network segmentation can help contain potential breaches.
Affected Countries
United Kingdom, Germany, France, Netherlands, Italy, Spain, Sweden, Belgium
CVE-2025-34031: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Moodle Jmol Plugin
Description
A path traversal vulnerability exists in the Moodle LMS Jmol plugin version 6.1 and prior via the query parameter in jsmol.php. The script directly passes user input to the file_get_contents() function without proper validation, allowing attackers to read arbitrary files from the server's filesystem by crafting a malicious query value. This vulnerability can be exploited without authentication and may expose sensitive configuration data, including database credentials. Exploitation evidence was observed by the Shadowserver Foundation on 2025-02-02 UTC.
AI-Powered Analysis
Technical Analysis
CVE-2025-34031 is a path traversal vulnerability identified in the Moodle Learning Management System's Jmol plugin, specifically affecting version 6.1 and prior. The vulnerability arises from improper input validation in the jsmol.php script, where a query parameter is directly passed to the PHP function file_get_contents() without sanitization or restriction. This flaw allows an attacker to craft a malicious query string that traverses directories on the server's filesystem, enabling the reading of arbitrary files. Since the vulnerability does not require authentication or user interaction, it can be exploited remotely by any attacker with network access to the Moodle instance. The exposure of sensitive files, including configuration files and database credentials, can lead to further compromise of the system and data breaches. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N) reflects a high-severity rating of 8.7, emphasizing the ease of exploitation and the significant confidentiality impact. The Shadowserver Foundation observed exploitation attempts in October 2025, confirming active interest by threat actors. No patches or official fixes have been released at the time of this report, increasing the urgency for mitigation. The vulnerability is classified under CWE-22, which pertains to improper limitation of pathname to a restricted directory, a common and critical web application security issue. Given Moodle's widespread use in educational institutions worldwide, the vulnerability poses a substantial risk to the confidentiality and integrity of educational data and infrastructure.
Potential Impact
For European organizations, especially educational institutions, universities, and research centers that widely deploy Moodle LMS, this vulnerability presents a significant risk. Exploitation can lead to unauthorized disclosure of sensitive information such as database credentials, user data, and internal configuration files, potentially enabling further attacks like privilege escalation or data exfiltration. The breach of confidential academic records and personal data could result in regulatory penalties under GDPR, reputational damage, and operational disruptions. Since Moodle is often integrated with other academic and administrative systems, the compromise could cascade, affecting broader organizational IT infrastructure. The lack of authentication requirement and ease of exploitation increase the likelihood of attacks, potentially targeting high-profile European institutions. Additionally, the exposure of configuration files may allow attackers to pivot within networks or launch ransomware or espionage campaigns. The impact on availability is limited but confidentiality and integrity are severely affected.
Mitigation Recommendations
Given the absence of an official patch, European organizations should immediately implement compensating controls. First, restrict access to the vulnerable jsmol.php endpoint using web application firewalls (WAFs) or access control lists (ACLs) to limit requests to trusted IP ranges or authenticated users only. Implement strict input validation and sanitization at the web server or application proxy level to block path traversal patterns such as '../'. Monitor web server logs for suspicious query parameters indicative of traversal attempts. Consider disabling or removing the Jmol plugin if it is not essential to reduce the attack surface. Conduct thorough audits of Moodle installations to identify vulnerable versions and isolate affected systems. Prepare for rapid patch deployment once an official fix is released by Moodle. Additionally, enforce least privilege principles on file system permissions to minimize the impact of file disclosure. Educate system administrators about this vulnerability and encourage immediate incident response readiness. Regular backups and network segmentation can help contain potential breaches.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2025-04-15T19:15:22.546Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6859fad3dec26fc862d8c367
Added to database: 6/24/2025, 1:09:39 AM
Last enriched: 11/19/2025, 10:22:52 PM
Last updated: 11/22/2025, 7:33:59 PM
Views: 36
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-2655: SQL Injection in SourceCodester AC Repair and Services System
MediumCVE-2023-30806: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Sangfor Net-Gen Application Firewall
CriticalCVE-2024-0401: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in ASUS ExpertWiFi
HighCVE-2024-23690: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Netgear FVS336Gv3
HighCVE-2024-13976: CWE-427 Uncontrolled Search Path Element in Commvault Commvault for Windows
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.