Back to Blog
Vulnerability Research Sep 3, 2026 89 views

LongLogon: How a 528-Byte Stack Buffer in Windows Netlogon Unlocks Unauthenticated Domain Controller Takeover

CVE-2026-41089: a pre-authentication stack overflow in Windows Netlogon that lets any network attacker execute code as SYSTEM on a Domain Controller: no credentials, full forest compromise.

By Syed Sadam Hussain Shah, Security Researcher, Cytomate
On May 12, 2026, Microsoft released an emergency patch for CVE-2026-41089, a CVSS 9.8 Critical vulnerability in the Windows Netlogon service. Seventeen days later, Belgium's Centre for Cybersecurity confirmed active exploitation in the wild. The bug is straightforward in concept and devastating in consequence: a fixed-size stack buffer in the MS-NRPC message handler overflows when an attacker sends a crafted CLDAP ping, handing them code execution inside lsass.exe at SYSTEM privilege on any reachable Domain Controller.
What This Means for Your Organization

If your organization uses Windows Active Directory and any Domain Controller has not received the May 2026 security update, an attacker anywhere on your network can seize control of every user account, every server, and every machine across your entire organization, without a single valid credential. Every Domain Controller must be patched in the same maintenance window: there is no partial fix, and a single unpatched DC leaves the whole forest exposed.

Domain Controllers are the single most privileged machines in a Windows environment. They authenticate every user, enforce every policy, and replicate every secret across a forest. A pre-authentication RCE on a DC does not just compromise one host: it hands an attacker the keys to the entire Active Directory domain with no prior foothold required. CVE-2026-41089, nicknamed LongLogon by the research community, is exactly that threat.

Exploitation Timeline

From patch release to mass exploitation: 17 days
May 12, 2026
Microsoft Patch Tuesday: KB patches released
May 12, same day
Public PoC published on GitHub
May 29, 2026
Belgium CCB confirms active exploitation of enterprise DCs
Jun 1, 2026
CISA adds CVE-2026-41089 to KEV catalog
Jun 2026 onward
Mass exploitation: ransomware & credential harvesting campaigns

CVSS at a Glance

CVSS v3.1 Base Score
Critical
9.8
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
Confidentiality ImpactHigh
Integrity ImpactHigh
Availability ImpactHigh
ScopeUnchanged

Affected Versions

Windows Server VersionBuildPatch KBStatus
Windows Server 202524H2KB5087539Full RCE path
Windows Server 202223H2KB5087541Full RCE path
Windows Server 202221H2 / 22H2KB5087545Full RCE path
Windows Server 20191809KB5087538Full RCE path
Windows Server 20161607KB5087537Full RCE path
Windows Server 2012 R2N/AKB5087471Full RCE path
Windows Server 2012N/AKB5087470Full RCE path
Windows Server 2008 R2N/AMicropatch (Acros)Extended support only

The vulnerability affects every supported Windows Server version when the machine is configured as a Domain Controller. Workstations and member servers are not exposed: the vulnerable code path is only reachable through the Netlogon service, which only runs in a DC role. Every DC in every domain in a forest must be patched in the same maintenance window; Microsoft's guidance is explicit: "Half-patched forests are not a defensible state for a pre-auth Domain Controller bug."

Background: The Netlogon Service and MS-NRPC

The Netlogon service (netlogon.dll hosted in lsass.exe) has been part of Windows since Windows NT 3.1. It implements MS-NRPC, the Microsoft Windows Netlogon Remote Protocol, which handles domain authentication, secure channel establishment between DCs, and domain membership operations. Among its functions is responding to CLDAP (Connectionless LDAP) and MAILSLOT "ping" requests, which clients use to locate the nearest available Domain Controller during logon.

These discovery pings are unauthenticated by design. A workstation that has just booted, before any user has logged on, must be able to find a DC to authenticate against. The Netlogon service therefore listens on UDP port 389 (CLDAP) and on the NETLOGON mailslot, and it responds to any machine on the network that asks. It has done so for decades, and this openness is the reason CVE-2026-41089 requires zero authentication.

When a DC responds to a ping, it serializes information about itself, its DNS forest name, its DNS domain name, its NetBIOS domain name, and its own hostname, into a fixed-size response buffer and sends it back to the requester. The size of that buffer and the absence of length enforcement during serialization are the root cause of the vulnerability.

The Network Attack Path

Before going into the bug itself, it helps to see how little stands between an attacker and a compromised domain. The entire attack crosses three transitions: exploit, credential extraction, and privilege application, all without a single valid domain account.

