Join our Newsletter — 33% off our NHI Course
Home› Guides› ProxyLogon and ProxyShell: What Happened and What Exchange…
Guide Vulnerability Management

ProxyLogon and ProxyShell: What Happened and What Exchange Defenders Should Do

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

In 2021 two chains of vulnerabilities in on-premises Exchange Server, ProxyLogon and ProxyShell, turned internet-facing mail servers into one of the most widely exploited entry points of the year. Both chains let an unauthenticated attacker reach code execution on a server that most organisations had published directly to the internet, and in both cases mass exploitation followed disclosure within days or weeks. This guide profiles the seven CVEs involved, the 2021 timeline, the US government response including CISA Emergency Directive 21-02, and the lessons that still apply to anyone running Exchange on premises: patch cadence, exposure reduction and web shell hunting. It is written for Exchange administrators, vulnerability managers and incident responders, and it is defensive only. For the full Exchange hardening baseline, see the Microsoft Exchange Server Security Guide.

Key takeaways

  • Two chains, one lesson. ProxyLogon (four CVEs, disclosed 2 March 2021) and ProxyShell (three CVEs, fixed by the May 2021 updates) both started with an unauthenticated request to a published Exchange endpoint.
  • Patching was necessary but not sufficient. CISA told organisations to investigate for compromise back to 1 January 2021, because servers patched after exploitation could still carry web shells.
  • Assume identity compromise if exploited. CISA's advisory said that where exploitation is found, organisations should assume network identity compromise, because Exchange servers hold highly privileged Active Directory rights.
  • Exposure is a choice. Restricting external access to /owa/ and /ecp/, putting a deny-by-default firewall in front of Exchange and removing the admin centre from the internet shrink the attack surface for the next chain too.
  • Currency is the control. The government hardening list required security updates within 48 hours of release and only vendor-supported versions; servers that fall behind on cumulative updates cannot receive security fixes at all.

At a glance

ItemProxyLogonProxyShell
CVEsCVE-2021-26855, CVE-2021-26857, CVE-2021-26858, CVE-2021-27065CVE-2021-34473, CVE-2021-34523, CVE-2021-31207
Public disclosure2 March 2021, out-of-band security updatesCVE-2021-31207 published 11 May 2021; CVE-2021-34473 and CVE-2021-34523 published 14 July 2021
FixMarch 2021 out-of-band updatesCISA: the May 2021 security update fixes all three
ProductsOn-premises Exchange Server; Exchange Online not affectedOn-premises Exchange Server 2013, 2016 and 2019
Entry pointUnauthenticated request processed by the Client Access front endUnauthenticated request to a published Exchange endpoint
Typical resultWeb shells, credential dumping, mailbox theft, ransomwareWeb shells and follow-on intrusion
CISA KEVAll four added 3 November 2021, known ransomware useAll three added 3 November 2021, known ransomware use

What happened in 2021

