CVE-2026-41089 — Windows Netlogon Remote Code Execution Vulnerability
Executive Summary
Stack-based buffer overflow in Windows Netlogon allows an unauthorized attacker to execute code over a network.
Overview
Verified Attribution
Binary/function confirmed from a public vendor or researcher report; this pin overrides the keyword heuristic.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C
EPSS Score
Affected Products
| Product | KB Article | Severity | Impact | Restart Required |
|---|---|---|---|---|
| Windows Server 2012 | 5087470 (Monthly Rollup) |
Critical | Remote Code Execution | Yes |
| Windows Server 2012 (Server Core installation) | 5087470 (Monthly Rollup) |
Critical | Remote Code Execution | Yes |
| Windows Server 2012 R2 | 5087471 (Monthly Rollup) |
Critical | Remote Code Execution | Yes |
| Windows Server 2012 R2 (Server Core installation) | 5087471 (Monthly Rollup) |
Critical | Remote Code Execution | Yes |
| Windows Server 2016 | 5087537 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows Server 2016 (Server Core installation) | 5087537 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows Server 2019 | 5087538 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows Server 2019 (Server Core installation) | 5087538 (Security Update) |
Critical | Remote Code Execution | Yes |
| Windows Server 2022 5087545 (Security Update) 5087424 (Security Hotpatch Update) Critical Remote Code Execution 5082142 Base: 9.8 Temporal: 8.5 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 10.0.20348.5139 10.0.20348.5074 Yes None Windows Server 2022 (Server Core installation) 5087545 (Security Update) 5087424 (Security Hotpatch Update) Critical Remote Code Execution 5082142 Base: 9.8 Temporal: 8.5 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C 10.0.20348.5139 10.0.20348.5074 Yes None Windows Server 2022, 23H2 Edition (Server Core installation) | 5087541 (Security Update) |
Critical | Remote Code Execution | Yes |
Patches
| Article | Type | Restart |
|---|---|---|
5087470 |
Monthly Rollup | Yes |
5087471 |
Monthly Rollup | Yes |
5087537 |
Security Update | Yes |
5087538 |
Security Update | Yes |
5087541 |
Security Update | Yes |
Patch Diff
Two bugs in the Windows Netlogon DC-Locator response serialization path of netlogon.dll (SYSTEM on a DC), reachable pre-auth over CLDAP (UDP 389), the Netlogon mailslot \MAILSLOT\NET\NETLOGON and RPC. (1) CWE-121 stack buffer overflow in BuildSamLogonResponse/PrimaryQueryHandler: they serialize Unicode strings (domain/DNS/computer name), GUIDs, DNS compression and flags into a fixed 528-byte stack buffer via NetpLogonPutUnicodeString but IGNORED its return value; a near-max input string leaves the write cursor past the buffer or undefined, and subsequent NetpLogonPutBytes/GUID/flag writes corrupt adjacent stack (the DNS NlpUtf8ToCutf8 path already checked its return - the guard was missing only at the NetpLogonPutUnicodeString sites). (2) CWE-908/CWE-200 uninitialized-stack disclosure in NlGetLocalPingResponse: a 528-byte stack buffer Src is used uninitialized, then Size[0] bytes are memcpy'd to a heap buffer for transmission, so inter-field padding leaks prior stack contents (frame pointer, return address, auth-token remnants) to the unauthenticated requester. IN-HOUSE ghidriff of netlogon.dll 10.0.26100.7623 -> .8521 (fix ships May 2026, KB5087539) confirms, gated behind CFR flag Feature_740537659: NetpLogonPutUnicodeString changed void->value-returning (old body kept as NetpLogonPutUnicodeStringOld); BuildSamLogonResponse (3 calls: 0x24/0x82/0x20) and PrimaryQueryHandler (2 calls) now return-check and bail with 1355 on failure; NlGetLocalPingResponse adds memset(Src,0,0x208). Note: our diff shows Feature_740537659, differing from the circulated screenshots' Feature_1008973115 (build/arch difference); the return-checks and memset are identical. Critical (9.8/8.5), AV:N pre-auth, SYSTEM.
| Function | Address | Change | Note |
|---|---|---|---|
BuildSamLogonResponse |
code change |
code (NetpLogonPutUnicodeString return-checked, CFR-gated) | Pre: NetpLogonPutUnicodeStringOld(v10,36)/(a4,130)/(a1+36,32) with return ignored -> cursor may run past the fixed 528-byte stack buffer, later GUID/flag writes overflow. Post (Feature_740537659): three NetpLogonPutUnicodeString calls (0x24/0x82/0x20) in a nested if chain, return-checked; on failure returns 1355 (ERROR_NO_LOGON_SERVERS) with no further writes. |
PrimaryQueryHandler |
code change |
code (return checks added, CFR-gated) | Two NetpLogonPutUnicodeString calls gain return checks; return 0 on serialization failure instead of continuing from a bad write position. |
NlGetLocalPingResponse |
code change |
code (zero-init response buffer, CFR-gated) | Adds memset(Src,0,0x208) right after the NlGlobalMemberWorkstation check, zeroing the 528-byte stack buffer before it is populated and memcpy'd to the transmit buffer -> no uninitialized stack in the response (CWE-908/200). |
NetpLogonPutUnicodeString |
code change |
code (now returns status) | Signature changed void -> value-returning so callers can detect insufficient buffer; the original void body is preserved as NetpLogonPutUnicodeStringOld. |
Feature_740537659 |
gate |
added (CFR gate) | CFR flag gating all three fixes; original paths still ship when disabled. |
Root Cause Analysis
CVE-2026-41089 — Windows Netlogon netlogon.dll DC-Locator Response Serialization: Stack Overflow + Uninitialized-Stack Disclosure
Summary
| Product | Windows Server — netlogon.dll (Netlogon service; DC Locator response serialization) |
| CVE ID | CVE-2026-41089 |
| Impact | Remote Code Execution |
| MSRC severity | Critical |
| CVSS | 9.8 / 8.5 — CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C |
| CWE | CWE-121: Stack-based Buffer Overflow (primary); CWE-908/CWE-200: Uninitialized-stack information disclosure (secondary) |
| Delivery | Pre-auth network — CLDAP (UDP 389), the Netlogon mailslot \MAILSLOT\NET\NETLOGON, and RPC/internal paths |
| KB / Fixed build | KB5087539 — netlogon.dll (Windows Server 2025; fix ships May 2026) |
| Patch Date | May 12, 2026 (2026-May) |
| Pre-patch binary (pre-fix baseline) | netlogon.dll 10.0.26100.7623 — SHA256 bc121ba6fbdf7a9dcd5a17e5f9101a65f88c267271026a468f116fd189fc327d |
| Post-patch binary (fix present) | netlogon.dll 10.0.26100.8521 — SHA256 412f24dd12b61370a24df5859fe5872b5144425de67eaa9c24a1922e02d5a168 |
| Feature flag | Feature_740537659 — the fix is CFR-gated |
| Exploitability | Exploitation Less Likely; not publicly disclosed; not exploited (per MSRC) |
Product Description
netlogon.dll is the Windows Netlogon service (runs as SYSTEM on a domain
controller). Its DC Locator response path serializes a SamLogon / ping
response — Unicode strings (domain name, DNS domain name, computer name), GUIDs,
DNS compression data and Netlogon flags — into a fixed 528-byte stack buffer,
advancing a write cursor as it goes. These responses are reachable before
authentication over CLDAP (UDP 389), the Netlogon mailslot and RPC.
Vulnerability Summary
This patch fixes two distinct bugs in the same serialization path.
1. Stack-based buffer overflow (CWE-121) — BuildSamLogonResponse / PrimaryQueryHandler
The serializers call NetpLogonPutUnicodeString to write each Unicode string and
advance the write position, but ignored its return value. When an input string
is near the buffer’s remaining capacity, the write can run past the buffer
boundary or leave the cursor in an undefined state; subsequent
NetpLogonPutBytes / GUID / flag writes then corrupt adjacent stack memory. The
caller’s buffer is only 528 bytes, but a near-max Unicode string combined with a
GUID pair, DNS compression data and version flags can exceed it. Notably the DNS
path (NlpUtf8ToCutf8) already checked its return and aborted on failure — the
defensive check was missing only at the NetpLogonPutUnicodeString sites.
// BuildSamLogonResponse (pre-fix) — from our diff
NetpLogonPutUnicodeString(v10, 36, &v27); // return ignored
NetpLogonPutUnicodeString(a4, 130, &v27); // return ignored
NetpLogonPutUnicodeString(a1 + 36, 32, &v27);// return ignored -> cursor may be past end
// ... GUID / flag writes then corrupt the stack
2. Uninitialized-stack information disclosure (CWE-908/CWE-200) — NlGetLocalPingResponse
NlGetLocalPingResponse declares a 528-byte stack buffer Src without
initializing it. PrimaryQueryHandler / LogonRequestHandler write structured
response data into it, then memcpy copies Size[0] bytes into a heap buffer for
transmission. The padding / gaps between aligned and variable-length fields can
still hold leftover stack data from a previous call — frame pointer, return
address, authentication-token remnants — which is then sent to the unauthenticated
remote requester.
Because Netlogon runs as SYSTEM and both bugs are reachable pre-auth over the network, severity is Critical (RCE + disclosure).
Prerequisites and Constraints
- Network, unauthenticated (
AV:N,PR:N,AC:L): send a crafted DC Locator / SamLogon query over CLDAP (UDP 389), the Netlogon mailslot, or RPC. - Stack overflow: supply a domain / DNS / computer name near the length limit so the fixed 528-byte serialization buffer is overrun by the trailing GUID/flag writes.
- Disclosure: any ping/logon query returns the response buffer, whose uninitialized gaps leak stack memory.
Vulnerability Details
Root Cause
(1) NetpLogonPutUnicodeString’s failure/return was ignored, so serialization
continued from an out-of-bounds or undefined write position into a fixed stack
buffer. (2) The response stack buffer was never zero-initialized, so its
inter-field padding carried prior stack contents into the network response.
The patch (confirmed — diff, .7623 → .8521; fix ships May 2026)
All three fixes are gated behind Feature_740537659:
BuildSamLogonResponse— the threeNetpLogonPutUnicodeStringOldcalls are replaced withNetpLogonPutUnicodeStringcalls whose return value is checked in a nestedifchain; if a string write fails, no further writes occur and an error (1355=ERROR_NO_LOGON_SERVERS) is returned immediately.PrimaryQueryHandler— twoNetpLogonPutUnicodeStringcalls gain return checks; on failure itreturn 0s instead of serializing from a bad cursor.NlGetLocalPingResponse—memset(Src, 0, 0x208)(528 bytes) is inserted right after theNlGlobalMemberWorkstationcheck, zeroing the buffer before it is populated so no uninitialized stack data is transmitted.
// BuildSamLogonResponse (patched, Feature_740537659) — from our diff
uVar2 = NetpLogonPutUnicodeString((wchar_t*)(param_1+0xd8), 0x24, &local_90); // 36
if (uVar2) { uVar2 = NetpLogonPutUnicodeString(param_4, 0x82, &local_90); // 130
if (uVar2) { uVar2 = NetpLogonPutUnicodeString((wchar_t*)(param_1+0x48), 0x20, &local_90); } } // 32
if (!uVar2) return 1355; // string serialization failed -> stop, no further writes
// NlGetLocalPingResponse (patched, Feature_740537659)
if (NlGlobalMemberWorkstation) return 1355;
if (Feature_740537659__private_IsEnabledDeviceUsage())
memset(local_258, 0, 0x208); // *** zero the 528-byte response buffer ***
The in-house diff confirms NetpLogonPutUnicodeString changed from void to a
value-returning function (the old body preserved as NetpLogonPutUnicodeStringOld),
the return-checked call chains in BuildSamLogonResponse / PrimaryQueryHandler,
and the memset(...,0,0x208) in NlGetLocalPingResponse — all gated by
Feature_740537659.
Patch Completeness Assessment
CFR-gated behind Feature_740537659. The return-checked serialization and the
buffer zeroing run only when the flag is enabled; the original paths still ship
when disabled. Verify Feature_740537659 is enabled to confirm both fixes are
live. Given the pre-auth/Critical nature, prioritize applying the May 2026 update.
Detection Guidance
Behavioural. Pre-auth CLDAP / mailslot / RPC DC-Locator queries with
domain/DNS/computer names near the length limit; Netlogon (lsass/netlogon)
stack-corruption crashes during SamLogon response building; anomalous bytes
(pointer-like / token-like data) in ping/logon responses on unpatched builds.
Config. The fix is CFR-gated — confirm Feature_740537659 is enabled.
References
- MSRC advisory — CVE-2026-41089 (Windows Netlogon Remote Code Execution), released 2026-05-12, KB5087539.
- Full binary diff:
/data/patch_diffs/netlogon_dll-cve-2026-41089-ghidriff.md
Attack Path
An unauthenticated DC-Locator query overruns Netlogon's fixed 528-byte response stack buffer and leaks uninitialized stack
Derived from the patch delta: the checks added by the vendor identify which fields crossed a trust boundary unvalidated. Reachability and privilege are taken from the call chain in the RCA report.
Exploits & PoC
8 public PoCsUnverified third-party code
Public proof-of-concept repositories aggregated from PoC-in-GitHub. They are not reviewed and may be incomplete, non-functional, or malicious — inspect the code before running anything.
| Repository | Stars | Published | Description |
|---|---|---|---|
| 0xABCD01/CVE-2026-41089 | 212 | 2026-06-01 | CVE-2026-41089 PoC — Netlogon CLDAP stack buffer overflow (CVSS 9.8 CRITICAL) |
| HydraSoft/CVE-2026-41089-Netlogon-RCE | 16 | 2026-07-21 | Technical analysis and Proof-of-Concept (PoC) for CVE-2026-41089, a critical unauthenticated Remote Code Execution (RCE) vulnerability in the Windows Netlogon service affecting Domain Controllers. |
| hnytgl/CVE-2026-41089 | 14 | 2026-06-03 | CVE-2026-41089 是 Windows Netlogon 服务中一个关键的远程代码执行漏洞,单包即可崩溃 lsass.exe,导致域控制器在约 30-60 秒内重启。此期间该 DC 的所有域认证将失败。 |
| ADScanPro/CVE-2026-41089-LongLogon | 14 | 2026-06-03 | CVE-2026-41089 checker: unauthenticated, non-destructive detection for the Netlogon CLDAP stack buffer overflow (CVSS 9.8). Reports whether a domain controller's domain is long enough to crash, withou |
| 0xBlackash/CVE-2026-41089 | 10 | 2026-06-02 | CVE-2026-41089 |
| opensource-arrozconpollo191/CVE-2026-41089-Netlogon-RCE | 1 | 2026-07-22 | Scan Windows Domain Controllers for CVE-2026-41089 to detect unauthenticated remote code execution vulnerabilities in the Netlogon service. |
| jelasin/CVE-2026-41089 | 0 | 2026-06-01 | CVE-2026-41089 PoC — Netlogon CLDAP stack buffer overflow (CVSS 9.8 CRITICAL) |
| hnytgl/CVE-2026-41089-Detector | 0 | 2026-06-03 | 这是一个用于防御巡检的 CVE-2026-41089 检测脚本。该漏洞是 Microsoft 在 2026 年 5 月安全更新中披露的 Windows Netlogon 远程代码执行漏洞。 |
Detection Rules
Detection availableCommunity detection & vulnerability-scanning rules aggregated from Sigma and Nuclei templates. Validate and tune to your environment before deploying.
Sigma rules 1
Acknowledgments
Windows Attack Research & Protection (WARP) with Microsoft