Windows Error Reporting Service ALPC Local Privilege Escalation (CVE-2026-20817)
by dwgth4i · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-20817
- Category
- binary
- Affected product
- Windows Error Reporting Service (WerSvc)
- Affected versions
- Windows builds where WerSvc exposes the \WindowsErrorReportingServicePort ALPC port to unprivileged callers
- Disclosed
- 2026-07-05
- Patch status
- unpatched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-05 |
| Author / Researcher | dwgth4i |
| CVE / Advisory | CVE-2026-20817 |
| Category | binary |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | windows, wersvc, alpc, lpe, privilege-escalation, ntdll, system32, native-cpp |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Windows Error Reporting Service (WerSvc) |
| Versions Affected | Windows builds where WerSvc exposes the \WindowsErrorReportingServicePort ALPC port to unprivileged callers |
| Language / Platform | C++ (PoC); Windows / ntdll ALPC APIs |
| Authentication Required | Local-only (any authenticated low-privilege user) |
| Network Access Required | No |
Summary
CVE-2026-20817 abuses an ALPC-based elevation primitive in the Windows Error Reporting Service. WerSvc listens on the \WindowsErrorReportingServicePort ALPC port and, upon receiving a specially crafted WERSVC_MSG request with the SvcElevatedLaunch message flag set, spawns WerFault.exe as SYSTEM using a command line the caller controls through a shared file mapping. Because the service does not adequately restrict who can supply this elevated-launch command line, a low-integrity or medium-integrity local process can connect to the port, hand over a file-mapping handle containing an attacker-chosen command-line string, and cause WerSvc to elevate and execute WerFault.exe with that string as SYSTEM. The included PoC resolves the necessary native ALPC APIs, builds a correctly sized WERSVC_MSG structure matching the service’s expected struct layout, and sends it over the port to trigger the elevated launch.
Vulnerability Details
Root Cause
WerSvc’s ALPC message handler for the SvcElevatedLaunch case (message flags 0x50000000) reads a command-line string from a caller-supplied file-mapping handle and passes it — without adequate authorization checks on the mapping’s contents — to a routine that spawns WerFault.exe as SYSTEM. The PoC reverse engineers the exact WERSVC_MSG struct layout (offsets for MessageFlags, LastError, FileMapping, SourceHandles, HandleCount, NewProcessHandle, totalling 0x578 bytes) required for the server to accept the message as a valid elevated-launch request.
Attack Vector
- Attacker process resolves
NtAlpcConnectPort/NtAlpcSendWaitReceivePortfromntdll.dll. - Attacker creates a shared file mapping of
0x208bytes and writes an attacker-controlled command-line argument string (e.g., appended toWerFault.exe) into it. - Attacker connects to the
\WindowsErrorReportingServicePortALPC port with port attributes matching WerSvc’s expectedMaxMessageLength(0x578). - Attacker builds a
WERSVC_MSGwithMessageFlags = 0x50000000,Unknown = 1, andFileMappingset to the shared mapping handle, then sends it viaNtAlpcSendWaitReceivePort. - WerSvc reads the command line from the mapping and launches
WerFault.exeas SYSTEM with the attacker-supplied arguments, returning a handle to the new SYSTEM process to the caller.
Impact
A local low-privilege user can obtain a SYSTEM-level process handle, achieving local privilege escalation to SYSTEM on affected Windows hosts.
Environment / Lab Setup
Target: Windows 10/11 host with WerSvc running and its ALPC port reachable from a standard user session
Attacker: Windows build environment (MSVC/cl.exe or Visual Studio) linking ntdll.lib and advapi32.lib to compile poc.cpp
Proof of Concept
PoC Script
See
poc.cppandntalpcapi.hin this folder.
| |
The compiled binary resolves the ALPC functions, prints the caller’s current integrity level/user, builds the shared file mapping containing the injected command-line payload, connects to the WerSvc ALPC port, sends the crafted WERSVC_MSG, and then inspects the returned process handle’s token to confirm it was spawned as SYSTEM.
Detection & Indicators of Compromise
Signs of compromise:
WerFault.exelaunched as SYSTEM with an unexpected or attacker-supplied command line.- A low-privilege process holding an open handle to a newly spawned SYSTEM-level process.
- Unusual
NtAlpcConnectPortactivity targeting\WindowsErrorReportingServicePortfrom user-mode applications that are not part of the normal WER pipeline.
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor for advisory |
| Interim mitigation | Restrict which local users/processes can reach WerSvc’s ALPC port (e.g., via AppLocker/WDAC and least-privilege interactive sessions); monitor for anomalous WerFault.exe SYSTEM launches. |
References
Notes
Mirrored from https://github.com/dwgth4i/CVE-2026-20817 on 2026-07-05.
| |