CVE-2025-34031 Moodle LMS Jmol Plugin Path Traversal

High 8.7 Published Updated

Unauthenticated attackers can read arbitrary files, including database credentials, via path traversal in the Moodle Jmol plugin.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-34031?

CVE-2025-34031 is a high-severity path traversal vulnerability in Moodle Jmol Plugin, published on 24 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-22

Which versions are affected by CVE-2025-34031?

It affects 1 product.

Products include Geoffrowland Jmol.

How do I fix CVE-2025-34031?

No fix has been published for CVE-2025-34031 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-34031 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-34031 exists.

Public exploit code: 1 Nuclei template.

Sources

Also known as GHSA-mf8r-552p-3grv.

Is CVE-2025-34031 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free