Microsoft Exchange Server ProxyLogon SSRF to RCE (CVE-2021-26855)
Published: 2026-11-27 • Researcher: ZephrFish / zephrsec (PoC repository author); CVE-2021-26855 discovered by Orange Tsai of DEVCORE and reported to Microsoft, with in-the-wild exploitation documented by Volexity
Exploitation signals
Confirmed exploited in the wild. Added to CISA KEV 2021-11-03. Federal remediation deadline 2022-05-03.
EPSS 100.0% · 100th percentile
- Severity
- Critical
- CVE
- CVE-2021-26855 (ProxyLogon); chained with CVE-2021-27065 for code execution
- Category
- web
- Affected product
- Microsoft Exchange Server 2013, 2016 and 2019 (on-premises)
- Affected versions
- Exchange Server 2013 Cumulative Update 21 through CU23; Exchange Server 2016 CU8 through CU19; Exchange Server 2019 RTM through CU8 (NVD CPE coverage). Fixed by the March 2021 security updates (2013 CU23, 2016 CU19, 2019 CU8)
- Disclosed
- 2026-11-27
- Patch status
- Patched
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-26855
- https://github.com/ZephrFish/Exch-CVE-2021-26855
- https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-26855
- https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-26855
- https://devco.re/blog/2021/03/11/proxylogon-a-new-attack-surface-of-exchange-server/
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-27 |
| Last Updated | 2025-04-26 |
| Author / Researcher | ZephrFish / zephrsec (PoC repository author); CVE-2021-26855 discovered by Orange Tsai of DEVCORE and reported to Microsoft, with in-the-wild exploitation documented by Volexity |
| CVE / Advisory | CVE-2021-26855 (ProxyLogon); chained with CVE-2021-27065 for code execution |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (CVSSv3.1, NVD: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H); 9.1 (CVSSv3.1, Microsoft: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N); 7.5 (CVSSv2, NVD) |
| Status | Weaponized |
| Tags | SSRF, ProxyLogon, Microsoft Exchange, OWA, ECP, unauthenticated, RCE, CWE-918, CISA KEV, Windows, webshell |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Microsoft Exchange Server 2013, 2016 and 2019 (on-premises) |
| Versions Affected | Exchange Server 2013 Cumulative Update 21 through CU23; Exchange Server 2016 CU8 through CU19; Exchange Server 2019 RTM through CU8 (NVD CPE coverage). Fixed by the March 2021 security updates (2013 CU23, 2016 CU19, 2019 CU8) |
| Language / Platform | Windows Server hosting Exchange with the Client Access front end (IIS); PoC written in Python 3 |
| Authentication Required | No. The SSRF itself is unauthenticated; the PoC needs one valid mailbox address, which it derives mailbox identity from rather than a password |
| Network Access Required | Yes, HTTPS to TCP/443 on the Exchange Client Access server |
Summary
CVE-2021-26855 is a server-side request forgery flaw in the Microsoft Exchange Client Access front end, the component known as ProxyLogon. An unauthenticated attacker can use a crafted X-BEResource cookie to make the front end proxy arbitrary requests to the backend with an attacker-chosen mailbox identity, bypassing authentication entirely. The bundled PoC chains the SSRF with CVE-2021-27065, an arbitrary file write through the OAB virtual directory settings, to drop an ASPX web shell into a web-accessible path and obtain interactive command execution as SYSTEM. It was exploited in the wild as a zero-day before the March 2021 patches and is in the CISA KEV catalog.
Vulnerability Details
Root Cause
The Exchange Client Access front end (the CAFE / BE proxy) decides which backend mailbox service a request belongs to by trusting the client-supplied X-BEResource cookie, which encodes a target host and mailbox identity plus a version-like number. The front end does not verify that the caller is authenticated for that mailbox before proxying. An attacker can therefore point X-BEResource at an arbitrary backend endpoint and have the front end issue the request with the backend’s implicit trust, reaching services such as Autodiscover, MAPI/emsmdb and the ECP proxyLogon endpoint without credentials. The second half of the chain, CVE-2021-27065, abuses the ECP DDI service: the OABVirtualDirectory ExternalUrl property accepts a path that is later written to disk, so the attacker sets ExternalUrl to ASPX shell content and then invokes ResetOABVirtualDirectory with FilePathName pointing at the OWA auth directory, causing the shell to be written and served.
Attack Vector
Unauthenticated HTTPS requests to /ecp/
Impact
Remote code execution with SYSTEM privileges on the Exchange server, which normally holds highly privileged access to Active Directory. An attacker can read every mailbox, harvest credentials, install web shells such as the China Chopper family, move laterally to domain controllers, and persist. Full confidentiality, integrity and availability compromise of the Exchange organization and, in practice, of the surrounding Active Directory domain.
Environment / Lab Setup
OS: Windows Server 2016/2019 with Exchange Server 2013/2016/2019 (unpatched, pre-March-2021)
Target: Exchange Client Access server, HTTPS on TCP/443
Attacker: Linux or macOS with Python 3 and the requests library
Tools: python3, requests, urllib3, curl, a browser or Burp Suite for verificationSetup Steps
The upstream repository provides no lab build instructions, Dockerfile or setup scripts; it documents only the attacker-side usage. A lab is therefore built by deploying an intentionally unpatched Exchange Server (for example Exchange 2019 CU8 or Exchange 2016 CU19 in an isolated, non-internet-facing virtual network), creating at least one mailbox, and confirming that https://TARGET/owa/ and https://TARGET/ecp/ respond. No setup automation is included here because deploying Exchange requires Microsoft installation media and licensing.
Proof of Concept
Step-by-Step Reproduction
Step 1 — Prepare the attacker host — install Python 3 and the requests library, then place ExchangeSheller.py on the attack host.
Shell script1python3 -m pip install requestsStep 2 — Identify a valid mailbox — the exploit does not brute force addresses, so supply the email address of a mailbox that exists on the target.
Shell script1# any valid mailbox on the target organization, e.g. discovered via OWA or OSINTStep 3 — Run the exploit chain — pass the target host (or IP:port) and the mailbox address.
Shell script1python3 ExchangeSheller.py mail.domain.com test2@domain.comStep 4 — Use the shell — once the ASPX shell is written, the script opens an interactive prompt and executes commands through WScript.Shell.
Output1/> whoami
Exploit Code
See
ExchangeSheller.pyin this folder.
| |
Expected Output
[!] Discovering Exchange Server: mail.domain.compermission
=============================
Got DN: /o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=...
Got SID: S-1-5-21-...-500
Got session id: <ASP.NET session id>
Got canary: <msExchEcpCanary>
Successful. Verify whether the shell has landed!
POST shell:https://mail.domain.com/owa/auth/exchmshell.aspx
Requesting shell
Response: ...
/> nt authority\systemDetection & Indicators of Compromise
POST /ecp/ab12.js - 200 - Cookie: X-BEResource=localhost~1942062522
POST /ecp/ab12.js - 200 - Cookie: X-BEResource=EXCHANGE01/autodiscover/autodiscover.xml?a=~1942062522;
POST /ecp/ab12.js - 200 - X-Requesttype: Connect Content-Type: application/mapi-http
POST /ecp/ab12.js - 241 - Cookie: X-BEResource=Administrator@EXCHANGE01:444/ecp/proxyLogon.ecp?a=~1942062522;
POST /ecp/ab12.js - 200 - Cookie: ...msExchEcpCanary=... URI: /ecp/DDI/DDIService.svc/GetObject?schema=OABVirtualDirectory
C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\auth\*.aspx (unexpected webshell)
C:\Windows\System32\inetsrv\w3wp.exe spawning cmd.exe / powershell.exeSIEM / IDS Rule (example):
alert http any any -> any any (msg:"Possible Exchange ProxyLogon CVE-2021-26855 exploitation"; flow:to_server,established; content:"/ecp/"; http_uri; content:"X-BEResource="; http_header; content:"~1942062522"; http_header; sid:202126855; rev:1;)
alert http any any -> any any (msg:"Exchange OAB webshell write attempt (CVE-2021-27065)"; flow:to_server,established; content:"DDIService.svc"; http_uri; content:"OABVirtualDirectory"; http_uri; sid:202127065; rev:1;)Also hunt for unexpected .aspx files under the owa/auth directory, w3wp.exe child processes, and Exchange logs recording ECP SetObject operations against OABVirtualDirectory by the Administrator identity from an untrusted source.
Remediation
| Action | Detail |
|---|---|
| Patch | Apply the March 2021 Exchange security updates: Exchange 2019 CU8 (or later), Exchange 2016 CU19 (or later), Exchange 2013 CU23. Verify with the Exchange Health Checker and Microsoft’s Test-ProxyLogon script. |
| Workaround | If patching is delayed, restrict inbound HTTPS to Exchange (especially /ecp and /owa) to trusted networks or a VPN, and block external access to ECP. Microsoft published URL Rewrite and Extended Protection guidance as interim mitigations. |
| Config Hardening | Enable Extended Protection for Authentication on Exchange IIS virtual directories, enforce MFA on all Exchange and AD accounts, remove internet-facing ECP/OWA exposure, and monitor the OAB virtual directory configuration for unauthorized ExternalUrl changes. |
| Incident Response | Treat compromise as domain-wide: rotate all Exchange and privileged AD credentials, hunt for web shells in owa/auth and aspnet_client, review for added mailboxes, transport rules and persistence, and rebuild confirmed-compromised servers. |
References
- CVE-2021-26855 — NVD
- PoC repository — ZephrFish/Exch-CVE-2021-26855
- Microsoft MSRC Update Guide — CVE-2021-26855
- Volexity — Operation Exchange Marauder: Active Exploitation of Multiple Zero-Day Microsoft Exchange Vulnerabilities
- CISA Known Exploited Vulnerabilities Catalog
- DEVCORE — Orange Tsai, ProxyLogon research
Notes
Auto-prepared 2026-11-27 from the batch1 KEV backlog record (repo ZephrFish/Exch-CVE-2021-26855, last upstream commit 2025-04-26, add CODEOWNERS). Review verdict: genuine PoC/exploit — the script implements the full unauthenticated ProxyLogon chain (SSRF via X-BEResource, Autodiscover LegacyDN leak, MAPI SID recovery, ECP proxyLogon canary mint, OABVirtualDirectory file write) and ends in an interactive SYSTEM shell, so it was ingested as Weaponized. The exploit was not executed during archival; code was reviewed statically only. License: the upstream repository ships no LICENSE file, so no license is granted by the author and the code remains all rights reserved; it is archived here solely for authorized security research and defensive study. Limitations: a valid mailbox address on the target is required, the front-end FQDN falls back to the hardcoded EXCHANGE01 if the fingerprint headers are absent, the MAPI body embeds a placeholder mailbox GUID (f26bc937-b7b3-4402-b890-96c46713e5d5@exchange.lab) that may need adjustment, and the shell path assumes the default Exchange 2013/2016/2019 V15 installation directory.
| |