CVE-2021-31195: Microsoft Exchange Server CAS Reflected Cross-Site Scripting
- Vendor
- Microsoft Corporation
CVE-2021-31195 is a reflected cross-site scripting vulnerability in the Microsoft Exchange Server Client Access Server frontend. Exchange fails to sanitize attacker-controlled data before embedding it in JSON on an Outlook Web Access error page, allowing injected JavaScript to execute in the security context of a victim's Exchange origin. It is one component of the ProxyOracle exploit chain with CVE-2021-31196.
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.
An attacker can execute arbitrary JavaScript in a victim's browser under the affected Exchange origin. In the ProxyOracle chain, the XSS can be used to configure Exchange proxy behavior that causes victim browser requests to be relayed to attacker-controlled infrastructure, enabling interception of HttpOnly-protected Form-Based Authentication cookies. Those cookies can subsequently be subjected to the CVE-2021-31196 padding oracle to recover Exchange credentials in plaintext.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, reduce exposure of internet-facing Exchange services, restrict access to Exchange administrative and client access endpoints to trusted networks where operationally feasible, and monitor for suspicious activity targeting Exchange. The available information does not provide a vulnerability-specific mitigation beyond vendor patching.
Remediation
Patch, then assume compromise.
Apply Microsoft's May 11, 2021 security update for Microsoft Exchange Server addressing CVE-2021-31195.
Exploits
1 exploit validated by Mallory's analysis.
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.
Frequently asked questions
- Is CVE-2021-31195 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2021-31195 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2021-31195?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2021-31195, the earliest disclosed Apr 14, 2021.
- Is there a patch for CVE-2021-31195?
- Apply Microsoft's May 11, 2021 security update for Microsoft Exchange Server addressing CVE-2021-31195.
- What products are affected by CVE-2021-31195?
- Microsoft Corporation Exchange Server.
- How severe is CVE-2021-31195?
- CVE-2021-31195 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 73.7% (100th percentile) as of Oct 16, 2026.
Recent activity
4 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.