On 2 March 2021 Microsoft released out-of-band security updates for on-premises Exchange Server and published an analysis attributing exploitation, with high confidence, to HAFNIUM, a group it assessed as state-sponsored and operating out of China. Microsoft now tracks that group as Silk Typhoon; see the Silk Typhoon Threat Actor Profile Guide for the actor's later activity. Other actors began exploiting the same flaws soon after disclosure, which is why the response moved from targeted intrusion to mass remediation.

  1. 2 March 2021: Microsoft releases out-of-band updates for the four ProxyLogon CVEs and publishes detection guidance. Exchange Online is not affected.
  2. 3 March 2021: CISA issues Emergency Directive 21-02 for federal civilian agencies and advisory AA21-062A for everyone else, recommending investigation from 1 January 2021.
  3. March 2021: CISA updates the advisory repeatedly, adding China Chopper web shell malware analysis reports, YARA rules, Microsoft's Test-ProxyLogon.ps1 and the Exchange On-premises Mitigation Tool, and a report on DearCry ransomware used against compromised Exchange servers.
  4. 31 March 2021: CISA's supplemental direction requires agencies to run Test-ProxyLogon.ps1 and the Microsoft Safety Scanner (MSERT), and sets a hardening list due by 28 June 2021.
  5. 13 April 2021: Microsoft's April security update discloses and fixes further Exchange vulnerabilities and adds Exchange Server 2013 to the affected list; CISA directs agencies to deploy it by 16 April 2021. The same day the US Department of Justice announces a court-authorised FBI operation that removed one early group's web shells from hundreds of US servers, without patching them or removing other malware.
  6. 11 May 2021: CVE-2021-31207 is published with the May 2021 security update.
  7. 14 July 2021: CVE-2021-34473 and CVE-2021-34523 are published; with CVE-2021-31207 they form the ProxyShell chain.
  8. 21 August 2021: CISA warns that threat actors are actively exploiting ProxyShell and urges organisations to identify vulnerable systems and install the May 2021 update.
  9. 3 November 2021: All seven CVEs are added to the CISA Known Exploited Vulnerabilities catalogue, marked as known to be used in ransomware campaigns.

The CVEs involved

The descriptions below are at the level Microsoft and the CVE records publish them. They explain why the chains were dangerous without describing how to exploit them. CVSS scores are the CNA (Microsoft) scores in the CVE records.

CVEChainMicrosoft titleNatureCVSS 3.1
CVE-2021-26855ProxyLogonRemote Code ExecutionServer-side request forgery that let an attacker send arbitrary HTTP requests and authenticate as the Exchange server9.1
CVE-2021-26857ProxyLogonRemote Code ExecutionInsecure deserialisation in the Unified Messaging service, code as SYSTEM; needs admin rights or another flaw7.8
CVE-2021-26858ProxyLogonRemote Code ExecutionPost-authentication arbitrary file write7.8
CVE-2021-27065ProxyLogonRemote Code ExecutionPost-authentication arbitrary file write7.8
CVE-2021-34473ProxyShellRemote Code ExecutionRemote code execution; with the next two CVEs forms the ProxyShell chain9.1
CVE-2021-34523ProxyShellElevation of PrivilegePrivilege escalation within Exchange9.0
CVE-2021-31207ProxyShellSecurity Feature BypassSecurity feature bypass; the third ProxyShell CVE, rated lower on its own6.6

The pattern matters more than the individual bugs. The two post-authentication file write flaws were only reachable because the server-side request forgery provided authentication; the ProxyShell flaws were similarly chained. A single medium-rated CVE in a chain can be the step that turns access into code execution, so rate chains by their combined effect, not by the highest individual score. The Risk-Based Vulnerability Management Guide covers how to weight known exploitation and exposure.

Who was affected

  • Products: on-premises Exchange Server. The CVE records for the ProxyLogon flaws list Exchange Server 2013, 2016 and 2019 cumulative updates, with CVE-2021-26857 also listing Exchange Server 2010 Service Pack 3. The ProxyShell records list Exchange 2013 CU23, 2016 CU19 and CU20, and 2019 CU8 and CU9. Microsoft and CISA both stated that Exchange Online was not affected by ProxyLogon.
  • Exposure: any server with Outlook on the web, the Exchange admin centre or other Client Access endpoints published to the internet. Hybrid deployments that kept an on-premises server for management or mail routing were in scope too.
  • Organisations: the initial campaign was targeted, but mass exploitation followed. The Justice Department said hundreds of web shells had persisted unmitigated on US servers by April 2021, which shows how many owners had patched without checking for compromise, or had not patched at all.
  • Follow-on threats: CISA reported DearCry ransomware against compromised Exchange servers, and the KEV catalogue marks all seven CVEs as known to be used in ransomware campaigns.

Patching and mitigation

