Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2021-42321: Microsoft Exchange Server Post-Authentication Deserialization RCE

Published Nov 10, 2021 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS91.7%100th percentile
CISA KEVYesAdded Nov 17, 2021
In the wildActivePer CISA KEV
Vendor
Microsoft Corporation
IdentifiersCVE-2021-42321CWE-502

CVE-2021-42321 is a post-authentication remote code execution vulnerability in Microsoft Exchange Server. Reported affected releases include Exchange 2016 CU21/CU22 and Exchange 2019 CU10/CU11. The vulnerable deserialization path involves TypedBinaryFormatter failing to pass its serialization binder correctly and ineffective type restrictions in ChainedSerializationBinder. Deserialization of ClaimsPrincipal can consequently invoke an unfiltered BinaryFormatter deserialization operation. An authenticated attacker can place a serialized gadget chain in the BinaryData field through the Exchange Web Services CreateUserConfiguration operation and trigger deserialization through GetClientAccessToken. Successful exploitation executes attacker-controlled code on the server. Exploitation in the wild and publicly available proof-of-concept code have been identified.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an authenticated remote attacker to execute arbitrary code on an affected Exchange Server. The vulnerability has been used as a network-access vector by Hive ransomware actors. The execution privilege level and specific confidentiality or availability consequences are not established.

Mitigation

If you can’t patch tonight, do this now.

Because this is a post-authentication flaw, reduce exposure by tightly restricting who can authenticate to Exchange and who can access Exchange Web Services, especially from untrusted networks. Limit administrative and service account access, enforce multifactor authentication where applicable, segment Exchange from unnecessary network paths, and monitor for suspicious EWS activity involving user configuration operations and anomalous token-related requests. If immediate patching is not possible, minimize external exposure of vulnerable Exchange services and apply compensating access controls until updates can be deployed.

Remediation

Patch, then assume compromise.

Apply the vendor-provided Microsoft Exchange Server security update addressing CVE-2021-42321.

Public exploits

Exploits

2 exploits validated by Mallory's analysis.

View more in app →
exchange_chainedserializationbinder_rce.rbThis repository contains a single Metasploit module targeting Microsoft Exchange Server vulnerabilities (CVE-2021-42321 and CVE-2022-23277) in the ChainedSerializationBinder component. The exploit requires valid Exchange user credentials and targets Exchange 2016 CU21/CU22 and 2019 CU10/CU11 prior to the March 2022 Security Update. The module leverages authenticated access to the Exchange Web Services (EWS) endpoint (/ews/exchange.asmx) to create a malicious user configuration object, which is then deserialized to achieve remote code execution as SYSTEM. The exploit supports multiple payload types, including direct command execution, file droppers, and PowerShell stagers, and is fully integrated into the Metasploit framework, allowing for payload customization and automated exploitation. The code is mature, weaponized, and suitable for post-authentication exploitation scenarios. The only fingerprintable endpoint is the EWS SOAP endpoint, which is standard for Exchange servers.Disclosed Dec 9, 2021 · Framework: metasploit · ruby · networkWeaponizedCVE-2021-42321This repository contains a proof-of-concept exploit for CVE-2021-42321, a remote code execution vulnerability in Microsoft Exchange Server. The main file, 'CVE-2021-42321_poc.py', is a Python script that crafts and sends a malicious serialized .NET payload (gadgetData) to the Exchange Web Services (EWS) SOAP API endpoint '/ews/exchange.asmx' on a target Exchange server. The script authenticates using NTLM credentials and performs a sequence of SOAP requests to first retrieve the inbox folder ID, delete any existing user configuration, and then create a new user configuration containing the malicious payload. The payload is designed to trigger code execution on the server (e.g., launching calc or mspaint). The exploit requires valid credentials and a vulnerable Exchange Server. The repository also includes a brief README referencing the CVE and the official Microsoft patch. No hardcoded endpoints are present; the user must specify the target Exchange server URL and credentials.DarkSprings · Disclosed Nov 23, 2021 · python · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Microsoft CorporationExchange Serverapplication
FAQ

Frequently asked questions

Is CVE-2021-42321 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 17, 2021.
Is there a public exploit for CVE-2021-42321?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2021-42321, the earliest disclosed Nov 23, 2021.
Is there a patch for CVE-2021-42321?
Apply the vendor-provided Microsoft Exchange Server security update addressing CVE-2021-42321.
What products are affected by CVE-2021-42321?
Microsoft Corporation Exchange Server.
How severe is CVE-2021-42321?
CVE-2021-42321 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 91.7% (100th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+4 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence4Every report linking this CVE to a named adversary.
Associated malware3Malware families linked to this CVE, with evidence and IOCs.
Detection signatures5YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity1Community discussion across Reddit, Mastodon, and other social sources.