Cross-site Scripting (XSS)Weakness · CWE-79

CVE-2025-60507

HIGH · 8.9 CVSS v3.1 Published 2025-10-21
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
93/100
Remediation priority · Urgent
Remotely reachable

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Cross site scripting vulnerability in Moodle GeniAI plugin (local_geniai) 2.3.6. An authenticated user with Teacher role can upload a PDF containing embedded JavaScript. The assistant outputs a direct HTML link to the uploaded file without sanitization. When other users (including Students or Administrators) click the link, the payload executes in their browser.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A stored cross-site scripting (XSS) vulnerability exists in the Moodle GeniAI plugin (local_geniai) version 2.3.6. An authenticated Teacher can upload a PDF containing embedded JavaScript, which the assistant then renders as a direct HTML link without sanitization. When other users (Students or Administrators) click this link, the embedded JavaScript executes in their browser, allowing session hijacking, data theft, or privileged action execution.

MitigationThe plugin must be updated to properly sanitize/HTML-encode all file URL outputs before rendering. Implement output encoding using Moodle's built-in sanitization functions (e.g., s() or format_string()) and consider adding Content-Security-Policy headers to further mitigate XSS execution.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Verify local_geniai plugin is installed
    Access Moodle site administration > Plugins > Plugins overview and look for 'GeniAI' or 'local_geniai' in the plugin list, or check the /local/geniai/ directory exists in your Moodle installation
    Affected if local_geniai plugin appears in installed plugins list
  2. Confirm the installed plugin version
    In Moodle admin > Plugins > Plugins overview, click on the GeniAI plugin details to view the version number, or examine the version.php file in /local/geniai/ for the $plugin->version variable
    Affected if The installed version is 2.3.6 (exact match)
  3. Check if Teacher role can upload files
    Navigate to the GeniAI plugin settings or any feature allowing file/PDF upload, and verify if authenticated Teacher users have upload permissions in Moodle roles and capabilities
    Affected if Teachers have capability to upload files through the GeniAI interface
  4. Identify rendered PDF links in GeniAI output
    As a Teacher, upload a test PDF through GeniAI and examine if the resulting output renders as a clickable HTML link (anchor tag) rather than a safe file download reference
    Affected if PDF files uploaded via GeniAI render as direct HTML anchor links in the output

Your environment is affected if the local_geniai plugin is installed at version 2.3.6 and PDFs are rendered as clickable HTML links accessible to Teacher users.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

The plugin must be updated to properly sanitize/HTML-encode all file URL outputs before rendering. Implement output encoding using Moodle's built-in sanitization functions (e.g., s() or format_string()) and consider adding Content-Security-Policy headers to further mitigate XSS execution.

Recommended fix Moderate confidence

local_geniai plugin version > 2.3.6 (check Moodle Plugins directory for latest stable release)

  1. 1. Log in to Moodle as an administrator
  2. 2. Navigate to Site Administration > Plugins > Install plugins
  3. 3. Check for available updates to the local_geniai (GeniAI) plugin
  4. 4. If an update is available, download and install the updated plugin version
  5. 5. Alternatively, download the latest version of the local_geniai plugin from the Moodle Plugins directory (plugins.moodle.org)
  6. 6. Install the updated plugin and verify the version is newer than 2.3.6
  7. 7. Confirm the fix includes proper HTML sanitization of file links
Caveat Review plugin release notes for any changes to functionality or required Moodle version dependencies

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation1.0 h
  • Implementation2.0 h
  • Testing3.0 h
  • Review / QA2.0 h
8.0 hours of engineering $1,370
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,192.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-60507 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-60507 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data