Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2021-34473: ProxyShell: Microsoft Exchange Pre-authentication Path Confusion

Published Jul 14, 2021 · Updated 12 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.8Critical · v3.1
EPSS100.0%100th percentile
CISA KEVYesAdded Nov 3, 2021
In the wildActivePer CISA KEV
Vendor
Microsoft Corporation
IdentifiersCVE-2021-34473CWE-918 · Server-Side Request Forgery (SSRF)
Also known asmicrosoft_exchange_proxyshellproxyshell

CVE-2021-34473 is a pre-authentication path-confusion vulnerability in Microsoft Exchange Server 2013, 2016, and 2019. Improper URL normalization allows unauthenticated attackers to access arbitrary Exchange backend URLs with Exchange machine-account privileges. It is the initial component of ProxyShell, an exploit chain combining CVE-2021-34473, CVE-2021-34523, and CVE-2021-31207 to achieve unauthenticated remote code execution and arbitrary file writes with elevated privileges. The vulnerability has a listed CVSS v3.1 score of 9.1 and has been exploited in ransomware, espionage, and cryptocurrency-mining intrusions.

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.

The vulnerability crosses the Exchange frontend authentication boundary, exposing backend services to unauthenticated requests made with machine-account privileges. Chaining it with the other ProxyShell vulnerabilities enables SYSTEM-context code execution and arbitrary file writes, including web-shell deployment. Observed downstream consequences include mailbox compromise, malicious email distribution, credential theft, persistent access, data exfiltration, cryptocurrency mining, and ransomware deployment. These broader consequences depend on the exploit chain and subsequent attacker actions rather than this component alone.

Mitigation

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

Use virtual patching or intrusion-prevention coverage for ProxyShell while updates are pending. Review Exchange IIS and proxy logs for suspicious Autodiscover requests referencing backend services or access-token parameters. Deploy endpoint detection on Exchange servers and monitor web-server worker processes for unexpected shell or PowerShell children and web-shell activity. Apply network segmentation and least privilege to constrain post-exploitation movement. These controls supplement rather than replace patching.

Remediation

Patch, then assume compromise.

Apply Microsoft's Exchange security updates addressing CVE-2021-34473, including the applicable April 2021 update covered by KB5001779 or a superseding update. The listed fixed-build thresholds are Exchange Server 2013 CU23 15.00.1497.015; Exchange Server 2016 CU19 15.01.2176.012 and CU20 15.01.2242.008; and Exchange Server 2019 CU8 15.02.0792.013 and CU9 15.02.0858.010. Patch all three ProxyShell vulnerabilities, not just CVE-2021-34473; March 2021 ProxyLogon updates alone are insufficient. Investigate previously exposed servers for compromise regardless of patch status, and remove any discovered persistence because patching does not eliminate existing attacker access.

Public exploits

Exploits

9 exploits validated by Mallory's analysis. Hidden: 3 rejected by Mallory's analysis as not a working exploit.

