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.
AI Analysis
Technical Summary
CVE-2025-34031 is a high-severity path traversal vulnerability affecting the Jmol plugin for Moodle LMS, specifically version 6.1 and earlier. The vulnerability arises from improper input validation in the jsmol.php script, where the query parameter is directly passed to the PHP function file_get_contents() without sanitization or restriction. This allows an unauthenticated attacker to craft a malicious query string that traverses directories on the server filesystem, enabling arbitrary file read access. Exploitation can lead to exposure of sensitive files such as configuration files containing database credentials, private keys, or other critical data. The vulnerability is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-20 (Improper Input Validation), and CWE-200 (Exposure of Sensitive Information). The CVSS 4.0 base score is 8.7, reflecting the ease of exploitation (no authentication or user interaction required), network attack vector, and high confidentiality impact. There are currently no known exploits in the wild and no official patches published at the time of analysis. The vulnerability affects all installations running the vulnerable Jmol plugin version 6.1 or prior, which is a widely used plugin for molecular visualization within Moodle, an open-source learning management system popular in educational institutions worldwide.
Potential Impact
For European organizations, particularly educational institutions and research centers using Moodle with the Jmol plugin, this vulnerability poses a significant risk. Successful exploitation can lead to unauthorized disclosure of sensitive information, including database credentials, which could facilitate further compromise such as database access, data exfiltration, or lateral movement within the network. Confidentiality is severely impacted, while integrity and availability are less directly affected. The exposure of sensitive configuration files may also lead to reputational damage and regulatory compliance issues under GDPR, especially if personal data is involved. Since Moodle is widely adopted across European universities and schools, the scale of potential impact is considerable. Attackers could leverage this vulnerability to gain footholds in academic networks, potentially disrupting educational services or stealing intellectual property. The lack of authentication requirement and network accessibility of the vulnerable endpoint increases the attack surface and likelihood of exploitation.
Mitigation Recommendations
1. Immediate mitigation should include disabling or restricting access to the vulnerable jsmol.php script, for example by applying web server access controls (e.g., IP whitelisting or authentication requirements) to limit exposure. 2. Implement web application firewall (WAF) rules to detect and block path traversal patterns in query parameters targeting jsmol.php. 3. Conduct a thorough audit of Moodle installations to identify presence and version of the Jmol plugin and prioritize patching or removal. 4. If patching is not yet available, consider removing or replacing the Jmol plugin with alternative molecular visualization tools that do not exhibit this vulnerability. 5. Monitor logs for suspicious requests attempting directory traversal sequences (e.g., ../) targeting jsmol.php. 6. Educate administrators on the risks and ensure secure configuration of Moodle plugins, including principle of least privilege on file system permissions to limit file exposure. 7. Once an official patch is released, apply it promptly and verify that input validation properly restricts file access to intended directories. 8. Review and rotate any potentially exposed credentials or secrets as a precautionary measure.
Affected Countries
Germany, France, United Kingdom, Italy, Spain, Netherlands, Sweden, Belgium, Poland, Finland
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-34031 is a high-severity path traversal vulnerability affecting the Jmol plugin for Moodle LMS, specifically version 6.1 and earlier. The vulnerability arises from improper input validation in the jsmol.php script, where the query parameter is directly passed to the PHP function file_get_contents() without sanitization or restriction. This allows an unauthenticated attacker to craft a malicious query string that traverses directories on the server filesystem, enabling arbitrary file read access. Exploitation can lead to exposure of sensitive files such as configuration files containing database credentials, private keys, or other critical data. The vulnerability is classified under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-20 (Improper Input Validation), and CWE-200 (Exposure of Sensitive Information). The CVSS 4.0 base score is 8.7, reflecting the ease of exploitation (no authentication or user interaction required), network attack vector, and high confidentiality impact. There are currently no known exploits in the wild and no official patches published at the time of analysis. The vulnerability affects all installations running the vulnerable Jmol plugin version 6.1 or prior, which is a widely used plugin for molecular visualization within Moodle, an open-source learning management system popular in educational institutions worldwide.
Potential Impact
For European organizations, particularly educational institutions and research centers using Moodle with the Jmol plugin, this vulnerability poses a significant risk. Successful exploitation can lead to unauthorized disclosure of sensitive information, including database credentials, which could facilitate further compromise such as database access, data exfiltration, or lateral movement within the network. Confidentiality is severely impacted, while integrity and availability are less directly affected. The exposure of sensitive configuration files may also lead to reputational damage and regulatory compliance issues under GDPR, especially if personal data is involved. Since Moodle is widely adopted across European universities and schools, the scale of potential impact is considerable. Attackers could leverage this vulnerability to gain footholds in academic networks, potentially disrupting educational services or stealing intellectual property. The lack of authentication requirement and network accessibility of the vulnerable endpoint increases the attack surface and likelihood of exploitation.
Mitigation Recommendations
1. Immediate mitigation should include disabling or restricting access to the vulnerable jsmol.php script, for example by applying web server access controls (e.g., IP whitelisting or authentication requirements) to limit exposure. 2. Implement web application firewall (WAF) rules to detect and block path traversal patterns in query parameters targeting jsmol.php. 3. Conduct a thorough audit of Moodle installations to identify presence and version of the Jmol plugin and prioritize patching or removal. 4. If patching is not yet available, consider removing or replacing the Jmol plugin with alternative molecular visualization tools that do not exhibit this vulnerability. 5. Monitor logs for suspicious requests attempting directory traversal sequences (e.g., ../) targeting jsmol.php. 6. Educate administrators on the risks and ensure secure configuration of Moodle plugins, including principle of least privilege on file system permissions to limit file exposure. 7. Once an official patch is released, apply it promptly and verify that input validation properly restricts file access to intended directories. 8. Review and rotate any potentially exposed credentials or secrets as a precautionary measure.
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: 6/24/2025, 1:26:11 AM
Last updated: 8/5/2025, 2:36:09 AM
Views: 12
Related Threats
CVE-2025-9053: SQL Injection in projectworlds Travel Management System
MediumCVE-2025-9052: SQL Injection in projectworlds Travel Management System
MediumPlex warns users to patch security vulnerability immediately
HighCVE-2025-9019: Heap-based Buffer Overflow in tcpreplay
LowCVE-2025-9017: Cross Site Scripting in PHPGurukul Zoo Management System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.