Microsoft's own tooling states the principle plainly: installing the applicable Exchange Server security update is the only way to fully protect a server, and URL Rewrite mitigations are a temporary measure. Treat every mitigation below as a bridge to patching, not a substitute.

  1. Know your build: run Microsoft's Exchange Server Health Checker on every server to confirm the build, cumulative update and security update level. Security updates are released only for supported cumulative updates, so a server two CUs behind cannot be patched until it is brought current.
  2. Stay on supported versions: Exchange Server 2016 and 2019 reached the end of extended support on 14 October 2025. Plan migration to Exchange Server Subscription Edition or Exchange Online; see the Exchange Server 2016 and 2019 End of Support guide.
  3. Patch to a deadline: the 2021 federal hardening list required security and cumulative updates within 48 hours of release. Few organisations meet that for every system, but internet-facing Exchange is the case for it.
  4. Use interim mitigations while you patch: Microsoft's Exchange On-premises Mitigation Tool applies IIS URL Rewrite mitigations for listed CVEs, including CVE-2021-26855, with WhatIf preview and JSON-backed rollback. The Exchange Emergency Mitigation service applies Microsoft-published mitigations automatically on supported builds; its configuration is covered in the Exchange Server Security Guide.
  5. Reduce exposure: CISA recommended limiting or blocking external access to internet-facing Exchange, including the /owa/ and /ecp/ URLs, and disconnecting servers that could not be patched. Publish only what users need, through a reverse proxy or pre-authenticating gateway, and never publish the admin centre.
  6. Harden around the server: the CISA hardening list added a deny-by-default firewall between Exchange and the internet, review of Exchange accounts, groups and Active Directory permissions (no Exchange account in Domain Admins), at least 180 days of centrally retained logs, and current anti-malware signatures.
  7. Roll back safely: stage security updates on one server in a database availability group first, confirm mail flow and client access, then proceed. Keep the mitigation tool's rollback files so URL Rewrite rules can be removed once patched.

Choosing between options

SituationBest optionTrade-off
Server current on supported CUInstall the security update now, then huntShort maintenance window per server
Server behind on CUsApply URL Rewrite mitigation, restrict external access, then update CU and security updateMitigations cover only listed CVEs
Unsupported versionRemove from internet exposure, migrateMigration effort; no security fixes in the meantime
Signs of compromiseIsolate, preserve evidence, rebuild rather than cleanDowntime; needs identity remediation
Small organisation with no Exchange specialistConsider moving mailboxes to Exchange Online and removing the published serverA hybrid management server may still be needed and must be patched

Detection and defence

CISA's guidance was explicit that a lack of matching indicators does not prove a server is clean, because attackers used short-lived infrastructure. Hunt for behaviour and artefacts, not only for published IP addresses and hashes. The detailed method is in How to Hunt for Web Shells on IIS, Apache and Nginx; the points below are the Exchange-specific ones from the 2021 advisories.

  • Web shell locations: CISA listed \inetpub\wwwroot\aspnet_client\ and the FrontEnd\HttpProxy\owa\auth\ and FrontEnd\HttpProxy\ecp\auth\ folders as places to check for new or modified .aspx files. Baseline these folders and alert on any change outside a patch window.
  • Exchange logs: Microsoft's detection guidance pointed to the HttpProxy logs (unauthenticated requests with unusual anchor mailbox values), the ECP server logs (Set-*VirtualDirectory entries containing script), the OAB generator logs (files written outside the expected temp folder) and Application event log errors from the MSExchange Unified Messaging source.
  • Microsoft scripts: Test-ProxyLogon.ps1 automates the four checks from Microsoft's analysis and flags archive files in C:\ProgramData\, which attackers used to stage data. Run it across all servers with its output saved for the incident record.
  • Process behaviour: alert when the IIS worker process w3wp.exe spawns command shells or PowerShell, and on any access to LSASS memory on an Exchange server. Microsoft observed LSASS dumping with Procdump and mailbox export through Exchange PowerShell snap-ins.
  • Identity signals: watch for new accounts, new members of Exchange and Active Directory privileged groups, and mailbox export requests. Exchange servers have broad directory rights, so treat them as Tier 0; see the Web Shell Response Playbook for containment.

