Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2022-41040: ProxyNotShell: Authenticated SSRF in Microsoft Exchange Server

Published Oct 3, 2022 · Updated 13 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS100.0%100th percentile
CISA KEVYesAdded Sep 30, 2022
In the wildActivePer CISA KEV
Vendor
Microsoft Corporation
IdentifiersCVE-2022-41040CWE-918 · Server-Side Request Forgery (SSRF)
Also known asproxynotshell

CVE-2022-41040 is an authenticated server-side request forgery vulnerability affecting on-premises Microsoft Exchange Server 2013, 2016, and 2019. Insufficient input filtering in the Autodiscover mechanism allows an attacker with valid low-privilege Exchange credentials to direct requests to the privileged Exchange PowerShell endpoint. It forms the first stage of the ProxyNotShell exploit chain, enabling attackers to reach and trigger the separate remote code execution vulnerability CVE-2022-41082. Microsoft classifies CVE-2022-41040 as an elevation-of-privilege vulnerability. Exploitation was observed in the wild in 2022. Exchange Online is unaffected.

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.

Successful exploitation crosses an Exchange privilege boundary and exposes privileged PowerShell functionality to an authenticated attacker. When chained with CVE-2022-41082, it enables arbitrary code execution in the SYSTEM context, potentially compromising the confidentiality, integrity, and availability of the Exchange server. Observed chained exploitation has supported backdoor deployment, persistence, and lateral movement. Remote code execution should not be attributed to the SSRF flaw alone.

Mitigation

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

Until updates can be installed, apply Microsoft's revised ProxyNotShell IIS URL Rewrite or equivalent WAF filtering guidance against decoded request URIs to block malicious Autodiscover-to-PowerShell requests. Restrict external Exchange access through firewall or VPN controls, disable Remote PowerShell for non-administrative users where feasible, and allow-list necessary outbound connections from Exchange servers. These measures reduce exposure but do not replace patching: network restrictions do not prevent exploitation by attackers already inside the network, and ProxyNotShell URL rewrite rules do not block the separate OWASSRF chain. Review IIS logs and endpoint telemetry for suspicious Autodiscover requests and unexpected PowerShell-related execution.

Remediation

Patch, then assume compromise.

Install the applicable Microsoft Exchange security updates released on November 8, 2022, addressing CVE-2022-41040 and CVE-2022-41082, or superseding updates. The fixes are covered by KB5019758 for affected Exchange Server 2013, 2016, and 2019 deployments. Verify successful installation and review exposed servers for evidence of prior exploitation; patching does not remove existing attacker access or persistence. Exchange Online customers require no action for this vulnerability.

Public exploits

Exploits

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

View more in app →
exchange_proxynotshell_rce.rbThis repository contains a single Metasploit module: 'exchange_proxynotshell_rce.rb', which exploits the ProxyNotShell vulnerabilities (CVE-2022-41040 and CVE-2022-41082) in Microsoft Exchange Server 2019. The exploit chains an SSRF (Server-Side Request Forgery) and a deserialization flaw to achieve remote code execution on the target Exchange server. The attacker must have valid credentials to authenticate. The module supports two payload types: direct command execution and Windows executable dropper. The exploit interacts with Exchange's HTTP endpoints, specifically '/mapi/nspi/' for version checking and '/Autodiscover/autodiscover.json' for the SSRF and PowerShell backend access. The code is operational and leverages Metasploit's payload system, allowing for customizable payloads. The repository is structured as a typical Metasploit exploit module, with all logic contained in a single Ruby file.Disclosed Sep 28, 2022 · Framework: metasploit · ruby · networkWeaponizedCVE-2022-41040-POCThis 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.kljunowsky · Disclosed Oct 9, 2022 · python · markdown · networkPoCCVE-2022-41040-metasploit-ProxyNotShellThis 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.TaroballzChen · Disclosed Oct 20, 2022 · 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-2022-41040 exploited in the wild?
Yes. As of Nov 4, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Sep 30, 2022.
Is there a public exploit for CVE-2022-41040?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2022-41040, the earliest disclosed Sep 28, 2022.
Is there a patch for CVE-2022-41040?
Install the applicable Microsoft Exchange security updates released on November 8, 2022, addressing CVE-2022-41040 and CVE-2022-41082, or superseding updates. The fixes are covered by KB5019758 for affected Exchange Server 2013, 2016, and 2019 deployments.
What products are affected by CVE-2022-41040?
Microsoft Corporation Exchange Server.
How severe is CVE-2022-41040?
CVE-2022-41040 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 100.0% (100th percentile) as of Nov 4, 2026.
Activity feed

Recent activity

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

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