Windows Kerberos — ResetNightmare: Arbitrary Password Reset via Change Password Protocol Validation Flaw (CVE-2026-27912)
Published: 2026-08-11 • Researcher: Semperis Research Team (Semperis-Community)
- Severity
- High
- CVE
- CVE-2026-27912
- Category
- network
- Affected product
- Microsoft Windows Kerberos Key Distribution Center (KDC), Change Password protocol (kadmin/changepw)
- Affected versions
- Windows Server with unpatched Kerberos KDC (all supported versions prior to the July/August 2026 security update)
- Disclosed
- 2026-08-11
- Patch status
- Unverified
Tags
References
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-08-11 |
| Last Updated | 2026-08-11 |
| Author / Researcher | Semperis Research Team (Semperis-Community) |
| CVE / Advisory | CVE-2026-27912 |
| Category | network |
| Severity | High |
| CVSS Score | 8.0 (CVSSv3.1: AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) |
| Status | Patched |
| Tags | windows, kerberos, active-directory, privilege-escalation, password-reset, domain-controller, upn, rubeus, changepw, krbtgt, CWE-285, microsoft, CVE-2026-27912 |
| Related | pocs/network/2026-07-27_cve-2026-54121-certighost-adcs-dc-impersonation/ (different AD privilege-escalation, same target class), pocs/network/2026-07-05_cve-2026-26128-adcs-kerberos-relay-unicode-spn/ (Kerberos relay via ADCS) |
Affected Target
| Field | Value |
|---|---|
| Software / System | Microsoft Windows Kerberos Key Distribution Center (KDC), Change Password protocol (kadmin/changepw) |
| Versions Affected | Windows Server with unpatched Kerberos KDC (all supported versions prior to the July/August 2026 security update) |
| Language / Platform | PowerShell (PoC automation), Rubeus (.NET, Kerberos tooling); targets Active Directory Domain Controllers |
| Authentication Required | Yes — requires a domain account with the ability to write a userPrincipalName (UPN) on any controlled account, or permission to create new accounts in an OU |
| Network Access Required | Adjacent network — must be able to reach the Domain Controller on Kerberos (TCP/UDP 88) and LDAP (TCP 389/636) ports |
Summary
CVE-2026-27912, nicknamed ResetNightmare by Semperis, is a validation flaw in the Kerberos Change Password protocol that allows an attacker to reset the password of any user or computer account in Active Directory — including Domain Admins, the krbtgt account, and domain-joined computer accounts — without knowing the current password. The attacker needs only a low-privilege domain account with the ability to write a userPrincipalName (UPN) attribute on any account they control, or permission to create new accounts in any Organizational Unit.
The vulnerability is an improper authorization issue (CWE-285) in how the KDC validates Kerberos Change Password requests. The KDC fails to properly verify that the authenticated principal requesting the password change is the same principal whose password is being changed. By temporarily setting the UPN of a controlled account to the sAMAccountName of the target, requesting a TGT with NT-ENTERPRISE name type for kadmin/changepw, and then clearing the UPN before the password change is executed, the attacker can trick the KDC into resetting the target password.
Both user and computer accounts can be targeted. This makes the vulnerability particularly dangerous: resetting a computer account password effectively breaks the trust relationship between the computer and the domain, enabling machine-account takeover.
Vulnerability Details
Root Cause
The Kerberos Change Password protocol (RFC 3244, kadmin/changepw) is intended to let users change their own passwords. The KDC uses the TGT to identify whose password should be changed. The vulnerability arises because the KDC does not adequately verify that the authenticated identity in the TGT legitimately corresponds to the target account when the TGT was obtained using NT-ENTERPRISE (UPN-based) name resolution.
The attack exploits a Time-of-Check-to-Time-of-Use (TOCTOU) window:
Check: The attacker sets their controlled account UPN to the target
sAMAccountName(e.g.,Administrator). When Rubeus requests a TGT forAdministratorwithNT-ENTERPRISEname type and thekadmin/changepwSPN, the KDC resolves the UPN and issues the TGT — the UPN currently points to the attacker’s account, so authentication succeeds with the attacker’s password.Use: The attacker clears the UPN from their account. Now the only principal named
Administratoris the real Administrator. When the attacker presents the TGT to the Change Password service, the KDC resolves the principal name again — this time it resolves to the real Administrator — and resets that account’s password.
Attack Flow
- Set fake UPN: Set the
userPrincipalNameof a controlled account to the targetsAMAccountName(e.g.,Administrator). - Request TGT: Use Rubeus to request a TGT for the target name with
NT-ENTERPRISEprincipal type, targeting thekadmin/changepwSPN. The KDC resolves via UPN and issues the TGT authenticated with the attacker’s password. - Clear UPN: Remove the fake UPN from the controlled account. The name now resolves only to the real target.
- Change password: Use the TGT with Rubeus
changepwto reset the target account password. The KDC resolves the principal name to the real target and resets it. - Authenticate: Log in as the target with the new password.
The PoC script automates the entire flow and cleans up after itself (restores original UPN, deletes ticket file).
Impact
- Full domain compromise: Resetting the Domain Admin or
krbtgtpassword gives the attacker complete control of the Active Directory forest. - Computer account takeover: Resetting a computer account password breaks the machine-domain trust, enabling the attacker to impersonate the machine account for lateral movement, delegation abuse, or resource-based constrained delegation attacks.
- Stealth: The attack cleans up the UPN modification and deletes the ticket file. The only persistent change is the target password itself.
- Low barrier: Requires only GenericWrite on the UPN attribute of any single account (or CreateChild in any OU). Many environments have overly permissive ACLs that satisfy this requirement.
Environment / Lab Setup
Setup Steps
| |
Proof of Concept
See
ResetNightmare.ps1(213 lines, PowerShell) in this folder — mirrored byte-for-byte from Semperis-Community/ResetNightmare. The upstream README is preserved asupstream-README.md.
Step-by-Step Reproduction
- Deploy an unpatched AD lab with at least one Domain Controller and a low-privilege domain user.
- Ensure the user has GenericWrite on any account (or CreateChild on an OU). Use
-CreateNewPathif creating a new account for the attack path. - Place Rubeus.exe in the current directory or specify
-RubeusPath. - Dot-source and invoke:PowerShell
1 2 3. .\ResetNightmare.ps1 Invoke-ResetNightmare -TargetAccount "victim" -TargetNewPassword "Pwned123!" ` -UPNUser "myuser" -UPNUserPassword "MyPass!" - Observe: The script sets the fake UPN, requests a TGT via Rubeus, clears the UPN, and resets the target password. On success it prints instructions to authenticate as the target.
Exploit Code
The UPN manipulation — sets the controlled account UPN to the target name, waits for replication, then requests the TGT:
| |
The TGT request — Rubeus with NT-ENTERPRISE name type targeting kadmin/changepw:
| |
The password reset — clears the fake UPN first (TOCTOU), then changes the password:
| |
Expected Output
[*] Setting a fake UPN for controlledUser...
[*] Asking for a TGT for controlledUser with the name Administrator (NT_ENTERPRISE) for kadmin/changepw...
[*] Clearing fake UPN from controlledUser...
[*] Attempting to change Administrator's password to NewP@ssw0rd!...
[*] Cleaning up files...
Success! You can now authenticate as Administrator with the password NewP@ssw0rd!
To spawn a new netonly process:
Rubeus.exe asktgt /user:Administrator /password:NewP@ssw0rd! /suppenctype:AES256 /nowrap /createnetonly:cmd.exe /showDetection and Indicators of Compromise
Remediation
| Action | Detail |
|---|---|
| Patch | Apply the Microsoft security update for CVE-2026-27912 on all Domain Controllers. The fix validates that the authenticated principal in the Change Password TGT is the same principal whose password is being changed, closing the TOCTOU window. |
| Workaround | Audit and restrict who has GenericWrite on the userPrincipalName attribute across the domain. Restrict CreateChild permissions on OUs to only authorized administrators. Monitor for UPN modifications on non-standard accounts. |
| Verification | Confirm all DCs are patched. Run the PoC against a test DC to verify the patch blocks the attack (the changepw step should fail with an authorization error). Audit ACLs for excessive GenericWrite/WriteDACL permissions using tools like BloodHound, PingCastle, or Purple Knight. |
References
- NVD — CVE-2026-27912
- MSRC — CVE-2026-27912
- Semperis-Community/ResetNightmare (upstream PoC)
- Rubeus — GhostPack (Kerberos tooling used by the PoC)
- RFC 3244 — Microsoft Windows 2000 Kerberos Change Password and Set Password Protocols
- Related — CVE-2026-54121 CertiGhost ADCS DC Impersonation (in this archive)
- Related — CVE-2026-26128 ADCS Kerberos Relay Unicode SPN (in this archive)
Notes
Verified this session by reading the full PoC source (ResetNightmare.ps1, 213 lines). The script is a single PowerShell function (Invoke-ResetNightmare) that automates the attack using standard ActiveDirectory PowerShell cmdlets (Get-ADUser, Set-ADUser, Set-ADComputer, New-ADUser, New-ADComputer, Set-ADAccountPassword) and Rubeus for Kerberos operations. The code is clear, well-documented, and self-cleaning — it restores the original UPN, deletes the TGT file, and prints the final authentication command.
Malware screen — clean. No obfuscated payloads, no encoded commands, no remote downloaders, no credential exfiltration, no miner, no persistence mechanisms. The script requires Rubeus.exe to be pre-compiled and placed locally — it does not download or fetch any binaries. All AD operations use standard RSAT cmdlets. The only network connections are to the target Domain Controller on standard Kerberos (88) and LDAP (389/636) ports. BSD 3-Clause license.
Author track record: Semperis is a well-established Active Directory security company. Their research team has published multiple AD vulnerability disclosures and tools (Purple Knight, Forest Druid, Directory Services Protector). The Semperis-Community GitHub organization is their public research arm. The repo was created on August 2, 2026, has 157 stars and 25 forks as of August 11, and the PoC was published after Microsoft released the patch. Responsible disclosure timeline confirmed by the coordinated release pattern.
The CVSS vector (AV:A — adjacent network) reflects that the attacker must be on the same network as the Domain Controller. In practice, any domain-joined machine qualifies, making this effectively network-accessible in most enterprise environments. The PR:L (low privileges) reflects that only basic domain user credentials plus GenericWrite on a UPN are needed — no administrative access required. The impact is disproportionate to the access required: a single low-privilege user can reset any account password in the domain, including Domain Admin and krbtgt.
| |