Network Attack Path: CVE-2026-41089
Attacker
Any machine on network, no domain account needed
UDP/389 CLDAP crafted DC locator request (malicious DnsDomainName)
Domain Controller
Windows Server lsass.exe / Netlogon, 528-byte buffer overflows
RCE as SYSTEM inside lsass.exe, krbtgt extracted
Golden Ticket
krbtgt hash used to forge Kerberos tickets for any user/privilege
Forest-wide administrative access
AD Forest Owned
All domains, all trusts, persistent access

CVE-2026-41089: Stack-Based Buffer Overflow in MS-NRPC Serialization

The Bug

The vulnerable function lives inside the Netlogon service's CLDAP and MAILSLOT ping response handler. When constructing a DC locator response (NETLOGON_SAM_LOGON_RESPONSE_EX), the code concatenates multiple string fields, forest name, domain name, DC hostname, and associated metadata, into a single stack-allocated buffer of 528 bytes. No bounds checking is applied during this concatenation. The code trusts that the DC's own configured identity strings will always fit.

That trust is the flaw. The total length of the concatenated strings is not validated against the buffer size before or during the write. An attacker does not inject long strings from outside: the DC's own domain and forest names are what overflow the buffer. If those names are long enough, the serialization routine writes past the end of the 528-byte stack allocation, corrupting the stack cookie and the saved return address.

The diagram below shows the exact stack layout and where the overflow lands:

Stack Frame: Netlogon Response Handler (netlogon.dll)Higher addresses at top, stack grows downward
Return Address
Overwritten by attacker: instruction pointer redirected to shellcode, arbitrary code execution achieved
Overwritten
Saved RBP (frame pointer)
Corrupted: stack frame unwinding breaks
Corrupted
Stack Cookie (/GS canary)
Overwritten: mismatch triggers STATUS_STACK_BUFFER_OVERRUN, bypassed when overflow is precisely aligned
Overflow Boundary
528-byte stack buffer: NETLOGON_SAM_LOGON_RESPONSE_EX fields written sequentially (DnsDomainName, DnsForestName, DcSiteName, ClientSiteName, NetBiosDomainName, NetBiosDcName)
No cumulative length check applied: if sum of all fields exceeds 528 bytes, writes overflow upward into the stack cookie, RBP, and return address above
528 Bytes
Other local variables
Handler state, not attacker-reachable
Higher memory addresses (overflow writes upward into cookie, RBP, return address)Stack pointer (RSP)

The overflow condition is triggered by how an attacker crafts their CLDAP ping. The DC locator request includes an optional DnsDomainName field. By supplying a value calculated to push the DC's total response string length past 528 bytes, the attacker causes the serialization to overrun the stack allocation and corrupt the return address. Because the attacker controls the input that drives the serialization length, they can precisely align the overflow to place a controlled value at the return address offset.

Why LSASS Makes This Catastrophic

The Netlogon service runs as a hosted service inside lsass.exe, the Local Security Authority Subsystem Service. LSASS runs as NT AUTHORITY\SYSTEM and holds every active credential on the machine in memory. Code execution inside LSASS gives the attacker immediate access to all of the following without any additional tooling:

What the Attacker Gains Access to Inside lsass.exe
krbtgt Hash
The Kerberos ticket-granting key. Used to forge Golden Tickets, valid for any user, any privilege, across all domains in the forest, indefinitely.
NTLM Hashes
Password hashes for every domain user who has recently authenticated through this DC. Usable for pass-the-hash attacks across the network.
Kerberos Tickets (TGTs)
Active session tickets for authenticated users. Allows the attacker to impersonate those users immediately without knowing their passwords.
DPAPI Master Keys
Domain-wide Data Protection API keys. Used to decrypt browser-saved passwords, certificate private keys, and other secrets across domain machines.
NTDS.dit Access
The Active Directory database is loaded into LSASS memory on DCs. The attacker can dump all domain account hashes in a single operation.
Plaintext Credentials
WDigest and other SSO protocols may leave cleartext passwords in LSASS memory depending on server configuration and Windows version.
One packet SYSTEM in lsass.exe every secret in the domain permanent forest-wide control

The Full Exploit Chain: From CLDAP Ping to Forest Takeover

The attack requires no prior authentication, no user interaction, and no pre-existing foothold. All five stages are reachable from a single machine with network access to a DC, including from outside the domain perimeter if UDP port 389 is reachable.

