CVE-2022-41082 Overview
CVE-2022-41082 is a critical Remote Code Execution vulnerability affecting Microsoft Exchange Server, commonly known as part of the "ProxyNotShell" exploit chain. This vulnerability allows authenticated attackers with network access to execute arbitrary code on vulnerable Exchange servers through insecure deserialization. The flaw resides in the PowerShell backend of Exchange Server and can be exploited in conjunction with CVE-2022-41040 (an SSRF vulnerability) to achieve full remote code execution.
Critical Impact
This vulnerability is actively exploited in the wild and listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. Attackers can achieve remote code execution on vulnerable Microsoft Exchange servers, potentially leading to complete server compromise, data exfiltration, and lateral movement within enterprise networks.
Affected Products
- Microsoft Exchange Server 2013 Cumulative Update 23
- Microsoft Exchange Server 2016 Cumulative Update 22 and 23
- Microsoft Exchange Server 2019 Cumulative Update 11 and 12
Discovery Timeline
- 2022-10-03 - CVE-2022-41082 published to NVD
- 2025-10-30 - Last updated in NVD database
Technical Details for CVE-2022-41082
Vulnerability Analysis
CVE-2022-41082 exploits insecure deserialization (CWE-502) within Microsoft Exchange Server's PowerShell Remoting interface. The vulnerability allows an authenticated attacker to invoke arbitrary PowerShell commands through the Exchange backend, ultimately leading to remote code execution with SYSTEM privileges on the target server.
The attack requires the adversary to have valid credentials for the Exchange server and adjacent network access. While this may seem limiting, enterprise environments often have compromised credentials available through phishing or other attacks. Once exploitation is successful, the attacker gains full control over the Exchange server, which typically contains sensitive email communications and serves as a high-value target for lateral movement.
This vulnerability is particularly dangerous because Exchange servers are often exposed to internal networks and may have elevated privileges within Active Directory environments. The combination with CVE-2022-41040 (SSRF) creates a complete attack chain known as "ProxyNotShell," which has been observed in active exploitation campaigns.
Root Cause
The root cause of CVE-2022-41082 is insecure deserialization (CWE-502) in Microsoft Exchange Server's PowerShell backend. The vulnerability exists because the Exchange Server improperly validates serialized data before deserializing it, allowing attackers to craft malicious payloads that execute arbitrary code during the deserialization process.
When an authenticated user sends a specially crafted request to the PowerShell Remoting endpoint, the server deserializes untrusted data without proper validation, enabling code execution in the context of the Exchange Server process.
Attack Vector
The attack requires adjacent network access and low-privilege authenticated access to the Exchange environment. The exploitation flow typically involves:
- Attacker obtains valid Exchange credentials through phishing, credential stuffing, or other means
- The attacker leverages CVE-2022-41040 (SSRF) to access the PowerShell backend
- A malicious serialized payload is crafted and sent to the Exchange PowerShell endpoint
- The server deserializes the untrusted payload, triggering arbitrary code execution
- The attacker achieves SYSTEM-level access on the Exchange server
The vulnerability can be exploited remotely through the Autodiscover endpoint, making internet-exposed Exchange servers particularly vulnerable targets.
Detection Methods for CVE-2022-41082
Indicators of Compromise
- Suspicious requests to /autodiscover/autodiscover.json endpoints containing PowerShell in the URL
- Unexpected child processes spawning from w3wp.exe (IIS worker process) on Exchange servers
- Evidence of web shell deployment in Exchange web directories
- Unusual PowerShell command execution originating from Exchange server processes
Detection Strategies
- Monitor IIS logs for requests containing patterns like /autodiscover/autodiscover.json?@evil.com/&Email=autodiscover/autodiscover.json%3f@evil.com
- Implement detection rules for suspicious process creation chains involving w3wp.exe spawning cmd.exe, powershell.exe, or other command interpreters
- Enable PowerShell script block logging and monitor for encoded or obfuscated commands executed in Exchange contexts
- Deploy network-based detection for anomalous traffic patterns to Exchange AutoDiscover endpoints
Monitoring Recommendations
- Enable and review Exchange Server HttpProxy logs for unusual Autodiscover requests
- Configure SIEM alerts for process creation events where w3wp.exe is the parent process
- Monitor Exchange server file system for unauthorized modifications, particularly in web-accessible directories
- Review authentication logs for failed or successful login attempts from unexpected sources or at unusual times
How to Mitigate CVE-2022-41082
Immediate Actions Required
- Apply Microsoft's security updates immediately from the Microsoft Update Guideline
- If patching is not immediately possible, implement URL Rewrite rules to block known exploitation patterns
- Restrict network access to Exchange servers from untrusted networks
- Review Exchange server logs for signs of previous exploitation attempts
Patch Information
Microsoft has released security updates to address CVE-2022-41082 as part of the November 2022 Patch Tuesday. Organizations should apply the latest cumulative updates for their Exchange Server version. Refer to the Microsoft Security Advisory for detailed patching guidance and download links.
Additional technical resources:
Workarounds
- Implement URL Rewrite rules to block requests matching ProxyNotShell exploitation patterns
- Disable remote PowerShell access for non-administrative users where possible
- Use network segmentation to limit access to Exchange management interfaces
- Consider placing Exchange servers behind a web application firewall (WAF) configured to detect deserialization attacks
# IIS URL Rewrite rule to mitigate CVE-2022-41082 (ProxyNotShell)
# Add this rule in IIS Manager > Default Web Site > URL Rewrite > Add Rule(s)
# Block pattern: .*autodiscover\.json.*PowerShell.*
# Alternative: PowerShell command to add mitigation rule
New-WebConfigurationProperty -PSPath "IIS:\Sites\Default Web Site" -Filter "system.webServer/rewrite/rules" -Name "." -Value @{name='ProxyNotShell-Mitigation';stopProcessing='true'}
Set-WebConfigurationProperty -PSPath "IIS:\Sites\Default Web Site" -Filter "system.webServer/rewrite/rules/rule[@name='ProxyNotShell-Mitigation']/match" -Name "url" -Value ".*autodiscover\.json.*PowerShell.*"
Set-WebConfigurationProperty -PSPath "IIS:\Sites\Default Web Site" -Filter "system.webServer/rewrite/rules/rule[@name='ProxyNotShell-Mitigation']/action" -Name "type" -Value "AbortRequest"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


