Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2021-31196: ProxyOracle padding oracle in Microsoft Exchange Server

Published Jul 14, 2021 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS7.2High · v3.1
EPSS54.1%99th percentile
CISA KEVYesAdded Aug 21, 2024
In the wildActivePer CISA KEV
Vendor
Microsoft Corporation
IdentifiersCVE-2021-31196CWE-203

CVE-2021-31196 is a padding-oracle vulnerability in Microsoft Exchange Server Outlook Web Access Form-Based Authentication cookie parsing and a component of the ProxyOracle exploit chain. Exchange stores encrypted username and password data in authentication cookies using AES-CBC. Cookie processing produces distinguishable redirects for cryptographic padding errors and successfully decrypted but invalid credentials, exposing an oracle that permits recovery of encrypted credentials. When chained with the reflected cross-site scripting vulnerability CVE-2021-31195, an attacker can capture a victim's protected authentication cookies and recover the victim's password in plaintext. Microsoft also classifies CVE-2021-31196 as a remote code execution vulnerability, although the described padding-oracle mechanism directly demonstrates credential disclosure rather than code execution.

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.

Exploitation of the padding oracle exposes credentials encrypted in Exchange authentication cookies, including a victim's plaintext password. The ProxyOracle chain bypasses HttpOnly cookie protections to obtain the encrypted data, after which credential recovery can continue without further victim interaction, even after the browser is closed. Remote code execution on affected Exchange Server systems is also identified as an impact, but the available technical details do not establish how the padding oracle alone produces that outcome.

Mitigation

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

Until the security update is deployed, limit exposure of Outlook Web Access and Exchange HTTPS services to trusted networks and users, and monitor for anomalous or repeated malformed FBA-cookie requests and redirect-response probing. These measures reduce exposure but do not eliminate the underlying cryptographic oracle.

Remediation

Patch, then assume compromise.

Apply the Microsoft Exchange Server security update addressing CVE-2021-31196, released on July 13, 2021, or a superseding update appropriate for the installed Exchange version. Address CVE-2021-31195 as well to eliminate the companion reflected cross-site scripting vulnerability used in the ProxyOracle chain.

Public exploits

Exploits

1 exploit validated by Mallory's analysis.

View more in app →
ProxyVulnsThis repository contains operational exploit scripts for multiple high-profile Microsoft Exchange Server vulnerabilities: ProxyLogon (CVE-2021-26855, etc.), ProxyOracle (CVE-2021-31196), and ProxyShell (CVE-2021-34473, CVE-2021-31207). The structure includes four main Python scripts: - 26855.py: Implements the ProxyLogon exploit chain, culminating in the upload of a JScript webshell (api.aspx) to the Exchange server by abusing the OAB virtual directory. It automates the process of obtaining necessary tokens and SIDs, and provides a final webshell URL for remote code execution. - 31196.py: Implements the ProxyOracle padding oracle attack, allowing extraction of plaintext credentials from encrypted session cookies by exploiting a padding oracle vulnerability in OWA. It requires a valid 'cadata' cookie and outputs the decrypted username and password. - 34473.py: Implements the ProxyShell exploit chain, allowing remote PowerShell command execution on the Exchange server. It automates the process of obtaining a valid CommonAccessToken and then uses pypsrp to execute arbitrary PowerShell scripts remotely. - 31207.py: Works with 34473.py to deliver arbitrary files (e.g., malicious PDFs) to user mailboxes and then exports mailbox contents to a specified UNC path, leveraging Exchange's mailbox export features. A users.txt file provides a list of default or known usernames to assist in the exploitation process. The README.md gives usage instructions and references for each exploit. The scripts are operational and automate the full exploitation process, including credential extraction, webshell upload, remote command execution, and file delivery. The main attack vector is network-based, targeting exposed Exchange web services (ECP, OWA, Autodiscover, EWS, and PowerShell endpoints).hosch3n · Disclosed Apr 14, 2021 · python · networkOperational
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-2021-31196 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Aug 21, 2024.
Is there a public exploit for CVE-2021-31196?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2021-31196, the earliest disclosed Apr 14, 2021.
Is there a patch for CVE-2021-31196?
Apply the Microsoft Exchange Server security update addressing CVE-2021-31196, released on July 13, 2021, or a superseding update appropriate for the installed Exchange version. Address CVE-2021-31195 as well to eliminate the companion reflected cross-site scripting vulnerability used in the ProxyOracle chain.
What products are affected by CVE-2021-31196?
Microsoft Corporation Exchange Server.
How severe is CVE-2021-31196?
CVE-2021-31196 has a CVSS v3.1 score of 7.2 (High) and an EPSS score of 54.1% (99th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

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

View more in app →
+2 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 evidenceEvery report linking this CVE to a named adversary.
Associated malware1Malware families linked to this CVE, with evidence and IOCs.
Detection signatures1YARA, 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.