The Exploit Chain
1
DC Reconnaissance
Unauthenticated CLDAP pings reveal DC hostnames, domain names, and forest topology
2
Crafted CLDAP Ping
DnsDomainName chosen to push DC serialization past the 528-byte stack boundary
3
Stack Overflow
Stack cookie and return address overwritten inside lsass.exe: control flow hijacked
4
SYSTEM in LSASS
Arbitrary code execution as NT AUTHORITY\SYSTEM: krbtgt hash extracted from memory
5
Forest Takeover
Golden Tickets forged: persistent admin access to all domains across the forest
Stage 1: DC Reconnaissance

The attacker sends unauthenticated CLDAP ping queries (UDP port 389) to the target subnet to enumerate Domain Controllers. The Netlogon service on every DC responds by default, disclosing DC hostnames, domain names, site names, and forest topology without authentication. The attacker identifies the target DC and notes its configured domain and forest name lengths: this measurement tells them exactly how large a DnsDomainName value is needed to trigger the overflow.

Stage 2: Crafted CLDAP Ping Triggers the Overflow

The attacker sends a specially crafted NETLOGON_SAM_LOGON_REQUEST over CLDAP (UDP/389). The request supplies a DnsDomainName value calculated to push the DC's response serialization, forest name + domain name + site names + NetBIOS names, past the 528-byte stack boundary. The Netlogon handler begins constructing its NETLOGON_SAM_LOGON_RESPONSE_EX reply and overruns the buffer in the process.

Stage 3: Stack Corruption and Control Flow Hijack

The overflow corrupts the stack cookie and the saved return address in the response handler's stack frame. When the handler returns, execution transfers to the attacker-supplied address rather than the legitimate caller, redirecting control flow inside lsass.exe. The stack cookie mismatch would normally trigger STATUS_STACK_BUFFER_OVERRUN and crash the process; the exploit bypasses this by aligning the overflow so the cookie is overwritten with its original value, or by triggering the overflow on a code path where the cookie check is not enforced.

Stage 4: Code Execution Inside LSASS (SYSTEM)

With control of the instruction pointer inside lsass.exe, the attacker executes arbitrary code at NT AUTHORITY\SYSTEM. At this stage a reflective shellcode loader typically runs in the LSASS process context, extracting the krbtgt NTLM hash and all cached credentials directly from LSASS memory using standard Windows API calls, no external tools needed.

Stage 5: Active Directory Forest Takeover

With the krbtgt hash in hand, the attacker uses it offline to forge Kerberos Golden Tickets granting themselves any privilege in any domain in the forest, bypassing the original account's password lifetime, surviving password resets, and crossing domain trust boundaries. From a single unauthenticated network packet to a DC, the attacker has achieved persistent, forest-wide administrative control without ever holding a valid domain credential.

Golden Ticket: Scope of Access from a Single krbtgt Hash
krbtgt NTLM Hash
Extracted from LSASS memory on the compromised DC: the single key to the entire forest
forged entirely offline, no further contact with the DC required
Golden Ticket
Forged Kerberos TGT: valid for any user, any privilege, any validity period
Root Domain Admin
Full control of the root domain: all servers, all users, all file shares and services
All Child Domains
Enterprise Admin privileges cascade to every child domain regardless of separate admin teams or boundaries
Domain Trusts
External and forest trusts traversed: access extends to partner domains, subsidiaries, and federated environments
Survives Remediation
Resetting the compromised account's password has no effect; only resetting the krbtgt password twice invalidates forged tickets
One compromised DC one krbtgt hash permanent, credential-free control of every machine in the forest

The entire chain, five stages, zero authentication, zero user interaction, is fully automatable and was weaponized within seventeen days of public disclosure.

Exploit Payload Structure

The initial CLDAP DC locator request that triggers the overflow follows the standard NETLOGON_SAM_LOGON_REQUEST wire format:

; CLDAP NETLOGON_SAM_LOGON_REQUEST: annotated
; Destination: DC  UDP/389  (no authentication required)

[LDAP SearchRequest]
  baseObject:   ""
  scope:        base
  filter:       (NtVer=\06\00\00\00)     ; version flags
  attributes:   Netlogon

