Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
HighCISA KEVExploited in the wildPublic exploit

ProxyNotShell SSRF in Microsoft Exchange Server

IdentifiersCVE-2022-41040CWE-918· Server-Side Request Forgery (SSRF)Also known asproxynotshell

CVE-2022-41040 is a server-side request forgery vulnerability in on-premises Microsoft Exchange Server 2013, 2016, and 2019. In the ProxyNotShell exploit chain, an authenticated attacker abuses the Exchange Autodiscover mechanism and insufficient input filtering to reach the privileged Exchange PowerShell endpoint (/powershell). Microsoft and multiple supporting sources describe CVE-2022-41040 as the first stage that enables an authenticated attacker to remotely trigger CVE-2022-41082. Public reporting indicates the flaw can be exercised with valid Exchange credentials and crafted HTTP requests, including Autodiscover/PowerShell access patterns, after which the attacker can interact with Exchange PowerShell remoting and proceed to code execution through the chained vulnerability.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

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

By itself, CVE-2022-41040 provides authenticated SSRF access into sensitive Exchange backend functionality and is primarily impactful as the entry point for the ProxyNotShell chain. When chained with CVE-2022-41082, attackers can execute arbitrary commands via Exchange PowerShell in the context of SYSTEM, deploy web shells or backdoors, conduct reconnaissance, exfiltrate data, and pivot laterally into the broader Windows/Active Directory environment. The vulnerability was exploited in the wild in targeted attacks.

Mitigation

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

If immediate patching is not possible, implement Microsoft's interim mitigation for CVE-2022-41040 using IIS URL Rewrite or equivalent WAF filtering to block malicious Autodiscover-to-PowerShell request patterns. The provided advisory specifically recommends a rule matching .*autodiscover.json.Powershell. against {UrlDecode:{REQUEST_URI}} and notes Microsoft released an Exchange Emergency Mitigation (M1) for this issue via URL Rewrite. Restrict or disable remote access to Exchange PowerShell where operationally feasible, reduce internet exposure of OWA/Exchange endpoints, and limit outbound connectivity from Exchange servers with allow-listing to hinder post-exploitation.

Remediation

Patch, then assume compromise.

Apply Microsoft's security updates for Exchange Server 2013, 2016, and 2019 that address CVE-2022-41040; the content states Microsoft released updates on November 8, 2022. Organizations running affected on-premises Exchange versions should install the official fixes rather than relying on temporary mitigations alone. Also ensure any related Exchange cumulative/security updates required by Microsoft are fully applied across all exposed servers.
PUBLIC EXPLOITS

Exploits

2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (2 hidden).

VALID 2 / 4 TOTALView more in app
CVE-2022-41040-POCMaturityPoCVerified exploit

This repository provides a proof-of-concept (POC) exploit for CVE-2022-41040, a Server Side Request Forgery (SSRF) vulnerability in Microsoft Exchange Server. The repository contains two files: a Python script (CVE-2022-41040.py) and a README.md. The Python script automates the process of downloading SSRF payload templates, replacing a placeholder with an attacker-supplied OOB domain, and generating a list of formatted payloads for mass testing using ffuf and unfurl. The README.md explains both manual and automated exploitation steps, provides example payloads, and lists required tools. The exploit's main capability is to trigger SSRF requests from Exchange servers to an attacker-controlled domain, allowing the attacker to confirm the vulnerability via OOB interactions. The repository is structured for both manual and automated mass exploitation, targeting the /autodiscover/autodiscover.json endpoint on Exchange servers. No weaponized or post-exploitation payloads are included; the focus is on vulnerability verification.

kljunowskyDisclosed Oct 9, 2022pythonmarkdownnetwork
CVE-2022-41040-metasploit-ProxyNotShellMaturityPoCVerified exploit

This repository contains a Python proof-of-concept exploit for CVE-2022-41040, a server-side request forgery (SSRF) vulnerability in Microsoft Exchange Server. The repository consists of a README with usage instructions and a single Python script, 'microsoft_exchange_server_proxynotshell_ssrf.py'. The script is designed to be used as a custom module in Metasploit but is written in standalone Python, not Ruby. It requires the 'requests' library and interacts with the target Exchange server by sending crafted HTTP requests to the '/autodiscover/autodiscover.json' endpoint, attempting to trigger SSRF. The exploit uses the public DNSLog service (dnslog.cn) to detect if the Exchange server makes outbound DNS requests, confirming the SSRF vulnerability. The script also attempts to extract additional information from the Exchange server via the '/mapi/nspi' endpoint. The exploit requires valid authentication to the Exchange server and is intended for security testing and vulnerability confirmation. No weaponized or post-exploitation payload is included; the script is a POC for detection and confirmation of the SSRF flaw.

TaroballzChenDisclosed Oct 20, 2022pythonnetwork
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

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

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, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence57

Every observed campaign linking this CVE to a named adversary.

Associated malware20

Malware families riding this exploit, with evidence and IOCs.

Detection signatures2

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity1

Community discussion across Reddit, Mastodon, and other social sources.