Skip to main content
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 Microsoft Exchange Server vulnerability affecting on-premises Exchange Server 2013, 2016, and 2019. Although some sources label it as an elevation-of-privilege issue, the provided content consistently identifies the underlying flaw as a server-side request forgery (SSRF) vulnerability that can be used by an authenticated attacker to reach internal Exchange functionality. In the ProxyNotShell exploit chain, CVE-2022-41040 is used to remotely trigger CVE-2022-41082 via Exchange PowerShell access, enabling follow-on code execution. Microsoft reported in-the-wild exploitation and stated that successful exploitation can allow the attacker to run PowerShell in the context of SYSTEM when chained appropriately. The issue was publicly disclosed in late September 2022, with Microsoft security updates released on November 8, 2022.

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 an authenticated attacker with a network-reachable SSRF primitive against vulnerable on-premises Exchange servers. In practice, the content shows it was primarily exploited as part of the ProxyNotShell chain with CVE-2022-41082, resulting in remote code execution, SYSTEM-level PowerShell execution, web shell deployment, mailbox and server compromise, data exfiltration, persistence, and potential lateral movement into Active Directory and the broader enterprise environment. Microsoft assessed confidentiality, integrity, and availability impact as High and assigned CVSS 3.1 8.8.

Mitigation

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

Before patching, apply Microsoft's recommended IIS URL Rewrite mitigation for CVE-2022-41040 / ProxyNotShell. The provided advisory specifies filtering requests matching .*autodiscover.json.Powershell. using {UrlDecode:{REQUEST_URI}} and excluding the @ symbol. Microsoft also released Exchange Emergency Mitigation Service mitigation M1 for CVE-2022-41040 as a URL Rewrite configuration; rollback is performed by removing the IIS URL Rewrite rule named "EEMS M1.1 PowerShell - inbound" from the Default Web Site. Additional defensive measures in the content include restricting Exchange PowerShell exposure, enabling Exchange Emergency Mitigation Service, ensuring Exchange AMSI integration is enabled and functioning, auditing antivirus exclusions on Exchange paths, and limiting outbound connections from Exchange servers via allow-listed proxies.

Remediation

Patch, then assume compromise.

Install Microsoft's November 8, 2022 security updates for affected Exchange Server 2013, 2016, and 2019 deployments. Microsoft stated that customers running affected on-premises Exchange versions should apply those updates to be protected. Exchange Online customers do not need to take action. Because this vulnerability was actively exploited, rapid patching is the primary remediation.
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 malware18

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.