[Netlogon Attribute: NETLOGON_SAM_LOGON_REQUEST body]
  Opcode:                       0x0012   ; LOGON_SAM_LOGON_REQUEST
  UnicodeComputerName:          "ATTACKER"
  UnicodeUserName:              ""
  MailslotName:                 "\MAILSLOT\NET\NETLOGON"
  AllowableAccountControlBits:  0x00000080   ; workstation trust
  DomainSidSize:                0x00000000
  DomainSid:                    (empty)
  NtVersion:                    0x00000006
  LmNtToken:                    0xFFFF
  Lm20Token:                    0xFFFF

  ; DnsDomainName is calculated from reconnaissance (Stage 1):
  ;   len(DnsForestName) + len(DnsDomainName) + len(DcSiteName)
  ;     + len(ClientSiteName) + len(NetBiosDomainName) + len(NetBiosDcName)
  ;   must exceed 528 bytes when the DC serializes its response.
  ;
  ; The LongLogon tool (ADScanPro) computes this non-destructively:
  ;   it reads the DC's own name lengths via a normal ping response
  ;   and reports whether the sum already exceeds the threshold.
  DnsDomainName:  [crafted-suffix, calculated from recon to trigger overflow]

In-the-Wild Exploitation

CVE-2026-41089 was patched on May 12, 2026. A public proof-of-concept appeared on GitHub the same day. On May 29, 2026, seventeen days after the patch, Belgium's Centre for Cybersecurity (CCB) issued a public warning confirming active exploitation of enterprise Domain Controllers. By June 1, multiple major outlets had confirmed broad active exploitation with multiple threat actor groups involved.

The speed of weaponization reflects the vulnerability's properties: a stack overflow with a well-understood overwrite target, an unauthenticated attack surface reachable from anywhere on the network, and a target, the Domain Controller, so valuable that attacker incentive to act quickly was extremely high. CISA added CVE-2026-41089 to the Known Exploited Vulnerabilities (KEV) catalog shortly after exploitation was confirmed.

Observed post-exploitation activity included: credential harvesting from LSASS memory, krbtgt extraction for Golden Ticket persistence, ransomware deployment via domain-wide Group Policy Objects, and installation of persistent implants directly on Domain Controllers for long-term access.

Patch Analysis

What Microsoft Changed

The May 2026 patches modify the DC locator response serialization routine in netlogon.dll. The fix introduces cumulative length tracking during construction of the NETLOGON_SAM_LOGON_RESPONSE_EX structure. Before any field is written into the stack buffer, the code now computes the total length of all fields and validates it against the 528-byte boundary. If the cumulative length would exceed the buffer, the response is rejected before any write occurs, preventing the overflow entirely.

A secondary hardening measure in the patched builds enforces the stack cookie check on all code paths through the handler, including asynchronous paths where the check was previously reachable in a state that allowed bypass.

Before vs After: netlogon.dll Serialization Routine Behavior
Vulnerable: Pre-Patch
1
NETLOGON_SAM_LOGON_RESPONSE_EX fields (forest name, domain name, site names, NetBIOS names) written into the 528-byte stack buffer one by one
2
No cumulative length check performed: code trusts that the DC's own name strings will always fit
3
If combined field length exceeds 528 bytes, writes continue past the buffer boundary into the stack cookie and saved return address
Stack cookie corrupted, return address overwritten, RCE inside lsass.exe
Patched: Post-May 2026 KB
1
Cumulative total of all NETLOGON_SAM_LOGON_RESPONSE_EX field lengths computed before any write begins
2
Total validated against the 528-byte boundary: if the sum would exceed the limit, the response is rejected immediately
3
No bytes are written to the stack buffer until the total is confirmed safe: overflow is structurally impossible
Response rejected cleanly, no write, no overflow, no RCE

Patch Coordination Requirement

Because Netlogon replication traffic flows between all DCs in a domain, applying the patch to only a subset of DCs does not constitute a secure state. An attacker with network access to any unpatched DC retains full RCE capability. All Domain Controllers in all domains across the forest must be patched in a single coordinated maintenance window. Staged rollouts that leave some DCs unpatched are explicitly not a safe posture for this vulnerability.

Detection

Network-level detection: monitor UDP port 389 (CLDAP) traffic for:

  • CLDAP DC locator requests with DnsDomainName fields significantly longer than the actual configured domain name
  • Repeated CLDAP queries from a single source IP in rapid succession (automated reconnaissance)
  • CLDAP requests from source addresses outside known subnets or management ranges
  • MAILSLOT ping traffic from unexpected or external source addresses

Host-level detection on Domain Controllers:

  • Event ID 1000 (Application Error) with lsass.exe as the faulting application: indicates a crash from a failed exploit attempt
  • Event ID 1001 (Windows Error Reporting) referencing LSASS: system attempted to collect a crash dump
  • Event ID 4625 (Logon Failure) spikes on DCs with no corresponding workstation activity
  • Unexpected child processes spawned from lsass.exe: any child process of LSASS is a high-severity indicator of compromise
  • LSASS memory reads by processes outside your approved tooling baseline

