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 classified under CWE-22, affecting the Jmol plugin for Moodle LMS versions 6.1 and prior. The vulnerability arises because the jsmol.php script directly passes user-supplied input from a query parameter to the PHP function file_get_contents() without proper sanitization or validation. This flaw allows an attacker to craft a malicious query string that traverses directories on the server filesystem, enabling arbitrary file reads. Since the vulnerability does not require any authentication or user interaction, it can be exploited remotely by any unauthenticated attacker with network access to the Moodle instance. The impact is significant because attackers can access sensitive files such as configuration files containing database credentials, potentially leading to further compromise of the Moodle environment or underlying infrastructure. The vulnerability was publicly disclosed in June 2025 with a CVSS 4.0 score of 8.7, reflecting its high severity. Although no known public exploits have been published, Shadowserver Foundation observed exploitation attempts in February 2025, indicating active interest from threat actors. The lack of patches or official fixes at the time of disclosure increases the urgency for organizations to implement mitigations. The vulnerability affects Moodle installations using the Jmol plugin, which is commonly deployed in academic and research institutions for molecular visualization. Given Moodle's widespread use in Europe, this vulnerability poses a substantial risk to educational sectors and any organization relying on this plugin for scientific education or research.
Potential Impact
For European organizations, particularly universities, research institutions, and educational bodies that widely use Moodle LMS with the Jmol plugin, this vulnerability poses a critical risk. Unauthorized file disclosure can lead to exposure of sensitive configuration data, including database credentials, which may facilitate further attacks such as database compromise, privilege escalation, or lateral movement within the network. The breach of confidentiality can result in loss of intellectual property, disruption of academic activities, and damage to institutional reputation. Additionally, attackers could leverage exposed information to deploy ransomware or other malware, impacting availability and integrity of educational services. The fact that exploitation requires no authentication and can be performed remotely increases the attack surface and likelihood of successful compromise. Given the strategic importance of education and research in Europe, successful exploitation could have broader implications for national cybersecurity and data protection compliance under GDPR.
Mitigation Recommendations
1. Immediately disable the Jmol plugin in Moodle installations until a security patch is available. 2. Apply any vendor-provided patches or updates as soon as they are released. 3. Implement strict input validation and sanitization on the jsmol.php script to prevent directory traversal sequences such as '../'. 4. Employ web application firewalls (WAFs) with custom rules to detect and block suspicious query parameters attempting path traversal. 5. Restrict file system permissions for the web server user to limit access to sensitive files and directories. 6. Monitor Moodle server logs for unusual file access patterns or repeated requests to jsmol.php with suspicious parameters. 7. Conduct regular security audits and vulnerability scans focusing on Moodle plugins and third-party components. 8. Educate system administrators and developers about secure coding practices to avoid similar vulnerabilities in custom plugins or extensions. 9. Consider network segmentation to isolate Moodle servers from critical backend systems to reduce impact if compromised. 10. Backup Moodle data and configuration regularly to enable recovery in case of compromise.
Affected Countries
Germany, France, United Kingdom, Italy, Spain, Netherlands, Sweden, Belgium, Poland, Austria
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 classified under CWE-22, affecting the Jmol plugin for Moodle LMS versions 6.1 and prior. The vulnerability arises because the jsmol.php script directly passes user-supplied input from a query parameter to the PHP function file_get_contents() without proper sanitization or validation. This flaw allows an attacker to craft a malicious query string that traverses directories on the server filesystem, enabling arbitrary file reads. Since the vulnerability does not require any authentication or user interaction, it can be exploited remotely by any unauthenticated attacker with network access to the Moodle instance. The impact is significant because attackers can access sensitive files such as configuration files containing database credentials, potentially leading to further compromise of the Moodle environment or underlying infrastructure. The vulnerability was publicly disclosed in June 2025 with a CVSS 4.0 score of 8.7, reflecting its high severity. Although no known public exploits have been published, Shadowserver Foundation observed exploitation attempts in February 2025, indicating active interest from threat actors. The lack of patches or official fixes at the time of disclosure increases the urgency for organizations to implement mitigations. The vulnerability affects Moodle installations using the Jmol plugin, which is commonly deployed in academic and research institutions for molecular visualization. Given Moodle's widespread use in Europe, this vulnerability poses a substantial risk to educational sectors and any organization relying on this plugin for scientific education or research.
Potential Impact
For European organizations, particularly universities, research institutions, and educational bodies that widely use Moodle LMS with the Jmol plugin, this vulnerability poses a critical risk. Unauthorized file disclosure can lead to exposure of sensitive configuration data, including database credentials, which may facilitate further attacks such as database compromise, privilege escalation, or lateral movement within the network. The breach of confidentiality can result in loss of intellectual property, disruption of academic activities, and damage to institutional reputation. Additionally, attackers could leverage exposed information to deploy ransomware or other malware, impacting availability and integrity of educational services. The fact that exploitation requires no authentication and can be performed remotely increases the attack surface and likelihood of successful compromise. Given the strategic importance of education and research in Europe, successful exploitation could have broader implications for national cybersecurity and data protection compliance under GDPR.
Mitigation Recommendations
1. Immediately disable the Jmol plugin in Moodle installations until a security patch is available. 2. Apply any vendor-provided patches or updates as soon as they are released. 3. Implement strict input validation and sanitization on the jsmol.php script to prevent directory traversal sequences such as '../'. 4. Employ web application firewalls (WAFs) with custom rules to detect and block suspicious query parameters attempting path traversal. 5. Restrict file system permissions for the web server user to limit access to sensitive files and directories. 6. Monitor Moodle server logs for unusual file access patterns or repeated requests to jsmol.php with suspicious parameters. 7. Conduct regular security audits and vulnerability scans focusing on Moodle plugins and third-party components. 8. Educate system administrators and developers about secure coding practices to avoid similar vulnerabilities in custom plugins or extensions. 9. Consider network segmentation to isolate Moodle servers from critical backend systems to reduce impact if compromised. 10. Backup Moodle data and configuration regularly to enable recovery in case of compromise.
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: 12/4/2025, 5:22:59 AM
Last updated: 1/7/2026, 6:12:30 AM
Views: 52
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-14835: CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in opajaap WP Photo Album Plus
HighCVE-2026-0650: CWE-306 Missing Authentication for Critical Function in OpenFlagr Flagr
CriticalCVE-2025-15474: CWE-770 Allocation of Resources Without Limits or Throttling in AuntyFey AuntyFey Smart Combination Lock
MediumCVE-2025-14468: CWE-352 Cross-Site Request Forgery (CSRF) in mohammed_kaludi AMP for WP – Accelerated Mobile Pages
MediumCVE-2025-9611: CWE-749 Exposed Dangerous Method or Function in Microsoft Playwright
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.