Skip to content

CVE-2023-21529: Microsoft Exchange Server RCE via Untrusted Deserialization

The core of this vulnerability lies in the insecure deserialization of data within the Exchange Server environment. In .NET applications, deserialization is the process of converting a byte stream back into an object. When an application deserializes data from an untrusted source without sufficient validation, an attacker can craft a malicious payload (often using gadgets from available libraries) that triggers the execution of arbitrary code upon reconstruction.

In the case of CVE-2023-21529, an authenticated attacker can send a specifically crafted request to the server. Because the server trusts the serialized object, it processes the payload, leading to a compromise of the underlying system with the privileges of the Exchange service account.

  • CVSS v3.1 Score: 8.8 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Classification: CWE-502 (Deserialization of Untrusted Data)

The following versions are susceptible to this exploit:

  • Exchange Server 2019 CU12: Versions < 15.02.1118.025
  • Exchange Server 2019 CU11: Versions < 15.02.0986.041
  • Exchange Server 2016 CU23: Versions < 15.01.2507.021
  • Exchange Server 2013 CU23: Versions < 15.00.1497.047

The attack chain typically follows a rapid progression from initial access to full environment encryption.

  1. Authentication: The attacker gains valid credentials for the Exchange environment (via phishing, credential stuffing, or previous leaks).
  2. Payload Delivery: A malicious serialized object is transmitted to the vulnerable Exchange endpoint.
  3. Trigger: The server deserializes the object, executing the embedded payload.
  4. Persistence: Storm-1175 typically establishes persistence by creating new administrative user accounts.
  5. Lateral Movement: Deployment of Remote Monitoring and Management (RMM) tools to navigate the network.
  6. Exfiltration & Impact: Sensitive data is exfiltrated, and Medusa ransomware is deployed across the infrastructure.

From a forensic perspective, the “smoking gun” is often found in the behavior of the worker processes.

  • Process Tree Analysis: The most critical indicator is the spawning of anomalous child processes from w3wp.exe (the IIS worker process). Any instance of cmd.exe, powershell.exe, or net.exe originating from w3wp.exe is a high-confidence indicator of compromise.
  • Account Creation: Monitor Event ID 4720 (A user account was created) for unauthorized administrative accounts created shortly after unexpected w3wp.exe activity.
  • Web Shells: Check for newly created .aspx files in the Exchange installation directories, which are often used to maintain access after the initial RCE.
  • Actor: Storm-1175
  • Malware: Medusa Ransomware
  • Behavioral IOCs: High-volume data transfer to unknown external IPs following the initial compromise.

Proactive detection focuses on the behavioral anomalies described above.

title: Exchange Server RCE - Suspicious Child Process
logsource:
category: process_creation
detection:
selection:
ParentImage: '*w3wp.exe'
Image:
- '*cmd.exe'
- '*powershell.exe'
- '*net.exe'
- '*whoami.exe'
condition: selection
DeviceProcessEvents
| where InitiatingProcessFileName == "w3wp.exe"
| where FileName in ("cmd.exe", "powershell.exe", "net.exe", "whoami.exe")
| project TimeGenerated, DeviceName, FileName, ProcessCommandLine, InitiatingProcessParentFileName

Patching Apply the latest Cumulative Updates (CU) provided by Microsoft immediately. This is the only definitive fix.

Hardening Restrict the use of authenticated access to Exchange from untrusted locations. Implement MFA across all administrative accounts.

Monitoring Deploy EDR solutions configured to alert on anomalous child processes spawned by IIS worker processes.