View more in app →
exchange_proxyshell_rce.rbThis repository contains a single Metasploit module implementing a weaponized exploit for the ProxyShell vulnerabilities in Microsoft Exchange Server (CVE-2021-34473, CVE-2021-34523, CVE-2021-31207). The exploit leverages a chain of vulnerabilities to bypass authentication, impersonate users, and write arbitrary files, ultimately achieving remote code execution (RCE) on vulnerable Exchange servers. The module supports multiple payload types, including Meterpreter reverse shells and arbitrary command execution, and allows customization of file paths for backdoor placement. The exploit targets Exchange 2013, 2016, and 2019 on Windows, prior to specific cumulative updates. The attack vector is network-based, exploiting the Exchange HTTP(S) interface. The module is highly mature, being part of the Metasploit framework, and is suitable for operational or weaponized use.Disclosed Apr 6, 2021 · Framework: metasploit · ruby · networkWeaponizedProxyVulnsThis repository contains operational exploit scripts for multiple high-profile Microsoft Exchange Server vulnerabilities: ProxyLogon (CVE-2021-26855, etc.), ProxyOracle (CVE-2021-31196), and ProxyShell (CVE-2021-34473, CVE-2021-31207). The structure includes four main Python scripts: - 26855.py: Implements the ProxyLogon exploit chain, culminating in the upload of a JScript webshell (api.aspx) to the Exchange server by abusing the OAB virtual directory. It automates the process of obtaining necessary tokens and SIDs, and provides a final webshell URL for remote code execution. - 31196.py: Implements the ProxyOracle padding oracle attack, allowing extraction of plaintext credentials from encrypted session cookies by exploiting a padding oracle vulnerability in OWA. It requires a valid 'cadata' cookie and outputs the decrypted username and password. - 34473.py: Implements the ProxyShell exploit chain, allowing remote PowerShell command execution on the Exchange server. It automates the process of obtaining a valid CommonAccessToken and then uses pypsrp to execute arbitrary PowerShell scripts remotely. - 31207.py: Works with 34473.py to deliver arbitrary files (e.g., malicious PDFs) to user mailboxes and then exports mailbox contents to a specified UNC path, leveraging Exchange's mailbox export features. A users.txt file provides a list of default or known usernames to assist in the exploitation process. The README.md gives usage instructions and references for each exploit. The scripts are operational and automate the full exploitation process, including credential extraction, webshell upload, remote command execution, and file delivery. The main attack vector is network-based, targeting exposed Exchange web services (ECP, OWA, Autodiscover, EWS, and PowerShell endpoints).hosch3n · Disclosed Apr 14, 2021 · python · networkOperationalproxyshellThis repository contains a Python-based Proof of Concept (PoC) exploit for the ProxyShell vulnerability chain affecting Microsoft Exchange Server (CVE-2021-34473, CVE-2021-34523, CVE-2021-31207). The main exploit script, 'exchange_proxyshell.py', automates the exploitation process by targeting Exchange's Autodiscover, MAPI, ECP, and EWS endpoints. It first enumerates users and emails from Active Directory, discovers LegacyDNs, and then abuses the ProxyShell vulnerabilities to obtain a valid access token. Using this token, the script establishes a PowerShell remoting session to the Exchange server, allowing the attacker to execute arbitrary commands. The exploit is operational and provides remote code execution capabilities. The repository is well-structured, with a detailed README explaining usage, features, and mitigation steps. No hardcoded IPs or domains are present; the target Exchange server is specified by the user at runtime.horizon3ai · Disclosed Sep 4, 2021 · python · networkOperationalCVE-2021-34473-Exchange-ProxyShellThis repository is an operational exploit toolkit targeting Microsoft Exchange servers vulnerable to ProxyShell (CVE-2021-34473). The main workflow involves: 1. Using 'send_webshell_mail.py' to send a specially crafted email with a webshell attachment to a target Exchange server. The script can operate in single or batch mode, reading email addresses from 'mail.txt'. It attempts to obtain a valid SID token for the target user, which is required for further exploitation. 2. The webshell payload is a JScript/ASP script that allows arbitrary command execution via HTTP requests. 3. 'wsman_shell.py' is used to interact with the compromised server, leveraging the obtained token to execute commands via PowerShell remoting or to write the webshell to disk for persistent access. 4. The 'Crypt_webshell' directory contains helper scripts and files for encoding the webshell payload in base64, which is then used in the email attachment. 5. 'sid.py' provides a utility for generating SID tokens, which are necessary for authenticating to the Exchange server during exploitation. The exploit is network-based, requiring access to the target Exchange server over HTTPS. The toolkit is not part of a larger framework but is a standalone set of scripts. The repository is well-structured for operational exploitation, providing both automated and manual methods for gaining remote code execution on vulnerable Exchange servers. The main endpoints targeted are Exchange autodiscover and EWS/OWA services, and the exploit ultimately results in a webshell being written to the server's web-accessible directory.je6k · Disclosed Nov 22, 2021 · python · jscript · networkOperationalProxyShellThis repository provides a comprehensive exploit toolkit for ProxyShell, targeting Microsoft Exchange Server vulnerabilities CVE-2021-34473, CVE-2021-34523, and CVE-2021-31207. The main exploit script (ProxyShell.py) automates the exploitation process, including user/SID enumeration, token generation, and remote code execution via crafted HTTP(S) requests to Exchange endpoints such as /autodiscover/autodiscover.json, /EWS/exchange.asmx, and /powershell/. The toolkit includes auxiliary scripts for manual exploitation (manual/check.py, manual/proxyshell.py, manual/shell.py), a nuclei detection template (proxyshell.yaml), and a Shodan search script (shodan-query.py) for identifying vulnerable targets. The exploit achieves remote code execution by chaining SSRF, privilege escalation, and arbitrary file write vulnerabilities, ultimately allowing the attacker to execute arbitrary PowerShell commands or deploy webshells. The repository is well-structured for both automated and manual exploitation, and is operational in maturity, providing real-world attack capabilities against unpatched Exchange servers.kh4sh3i · Disclosed Jun 29, 2022 · python · yaml · networkOperationalProxyHellSmall single-script Python exploit repository for Microsoft Exchange ProxyShell-style exploitation. The repository contains one executable code file, proxyhell_revisited.py, plus a short README, license, and .gitignore. The script uses requests and disables TLS verification warnings, indicating intended direct interaction with remote Exchange servers over HTTPS/HTTP. Its workflow is: (1) send a crafted Autodiscover request to leak the target mailbox LegacyDN using a supplied valid email address; (2) send a crafted MAPI request to extract a user SID from the Exchange response; (3) forge a serialized Windows token containing the recovered SID plus privileged group SIDs; (4) submit a SOAP/PowerShell remoting request with the forged token to execute a PowerShell command that writes a base64-decoded ASPX/JScript webshell into the IIS aspnet_client directory; and (5) print the resulting webshell URL for follow-on command execution. The embedded payload is not just a detector: it is a functional post-exploitation webshell that runs arbitrary commands via cmd.exe and returns output. The script also supports a limited --check mode that only tests the LegacyDN leak path and reports likely vulnerability to CVE-2021-34473. Overall, this is an operational PoC exploit for remote Exchange compromise and webshell deployment, not a framework module and not merely a README or scanner.Loqueseamevaleverg · Disclosed Mar 16, 2026 · python · networkOperationalabyss-c2This repository is a multi-module Python offensive framework centered on exploiting HiSilicon DVR/NVR/IP camera devices via CVE-2020-25078, then managing compromised hosts through a Flask/SocketIO web panel. It is not a simple single-file PoC: it includes a control server (server.py), persistence and post-exploitation tooling, credential attacks, recon modules, web vulnerability scanners, network service checks, pivoting, reverse shell support, and a SQLite-backed datastore. Core exploit logic is in exploit.py and scanner.py. exploit.py probes numerous traversal/disclosure paths such as /../../.../mnt/mtd/Config/Account1 and related config/system files, parses returned content with multiple regex patterns to recover credentials, fingerprints device families, and falls back to known default credentials when disclosure succeeds but parsing does not. scanner.py operationalizes this by scanning IPs/CIDRs and common ports, checking liveness, fingerprinting likely cameras, invoking the CVE-2020-25078 checks, and storing recovered credentials in cameras.db. Post-exploitation capability is substantial. telnet_client.py provides raw Telnet login and command execution. botnet.py fans out commands across stored hosts. persistence.py installs SSH authorized_keys, cron, rc.local, init.d, systemd, inittab telnetd, and bind-shell style persistence. reverse_shell.py generates many Linux/IoT reverse shell one-liners and runs listeners. pivot_chain.py and socks_pivot.py support chained execution and local SOCKS5 pivoting through compromised hosts. Additional modules broaden scope beyond the HiSilicon exploit: brute.py and cred_spray.py perform credential attacks across Telnet, SSH, FTP, HTTP, SMB, databases, VNC, LDAP, WinRM, and more; network_exploit.py checks for exposed/misconfigured services and some well-known vulnerabilities such as MS17-010 and BlueKeep; web_exploit.py, web_cves.py, web_bugs.py, and web_brute.py scan websites for exposed files, CMS fingerprints, generic bug classes, and multiple CVE signatures. Recon/intel support includes ASN, DNS, GeoIP, JARM, WAF detection, proxy/Tor rotation, screenshot grabbing from camera snapshot endpoints, and Telegram/Discord/AbuseIPDB integrations. The repository structure is coherent and functional, with many CLI-capable modules and a central web UI in templates/index.html. Overall, this is an operational exploit-and-post-exploitation toolkit focused on HiSilicon IoT devices but expanded into a broader C2-style offensive platform.flags-alt · Disclosed May 20, 2026 · python · html · network · web · localOperationalProxyshell-ScannerThis repository provides proof-of-concept (POC) code and scanning resources for detecting the Proxyshell vulnerability (CVE-2021-34473) in Microsoft Exchange Server. The main exploit script, 'ProxyNotShell/CVE-2022-41040.py', is a Python script that sends a crafted HEAD request to the Exchange autodiscover endpoint and checks for the presence of the 'X-FEServer' header to determine vulnerability. The 'proxyshell.yaml' file is a Nuclei scanner template for automated detection of the same vulnerability, using a similar HTTP request and matching on a 302 redirect and a specific Location header. The 'shodan-query.py' script is a utility for querying Shodan for potentially vulnerable Exchange servers based on favicon hash, outputting URLs for further scanning. The repository is structured for both manual and automated detection, with no weaponized payloads or exploitation beyond vulnerability identification. No hardcoded IPs or domains are present beyond the crafted request parameters. The repository is focused on detection and reconnaissance for Proxyshell, not on post-exploitation or full RCE.cyberheartmi9 · Disclosed Aug 10, 2021 · python · yaml · networkPoCCVE-2021-34473This repository contains a Python proof-of-concept exploit for CVE-2021-34473, a critical remote code execution vulnerability in Microsoft Exchange Server (ProxyShell). The main file, CVE-2021-34473.py, implements the full exploit chain: it interacts with several Exchange endpoints (/autodiscover/autodiscover.json, /autodiscover/autodiscover.xml, /mapi/emsmdb, /EWS/exchange.asmx, and /powershell/) to obtain necessary tokens and identifiers, then establishes a local HTTP server that acts as a web shell interface. Through this interface, the attacker can send arbitrary PowerShell commands to the compromised Exchange server. The exploit requires the attacker to know a valid email address on the target server and for the server to be vulnerable to ProxyShell. The README clarifies that this is an experimental proof-of-concept and not a weaponized tool. The code is written in Python and is self-contained, with no external framework dependencies.p2-98 · Disclosed Aug 16, 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-34473 exploited in the wild?
Yes. As of Nov 5, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
Is there a public exploit for CVE-2021-34473?
Yes. Mallory tracks 9 public exploits or proofs of concept for CVE-2021-34473, the earliest disclosed Apr 6, 2021.
Is there a patch for CVE-2021-34473?
Apply Microsoft's Exchange security updates addressing CVE-2021-34473, including the applicable April 2021 update covered by KB5001779 or a superseding update. The listed fixed-build thresholds are Exchange Server 2013 CU23 15.00.1497.015; Exchange Server 2016 CU19 15.01.2176.012 and CU20 15.01.2242.008; and Exchange Server 2019 CU8 15.02.0792.013 and CU9 15.02.0858.010.
What products are affected by CVE-2021-34473?
Microsoft Corporation Exchange Server.
How severe is CVE-2021-34473?
CVE-2021-34473 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 100.0% (100th percentile) as of Nov 5, 2026.
Activity feed

Recent activity

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

View more in app →
+79 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 evidence140Every report linking this CVE to a named adversary.
Associated malware173Malware families linked to this CVE, with evidence and IOCs.
Detection signatures8YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity5Community discussion across Reddit, Mastodon, and other social sources.