Sigma detection rule (network):

title: CLDAP DC Locator Ping with Anomalous Domain Name Length
status: experimental
logsource:
  category: network_traffic
  product: zeek
detection:
  selection:
    dst_port: 389
    proto: udp
    payload|contains: 'NtVer'
  condition:
    selection
    and length(dns_domain_name_field) > 100   # adjust to your environment
falsepositives:
  - Legitimate DC locator traffic from genuinely long-named domains
level: high

Post-patch Active Directory audit (PowerShell):

# New accounts in Domain Admins: compare against your known baseline
Get-ADGroupMember "Domain Admins" |
    Select-Object Name, SamAccountName, DistinguishedName |
    Sort-Object Name

# krbtgt pwdLastSet: any reset outside a maintenance window is suspicious
(Get-ADUser krbtgt -Properties PasswordLastSet).PasswordLastSet

# GPOs created or modified in the last 30 days
# Attackers commonly push ransomware payloads via newly created GPOs
Get-GPO -All |
    Where-Object { $_.ModificationTime -gt (Get-Date).AddDays(-30) } |
    Select-Object DisplayName, ModificationTime |
    Sort-Object ModificationTime -Descending

Remediation

Apply the appropriate KB patch to every Domain Controller in every domain in the forest, in a single coordinated maintenance window. There is no supported workaround: the CLDAP and MAILSLOT ping interfaces are required for domain client operations and cannot be safely blocked at the DC level.

After patching:

  • Reset the krbtgt account password twice, with at least one full AD replication cycle between resets, to invalidate any Golden Tickets that may have been forged during the exploitation window
  • Review all members of Domain Admins, Enterprise Admins, and Schema Admins for unauthorized accounts
  • Audit recently created or modified Group Policy Objects for unexpected changes or unusual script deployments
  • Check domain controller event logs for LSASS crash events (Event ID 1000/1001) prior to the patch window: these indicate pre-patch exploitation attempts
  • If LSASS compromise is suspected, treat all cached credentials on the DC as compromised and initiate a broad privileged-account password reset
  • Enable Credential Guard on Domain Controllers running Windows Server 2016 or later to protect LSASS memory from credential harvesting in future incidents

Why This Vulnerability Matters

Netlogon vulnerabilities carry a special severity in the Active Directory threat model. The protocol exists specifically to bridge the gap between unauthenticated machines and the domain: it has to be open, it has to be reachable, and it runs in the most privileged process on the most privileged machine in the environment. Any memory safety flaw in its message handling is a critical pre-authentication RCE by definition.

CVE-2026-41089 is not the first Netlogon vulnerability to reach this category. Zerologon (CVE-2020-1472) allowed a similar domain takeover through a cryptographic flaw in the secure channel establishment protocol. Each time a critical pre-auth flaw surfaces in DC-adjacent services, the result is the same: mass exploitation within days, forest-wide compromise as the attacker objective, and an enormous remediation burden for organizations that delayed patching.

The 528-byte fixed stack buffer that underlies LongLogon is a reminder that memory safety failures in code written decades ago, and never modernized, remain a reliable source of critical vulnerabilities. The assumption baked into the fixed buffer, that a DC's own name strings will always be short enough to fit, held true for thirty years before it did not. The lesson is not just to patch this instance, but to treat long-lived, low-level network service code with the same security scrutiny as internet-facing application code.

Sources1. Windows Netlogon RCE Exploited, Domain Controllers at Risk: Help Net Security
2. Critical Windows Netlogon RCE Flaw Now Exploited in Attacks: Bleeping Computer
3. Critical Windows Netlogon Vulnerability in Attackers' Crosshairs: SecurityWeek
4. CVE-2026-41089 Security Update Guide: Microsoft MSRC
5. Windows Netlogon 0-Click RCE: Cyber Security News
6. CVE-2026-41089-LongLogon Detection Tool: ADScanPro (GitHub)
7. CVE-2026-41089 Detail: NVD / NIST

More from the Blog

Threat Intelligence Nov 29, 2026

The Build-Pipeline Backdoor: Inside the NullReceiver Supply-Chain Campaign

Read More
Deception Nov 29, 2026

Lying to the Machines: The Secret Weapon Against AI Attacks

Read More
Agentic Security Nov 24, 2026

Your AI Coding Agents Need an EDR Too: Introducing cADRe

Read More