Moodle LMS Jmol Plugin Path Traversal Vulnerability

Vulnerability

A path traversal vulnerability has been identified in the Jmol plugin for Moodle LMS, affecting versions through 6.1. The vulnerability arises in the jsmol.php file, where user input is directly passed to the file_get_contents() function without adequate validation. This flaw allows attackers to read arbitrary files from the server's filesystem by crafting a malicious query. The vulnerability can be exploited without authentication, potentially exposing sensitive configuration data such as database credentials.

Impact

Exploitation of this vulnerability allows for unauthorized access to files on the server, including sensitive information like database credentials. While the vulnerability does not directly allow for code execution, access to certain files could facilitate further attacks.

Reproduction

The vulnerability can be reproduced by sending a request to the jsmol.php file with a crafted query parameter that includes the path of a file to be read. This can be done using the 'getRawDataFromDatabase' call, which will return the contents of the specified file. Additionally, the plugin is vulnerable to reflected cross-site scripting, which can be exploited by injecting JavaScript into certain parameters that are not properly sanitized.

Remediation

Users are advised to uninstall the Jmol plugin from the Moodle Site Administration interface. Ensure that the uninstallation removes the plugin directory from the web server's filesystem, as simply disabling the plugin does not stop the vulnerable PHP scripts from being accessed.

Added: Jun 24, 2025, 1:23 AM
Updated: Jun 24, 2025, 1:23 AM

Vulnerability Rating

Custom Algorithm
spread
5.0
impact
2.9
exploitability
9.5
remediation
6.0
relevance
0.2
threat
6.8
urgency
2.9
incentive
10.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.