Framework mapping

FrameworkReferenceRelevance
MITRE ATT&CKT1190 Exploit Public-Facing ApplicationInitial access through the Exchange front end
MITRE ATT&CKT1505.003 Web ShellChina Chopper and other ASPX web shells for persistence
MITRE ATT&CKT1003.001 LSASS MemoryCredential dumping after compromise
MITRE ATT&CKT1114 Email Collection; T1560.001 Archive via UtilityMailbox export and data staged in archives
MITRE D3FENDD3-SU Software Update; D3-FA File AnalysisPatching and inspection of files written to web folders
NIST SP 800-53 Rev 5SI-2, RA-5, CM-8, SC-7, SI-4, AU-6, IR-4Flaw remediation, scanning, inventory, boundary protection, monitoring, incident handling
NIST CSF 2.0ID.AM-02, ID.RA-01, PR.PS-02, DE.CM-09Know what runs, find vulnerabilities, maintain software, monitor for adverse events
CIS Controls v8.1Control 7 Continuous Vulnerability Management; Control 13 Network Monitoring and DefensePatch cadence and monitoring of exposed services
ISO/IEC 27001:2022A.8.8 Management of technical vulnerabilities; A.8.16 Monitoring activitiesVulnerability handling and monitoring

Metrics that show it is working

  • Time to patch internet-facing Exchange: days from security update release to installation on every exposed server, against a target such as 48 hours.
  • CU currency: share of servers on a cumulative update that still receives security updates (target 100%).
  • Exposed endpoints: number of Exchange virtual directories reachable from the internet, with the admin centre at zero.
  • Web folder integrity: unexplained file changes in Exchange web folders per month, each investigated.
  • Log coverage: share of Exchange servers sending IIS, HttpProxy and ECP logs to the SIEM with at least 180 days retention.

Common failure patterns

  • Patching without hunting: the April 2021 FBI operation found hundreds of web shells still in place, so servers that were patched after compromise stayed compromised.
  • Falling behind on cumulative updates: organisations that could not apply a security update because their CU was unsupported lost days while they upgraded under pressure.
  • Cleaning instead of rebuilding: removing a web shell does not remove accounts, scheduled tasks or credentials the attacker created; ED 21-02 kept compromised servers off the domain until a rebuild.
  • Forgetting the identity layer: failing to reset credentials and review Exchange's Active Directory permissions after an LSASS dump leaves the attacker able to return.
  • Relying on indicator lists: treating "no IOC matches" as clean, against CISA's explicit warning.

Practitioner checklist

  • Inventory every Exchange server, including hybrid management servers, with its build, CU and internet exposure.
  • Confirm every server is on a supported version and CU, and record the date of its last security update.
  • Remove the Exchange admin centre and any unneeded virtual directories from internet exposure.
  • Put a pre-authenticating proxy or deny-by-default firewall in front of published endpoints.
  • Run Health Checker after every update and track findings to closure.
  • Baseline Exchange web folders and alert on new or modified .aspx files.
  • Send IIS, HttpProxy, ECP and Windows event logs to the SIEM with at least 180 days retention.
  • Alert on w3wp.exe spawning shells and on LSASS access on Exchange servers.
  • Remove Exchange accounts from Domain Admins and review Exchange's Active Directory permissions.
  • Agree in advance that a compromised Exchange server is rebuilt, and rehearse the credential reset that follows.

Standards and references

Related NHI Mgmt Group resources: Microsoft Exchange Server Security Guide · Silk Typhoon Threat Actor Profile Guide · How to Hunt for Web Shells on IIS, Apache and Nginx · Vulnerability Management Guide · Web Shell Response Playbook

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.