May 15, 2026·5 min read·1457 visits
Actively exploited reflected XSS in Exchange Server OWA allows unauthenticated attackers to hijack authenticated sessions via crafted URLs. Microsoft released out-of-band updates and an IIS URL rewrite mitigation (EEMS M2) to address the flaw.
CVE-2026-42897 is a high-severity reflected Cross-Site Scripting (XSS) vulnerability affecting the Outlook on the web (OWA) component of Microsoft Exchange Server. The flaw stems from improper neutralization of user-supplied input during web page generation. Discovered as a zero-day and actively exploited in the wild, the vulnerability allows unauthenticated attackers to execute arbitrary JavaScript within the security context of a targeted user's session, facilitating session hijacking and identity spoofing.
Microsoft Exchange Server provides the Outlook on the web (OWA) component, functioning as a web-based email client for enterprise environments. OWA processes various HTTP requests, parsing URL parameters and query strings to render dynamic HTML content for authenticated users. This web interface represents a significant external attack surface, as it is frequently exposed directly to the internet to support remote workforce connectivity.
CVE-2026-42897 identifies a high-severity vulnerability within this OWA component, specifically categorized as CWE-79: Improper Neutralization of Input During Web Page Generation. The vulnerability manifests as a reflected Cross-Site Scripting (XSS) condition. Input parameters supplied via HTTP requests are not correctly validated or HTML-encoded before being returned in the server's HTTP response.
Threat actors are actively exploiting this vulnerability in the wild as a zero-day. Successful exploitation requires an attacker to convince an authenticated OWA user to click a specially crafted URL. Due to the lack of input sanitization, the OWA server reflects the attacker's payload, resulting in arbitrary JavaScript execution within the security context of the victim's session.
The root cause of CVE-2026-42897 lies in the server-side rendering logic of the Exchange OWA component. When a client initiates an HTTP GET request containing specific URL paths or query string parameters, the OWA application processes these values to generate the user interface. The vulnerability occurs because the application fails to apply context-aware output encoding before embedding these user-controlled values into the HTML Document Object Model (DOM).
In a secure implementation, characters with special syntactical meaning in HTML, such as angle brackets and quotation marks, must be converted to their corresponding HTML entities. The vulnerable OWA endpoint echoes the raw input directly back to the client. When the victim's browser parses the server response, it interprets the unsanitized input as executable code rather than plain text.
GET /owa/auth/logon.aspx?replaceCurrent=1&url=<script>alert(document.cookie)</script> HTTP/1.1
Host: mail.example.comThe resulting response contains the injected <script> tags without proper neutralization. Because the script originates from the legitimate OWA domain, it bypasses the Same-Origin Policy (SOP). The browser executes the payload under the assumption that the application intentionally served it, granting the script access to the DOM, session cookies, and local storage associated with the Exchange environment.
Exploitation of CVE-2026-42897 requires the attacker to construct a malicious URL targeting a vulnerable OWA instance. The URL incorporates a JavaScript payload within the specific unsanitized parameters. Since the vulnerability is a reflected XSS, the attacker cannot store the payload on the server. Instead, they must deliver the crafted link to the target user via external channels, such as spear-phishing emails, SMS, or embedding it within a malicious website.
When the victim clicks the link, their browser issues a request to the Exchange server, appending any active session cookies to the request. The Exchange server processes the request and returns the HTML response containing the reflected JavaScript. The victim's browser executes the script immediately upon rendering the page.
The execution occurs within the context of the victim's active authentication session. The primary objective of the attacker's payload is typically session hijacking. The script extracts session tokens or authentication cookies and transmits them asynchronously to an attacker-controlled infrastructure. The attacker then uses these captured credentials to authenticate to the Exchange server, spoofing the victim's identity without requiring the underlying plaintext password.
The successful exploitation of CVE-2026-42897 results in unauthorized access to the victim's Exchange Web Services session. By capturing the session token, the attacker assumes the identity of the authenticated user. This allows the attacker to interact with the OWA interface directly, bypassing primary authentication mechanisms such as Multi-Factor Authentication (MFA), provided the session token remains valid.
Once the session is hijacked, the attacker gains access to the victim's mailbox. The attacker can read sensitive correspondence, exfiltrate file attachments, and send emails on behalf of the compromised user. This capability facilitates lateral movement within the organization, as the attacker can leverage the trusted internal account to launch further phishing campaigns or distribute malware to internal employees.
The Common Vulnerability Scoring System (CVSS) vector reflects the severity of this impact. The vulnerability carries a High base score of 8.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N). The confidentiality and integrity metrics are both rated as High because the attacker gains full read and write access to the targeted mailbox. The availability metric remains None, as the vulnerability does not inherently crash the Exchange service or deny access to legitimate users.
Microsoft addressed CVE-2026-42897 through the release of out-of-band Security Updates (SUs) and Cumulative Updates (CUs) on May 14, 2026. Administrators must apply these updates to vulnerable Exchange Server 2016, 2019, and Subscription Edition environments. The patch introduces comprehensive input validation and output encoding routines to ensure that OWA parameters are properly sanitized before rendering.
In addition to the software patch, Microsoft deployed an emergency mitigation via the Exchange Emergency Mitigation Service (EEMS). The mitigation, identified as M2 (or M2.1), functions as an IIS URL Rewrite Rule. This rule actively inspects incoming HTTP requests directed at the OWA component and blocks patterns that match known exploitation vectors.
Get-ExchangeServer -Identity <ServerName> | Format-List Name,MitigationsAppliedAdministrators can verify the successful deployment of the EEMS mitigation by querying the Exchange Server configuration using PowerShell. Organizations should also review Internet Information Services (IIS) logs for historical evidence of exploitation. Security teams should search for anomalous query strings or URL paths containing encoded script tags or unusual JavaScript methods accessing the OWA endpoints. Identification of such patterns indicates a potential compromise, requiring immediate password resets and session revocation for affected accounts.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Microsoft Exchange Server 2016 Microsoft | <= Cumulative Update 23 | Cumulative Update 23 May 2026 SU |
Microsoft Exchange Server 2019 Microsoft | <= Cumulative Update 15 | Cumulative Update 14/15 May 2026 SU |
Microsoft Exchange Server Subscription Edition Microsoft | RTM | May 2026 SU |
| Attribute | Detail |
|---|---|
| CWE | CWE-79 |
| Attack Vector | Network |
| CVSS Score | 8.1 |
| Impact | Session Hijacking / High Confidentiality & Integrity |
| Exploit Status | Actively Exploited |
| KEV Status | Listed |
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
SpamScope mail-parser versions 3.8.0 prior to 4.6.0 contain a path traversal vulnerability (CWE-22) within the write_attachments() and write_sample() functions. The library passes untrusted attachment filenames directly into os.path.join() without stripping directory components, validating path containment, or verifying symbolic links. An attacker can send a crafted email containing relative path traversal sequences or absolute filesystem paths in the Content-Disposition header to write or overwrite arbitrary files accessible to the parsing process.
A Regular Expression Denial of Service (ReDoS) vulnerability exists in SpamScope mail-parser versions 4.2.0 prior to 4.6.1. Two separate regular expressions evaluated during standard email header parsing exhibit quadratic to cubic backtracking complexity when processing headers padded with whitespace or angle brackets. An unauthenticated remote attacker can exploit this flaw by sending a small, RFC-compliant email message, causing parsing worker threads or processes to stall at 100% CPU utilization for extended periods.
CVE-2026-129297 is an origin validation vulnerability (CWE-345) in the Python library mail-parser prior to version 4.6.2. The MailParser.get_server_ipaddress() method fails to properly isolate MTA-recorded client IP addresses from sender-controlled text within email Received headers. Due to naive substring delimiter matching, appearance-based regular expression scanning, and fail-open header traversal, remote attackers can spoof their originating IP address to bypass email security controls, blocklists, and anti-spam attribution.
CVE-2026-129299 (GHSA-24mq-4vc6-2prf) is a parsing and serialization flaw in SpamScope mail-parser prior to version 4.6.2. The library uses reflective Python attribute resolution (getattr) over untrusted email header names and applies caller convenience transformations (such as underscore-to-hyphen folding and _json/_raw suffix stripping) directly to wire headers. An unauthenticated remote attacker can send crafted emails that trigger uncaught TypeError exceptions during JSON serialization or cause security-relevant headers and body content to be silently dropped without setting defect indicators.
CVE-2026-129236 is a command-line argument injection vulnerability (CWE-88) in Kubeshark, an eBPF-based network observability tool for Kubernetes. Located within the Model Context Protocol (MCP) server implementation in cmd/mcpRunner.go, the flaw occurs when handling the start_kubeshark tool request. When the MCP server runs with the --allow-destructive flag, the callStartKubeshark function appends the caller-supplied pod_regex parameter directly to the kubeshark tap argument slice without an end-of-options (--) delimiter. Because Kubeshark uses the Cobra and pflag libraries for command-line parsing, any pod_regex value prefixed with a hyphen is interpreted as a CLI flag rather than a positional regular expression. An attacker capable of influencing MCP tool arguments, such as through indirect prompt injection against a connected Large Language Model (LLM) agent, can inject the --set flag to override Helm chart values like tap.docker.registry. Because Kubeshark deploys its worker DaemonSet with privileged security contexts and host networking enabled, redirecting the container image registry allows arbitrary code execution as root across all Kubernetes cluster nodes.
Kubeshark versions 53.1.0 prior to 53.4.0 contain an arbitrary file write and path traversal vulnerability (CWE-22) alongside an argument injection vulnerability (CWE-88) in the Model Context Protocol (MCP) server implementation (cmd/mcpRunner.go). The download_file tool fails to validate caller-supplied path and dest arguments, allowing an attacker who influences an AI agent driving kubeshark mcp to write Kubeshark Hub API responses to arbitrary locations writable by the local user. Additionally, the start_kubeshark tool appends the pod_regex argument without flag delimiters, allowing argument injection into the kubeshark tap subcommand.